]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Don't print startup banner if quiet_interface_discovery is set
authorTed Lemon <source@isc.org>
Mon, 20 Oct 1997 21:47:15 +0000 (21:47 +0000)
committerTed Lemon <source@isc.org>
Mon, 20 Oct 1997 21:47:15 +0000 (21:47 +0000)
common/bpf.c
common/nit.c
common/raw.c
common/socket.c
common/upf.c

index 2f44dc3a52fb311a9b5869d7956e4d95764bf56d..e47aa1f7822ca0876e8dadf16bfe483607f60301 100644 (file)
@@ -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 */
 
index 20ffacd62bc837b9bf592e3264290a73ef9e4c8a..0633f1d393b014836bf6c296b53048298b552ea0 100644 (file)
@@ -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 */
 
index 6d76416954034e55ecd9d7e4ad63366a01f7e665..973ede13b8f949bb62b408339125b507e1e8b171 100644 (file)
@@ -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)
index a68a502ce20149262d0d662127a5014bd20faa8f..08f258f7d635ddfae7f807ff1f4a72a602ca4288 100644 (file)
@@ -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 */
 
index d5e27cc572b3e4dc5c3da4b0e0307b7b2521601f..498b6e6cde1bd55d184f83457fefa8199c4b58c8 100644 (file)
@@ -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 */