]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
- Compilation with DLPI and -Werror has been repaired. [ISC-Bugs #17189]
authorDavid Hankins <dhankins@isc.org>
Wed, 3 Oct 2007 23:36:27 +0000 (23:36 +0000)
committerDavid Hankins <dhankins@isc.org>
Wed, 3 Oct 2007 23:36:27 +0000 (23:36 +0000)
RELNOTES
common/dlpi.c
includes/dhcpd.h

index 9032210419772a585e1cc20a6db814633135e0d2..9770b64d351f31b8854c9b5aa3983b726a75d943 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -72,6 +72,8 @@ suggested fixes to <dhcp-users@isc.org>.
   "-Werror" (unused variable) rather than the actual test failure.  Lead
   to inconsistent and unworkable auto-configurations.
 
+- Compilation with DLPI and -Werror has been repaired.
+
                        Changes since 4.0.0a2
 
 - Fix for startup where there are no IPv4 addresses on an interface.
index c38255d119b7b3e37c1d264a21d2391bef840fa4..50f05eff9deac89fc154fc4ce2366b7f582753d9 100644 (file)
 #  define ABS(x) ((x) >= 0 ? (x) : 0-(x))
 # endif
 
+#if defined(USE_DLPI_PFMOD) || defined(USE_DLPI_RAW)
 static int strioctl PROTO ((int fd, int cmd, int timeout, int len, char *dp));
+#endif
 
 #define DLPI_MAXDLBUF          8192    /* Buffer size */
 #define DLPI_MAXDLADDR         1024    /* Max address size */
@@ -136,8 +138,13 @@ static int dlpiattachreq PROTO ((int fd, unsigned long ppa));
 static int dlpibindreq PROTO ((int fd, unsigned long sap, unsigned long max_conind,
                               unsigned long service_mode, unsigned long conn_mgmt,
                               unsigned long xidtest));
+#if defined(UNUSED_DLPI_INTERFACE)
+/* These functions are unused at present, but may be used at a later date.
+ * defined out to avoid compiler warnings about unused static functions.
+ */
 static int dlpidetachreq PROTO ((int fd));
 static int dlpiunbindreq PROTO ((int fd));
+#endif
 static int dlpiokack PROTO ((int fd, char *bufp));
 static int dlpiinfoack PROTO ((int fd, char *bufp));
 static int dlpiphysaddrack PROTO ((int fd, char *bufp));
@@ -290,6 +297,7 @@ int if_register_dlpi (info)
        return sock;
 }
 
+#if defined(USE_DLPI_PFMOD) || defined(USE_DLPI_RAW)
 static int
 strioctl (fd, cmd, timeout, len, dp)
 int fd;
@@ -312,6 +320,7 @@ char *dp;
        return sio.ic_len;
     }
 }
+#endif /* USE_DPI_PFMOD || USE_DLPI_RAW */
 
 #ifdef USE_DLPI_SEND
 void if_register_send (info)
@@ -514,8 +523,9 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto)
        struct sockaddr_in *to;
        struct hardware *hto;
 {
-       unsigned hbufp = 0;
+#ifdef USE_DLPI_RAW
        double hh [32];
+#endif
        double ih [1536 / sizeof (double)];
        unsigned char *dbuf = (unsigned char *)ih;
        unsigned dbuflen;
@@ -615,10 +625,8 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
        unsigned char dbuf [1536];
        unsigned char srcaddr [DLPI_MAXDLADDR];
        unsigned long srcaddrlen;
-       int flags = 0;
        int length = 0;
        int offset = 0;
-       int rslt;
        int bufix = 0;
        int paylen;
        
@@ -728,8 +736,7 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
 static int dlpiunit (ifname)
        char *ifname;
 {
-       int fd;
-       char *cp, *dp, *ep;
+       char *cp;
        int unit;
        
        if (!ifname) {
@@ -890,8 +897,11 @@ static int dlpibindreq (fd, sap, max_conind, service_mode, conn_mgmt, xidtest)
        return putmsg (fd, &ctl, (struct strbuf*)NULL, flags);
 }
 
+#if defined(UNUSED_DLPI_INTERFACE)
 /*
- * dlpiunbindreq - send a request to unbind.
+ * dlpiunbindreq - send a request to unbind.  This function is not actually
+ *     used by ISC DHCP, but is included for completeness in case it is
+ *     ever required for new work.
  */
 static int dlpiunbindreq (fd)
        int fd;
@@ -913,7 +923,9 @@ static int dlpiunbindreq (fd)
 
 
 /*
- * dlpidetachreq - send a request to detach.
+ * dlpidetachreq - send a request to detach.  This function is not actually
+ *     used by ISC DHCP, but is included for completeness in case it is
+ *     ever required for new work.
  */
 static int dlpidetachreq (fd)
        int fd;
@@ -932,6 +944,7 @@ static int dlpidetachreq (fd)
        
        return putmsg (fd, &ctl, (struct strbuf*)NULL, flags);
 }
+#endif /* UNUSED_DLPI_INTERFACE */
 
 
 /*
index 017026cd2c1a72d18d199dbcb2ab0a87db0d2ede..7658612d4663b131697214b5fc8b567791f67d36 100644 (file)
@@ -2178,6 +2178,8 @@ int if_register_dlpi PROTO ( (struct interface_info *));
 #endif
 
 #ifdef USE_DLPI_SEND
+int can_unicast_without_arp PROTO ((struct interface_info *));
+int can_receive_unicast_unconfigured PROTO ((struct interface_info *));
 void if_reinitialize_send PROTO ((struct interface_info *));
 void if_register_send PROTO ((struct interface_info *));
 void if_deregister_send PROTO ((struct interface_info *));
@@ -2185,6 +2187,8 @@ ssize_t send_packet PROTO ((struct interface_info *,
                            struct packet *, struct dhcp_packet *, size_t,
                            struct in_addr,
                            struct sockaddr_in *, struct hardware *));
+int supports_multiple_interfaces (struct interface_info *);
+void maybe_setup_fallback PROTO ((void));
 #endif
 #ifdef USE_DLPI_RECEIVE
 void if_reinitialize_receive PROTO ((struct interface_info *));