From: Ted Lemon Date: Mon, 20 Oct 1997 21:47:15 +0000 (+0000) Subject: Don't print startup banner if quiet_interface_discovery is set X-Git-Tag: NetBSD_1_3_Alpha~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3648a2a16755015a5ae683fde544c8d2cb818de7;p=thirdparty%2Fdhcp.git Don't print startup banner if quiet_interface_discovery is set --- diff --git a/common/bpf.c b/common/bpf.c index 2f44dc3a5..e47aa1f78 100644 --- a/common/bpf.c +++ b/common/bpf.c @@ -42,7 +42,7 @@ #ifndef lint static char copyright[] = -"$Id: bpf.c,v 1.18 1997/06/08 03:18:07 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; +"$Id: bpf.c,v 1.19 1997/10/20 21:47:13 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -126,13 +126,14 @@ void if_register_send (info) #else info -> wfdesc = info -> rfdesc; #endif - note ("Sending on BPF/%s/%s/%s", - info -> name, - print_hw_addr (info -> hw_address.htype, - info -> hw_address.hlen, - info -> hw_address.haddr), - (info -> shared_network ? - info -> shared_network -> name : "unattached")); + if (!quiet_interface_discovery) + note ("Sending on BPF/%s/%s/%s", + info -> name, + print_hw_addr (info -> hw_address.htype, + info -> hw_address.hlen, + info -> hw_address.haddr), + (info -> shared_network ? + info -> shared_network -> name : "unattached")); } #endif /* USE_BPF_SEND */ @@ -229,13 +230,14 @@ void if_register_receive (info) if (ioctl (info -> rfdesc, BIOCSETF, &p) < 0) error ("Can't install packet filter program: %m"); - note ("Listening on BPF/%s/%s/%s", - info -> name, - print_hw_addr (info -> hw_address.htype, - info -> hw_address.hlen, - info -> hw_address.haddr), - (info -> shared_network ? - info -> shared_network -> name : "unattached")); + if (!quiet_interface_discovery) + note ("Listening on BPF/%s/%s/%s", + info -> name, + print_hw_addr (info -> hw_address.htype, + info -> hw_address.hlen, + info -> hw_address.haddr), + (info -> shared_network ? + info -> shared_network -> name : "unattached")); } #endif /* USE_BPF_RECEIVE */ diff --git a/common/nit.c b/common/nit.c index 20ffacd62..0633f1d39 100644 --- a/common/nit.c +++ b/common/nit.c @@ -42,7 +42,7 @@ #ifndef lint static char copyright[] = -"$Id: nit.c,v 1.14 1997/06/08 03:18:07 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n"; +"$Id: nit.c,v 1.15 1997/10/20 21:47:13 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -154,12 +154,13 @@ void if_register_send (info) #else info -> wfdesc = info -> rfdesc; #endif - note ("Sending on NIT/%s/%s", - print_hw_addr (info -> hw_address.htype, - info -> hw_address.hlen, - info -> hw_address.haddr), - (info -> shared_network ? - info -> shared_network -> name : "unattached")); + if (!quiet_interface_discovery) + note ("Sending on NIT/%s/%s", + print_hw_addr (info -> hw_address.htype, + info -> hw_address.hlen, + info -> hw_address.haddr), + (info -> shared_network ? + info -> shared_network -> name : "unattached")); } #endif /* USE_NIT_SEND */ @@ -236,12 +237,13 @@ void if_register_receive (info) if (ioctl (info -> rfdesc, I_STR, &sio) < 0) error ("Can't set NIT filter on %s: %m", info -> name); - note ("Listening on NIT/%s/%s", - print_hw_addr (info -> hw_address.htype, - info -> hw_address.hlen, - info -> hw_address.haddr), - (info -> shared_network ? - info -> shared_network -> name : "unattached")); + if (!quiet_interface_discovery) + note ("Listening on NIT/%s/%s", + print_hw_addr (info -> hw_address.htype, + info -> hw_address.hlen, + info -> hw_address.haddr), + (info -> shared_network ? + info -> shared_network -> name : "unattached")); } #endif /* USE_NIT_RECEIVE */ diff --git a/common/raw.c b/common/raw.c index 6d7641695..973ede13b 100644 --- a/common/raw.c +++ b/common/raw.c @@ -54,7 +54,7 @@ #ifndef lint static char copyright[] = -"$Id: raw.c,v 1.10 1997/02/19 10:51:44 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; +"$Id: raw.c,v 1.11 1997/10/20 21:47:14 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -78,8 +78,9 @@ void if_register_send (info) memset (name.sin_zero, 0, sizeof (name.sin_zero)); /* List addresses on which we're listening. */ - note ("Sending on %s, port %d", - piaddr (info -> address), htons (local_port)); + if (!quiet_interface_discovery) + note ("Sending on %s, port %d", + piaddr (info -> address), htons (local_port)); if ((sock = socket (AF_INET, SOCK_RAW, IPPROTO_RAW)) < 0) error ("Can't create dhcp socket: %m"); @@ -95,10 +96,11 @@ void if_register_send (info) error ("Can't set IP_HDRINCL flag: %m"); info -> wfdesc = sock; - note ("Sending on Raw/%s/%s", - info -> name, - (info -> shared_network ? - info -> shared_network -> name : "unattached")); + if (!quiet_interface_discovery) + note ("Sending on Raw/%s/%s", + info -> name, + (info -> shared_network ? + info -> shared_network -> name : "unattached")); } size_t send_packet (interface, packet, raw, len, from, to, hto) diff --git a/common/socket.c b/common/socket.c index a68a502ce..08f258f7d 100644 --- a/common/socket.c +++ b/common/socket.c @@ -50,7 +50,7 @@ #ifndef lint static char copyright[] = -"$Id: socket.c,v 1.25 1997/06/08 03:18:08 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; +"$Id: socket.c,v 1.26 1997/10/20 21:47:14 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -161,10 +161,11 @@ void if_register_send (info) #else info -> wfdesc = info -> rfdesc; #endif - note ("Sending on Socket/%s/%s", - info -> name, - (info -> shared_network ? - info -> shared_network -> name : "unattached")); + if (!quiet_interface_discovery) + note ("Sending on Socket/%s/%s", + info -> name, + (info -> shared_network ? + info -> shared_network -> name : "unattached")); } #endif /* USE_SOCKET_SEND */ @@ -176,10 +177,11 @@ void if_register_receive (info) /* If we're using the socket API for sending and receiving, we don't need to register this interface twice. */ info -> rfdesc = if_register_socket (info); - note ("Listening on Socket/%s/%s", - info -> name, - (info -> shared_network ? - info -> shared_network -> name : "unattached")); + if (!quiet_interface_discovery) + note ("Listening on Socket/%s/%s", + info -> name, + (info -> shared_network ? + info -> shared_network -> name : "unattached")); } #endif /* USE_SOCKET_RECEIVE */ diff --git a/common/upf.c b/common/upf.c index d5e27cc57..498b6e6cd 100644 --- a/common/upf.c +++ b/common/upf.c @@ -42,7 +42,7 @@ #ifndef lint static char copyright[] = -"$Id: upf.c,v 1.2 1997/06/08 03:18:09 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; +"$Id: upf.c,v 1.3 1997/10/20 21:47:15 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -142,13 +142,14 @@ void if_register_send (info) #else info -> wfdesc = info -> rfdesc; #endif - note ("Sending on UPF/%s/%s/%s", - info -> name, - print_hw_addr (info -> hw_address.htype, - info -> hw_address.hlen, - info -> hw_address.haddr), - (info -> shared_network ? - info -> shared_network -> name : "unattached")); + if (!quiet_interface_discovery) + note ("Sending on UPF/%s/%s/%s", + info -> name, + print_hw_addr (info -> hw_address.htype, + info -> hw_address.hlen, + info -> hw_address.haddr), + (info -> shared_network ? + info -> shared_network -> name : "unattached")); } #endif /* USE_UPF_SEND */ @@ -206,13 +207,14 @@ void if_register_receive (info) if (ioctl (info -> rfdesc, EIOCSETF, &pf) < 0) error ("Can't install packet filter program: %m"); - note ("Listening on UPF/%s/%s/%s", - info -> name, - print_hw_addr (info -> hw_address.htype, - info -> hw_address.hlen, - info -> hw_address.haddr), - (info -> shared_network ? - info -> shared_network -> name : "unattached")); + if (!quiet_interface_discovery) + note ("Listening on UPF/%s/%s/%s", + info -> name, + print_hw_addr (info -> hw_address.htype, + info -> hw_address.hlen, + info -> hw_address.haddr), + (info -> shared_network ? + info -> shared_network -> name : "unattached")); } #endif /* USE_UPF_RECEIVE */