]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/sys-solaris.c
Fixing GCC warning -Wunused-result with setgid in winbind.c
[ppp.git] / pppd / sys-solaris.c
index e0cd0be32e69dbb458b4cc2e67be89f3e6f75df9..809b506a3640d34879fd8d9be303912bc81b5caa 100644 (file)
  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <limits.h>
 #include <stdio.h>
 #include <stddef.h>
 #include <sys/ethernet.h>
 #endif
 
+#ifdef PPP_FILTER
+#include <pcap.h>
+#endif
+
 #include "pppd.h"
 #include "fsm.h"
 #include "lcp.h"
@@ -258,7 +266,7 @@ static int get_hw_addr(char *, u_int32_t, struct sockaddr *);
 static int get_hw_addr_dlpi(char *, struct sockaddr *);
 static int dlpi_attach(int, int);
 static int dlpi_info_req(int);
-static int dlpi_get_reply(int, union DL_primitives *, int, int);
+static int dlpi_get_reply(int, union DL_primitives *, int, size_t);
 static int strioctl(int, int, void *, int, int);
 
 #ifdef SOL2
@@ -1499,7 +1507,7 @@ netif_get_mtu(int unit)
     error("ioctl(SIOCGIFMTU): %m (line %d)", __LINE__);
     return 0;
     }
-    return ifr.ifr_mtu;
+    return ifr.ifr_metric;
 }
 
 /*
@@ -1636,33 +1644,6 @@ get_ppp_stats(int u, struct pppd_stats *stats)
     return 1;
 }
 
-#if 0
-/*
- * set_filters - transfer the pass and active filters to the kernel.
- */
-int
-set_filters(struct bpf_program *pass, struct bpf_program *active)
-{
-    int ret = 1;
-
-    if (pass->bf_len > 0) {
-       if (strioctl(pppfd, PPPIO_PASSFILT, pass,
-                    sizeof(struct bpf_program), 0) < 0) {
-           error("Couldn't set pass-filter in kernel: %m");
-           ret = 0;
-       }
-    }
-    if (active->bf_len > 0) {
-       if (strioctl(pppfd, PPPIO_ACTIVEFILT, active,
-                    sizeof(struct bpf_program), 0) < 0) {
-           error("Couldn't set active-filter in kernel: %m");
-           ret = 0;
-       }
-    }
-    return ret;
-}
-#endif
-
 /*
  * ccp_fatal_error - returns 1 if decompression was disabled as a
  * result of an error detected after decompression of a packet,
@@ -2315,7 +2296,7 @@ dlpi_info_req(int fd)
 }
 
 static int
-dlpi_get_reply(int fd, union DL_primitives *reply, int expected_prim, maxlen)
+dlpi_get_reply(int fd, union DL_primitives *reply, int expected_prim, size_t maxlen)
 {
     struct strbuf buf;
     int flags, n;