]> The Tcpdump Group git mirrors - libpcap/blobdiff - pcap-nit.c
pcap_create_interface() needs the interface name on Linux.
[libpcap] / pcap-nit.c
index 2aa84ba465ed011faf0a91a9da2cace6005a3255..1b626e215a22cc20f6c3c23e43b807ac2cba619e 100644 (file)
@@ -285,7 +285,7 @@ pcap_activate_nit(pcap_t *p)
                goto bad;
        }
        snit.snit_family = AF_NIT;
-       (void)strncpy(snit.snit_ifname, p->opt.source, NITIFSIZ);
+       (void)strncpy(snit.snit_ifname, p->opt.device, NITIFSIZ);
 
        if (bind(fd, (struct sockaddr *)&snit, sizeof(snit))) {
                /*
@@ -355,11 +355,11 @@ pcap_activate_nit(pcap_t *p)
 }
 
 pcap_t *
-pcap_create_interface(const char *device, char *ebuf)
+pcap_create_interface(const char *device _U_, char *ebuf)
 {
        pcap_t *p;
 
-       p = pcap_create_common(device, ebuf, sizeof (struct pcap_nit));
+       p = pcap_create_common(ebuf, sizeof (struct pcap_nit));
        if (p == NULL)
                return (NULL);