diff --git a/libdnet-stripped/include/dnet/eth.h b/libdnet-stripped/include/dnet/eth.h index 4a0ccd030..fde91c3ff 100644 --- a/libdnet-stripped/include/dnet/eth.h +++ b/libdnet-stripped/include/dnet/eth.h @@ -68,6 +68,8 @@ int eth_set(eth_t *e, const eth_addr_t *ea); ssize_t eth_send(eth_t *e, const void *buf, size_t len); eth_t *eth_close(eth_t *e); +int eth_get_pcap_devname(const char *ifname, char *pcapdev, int pcapdevlen); + char *eth_ntop(const eth_addr_t *eth, char *dst, size_t len); int eth_pton(const char *src, eth_addr_t *dst); char *eth_ntoa(const eth_addr_t *eth); diff --git a/libdnet-stripped/include/dnet/intf.h b/libdnet-stripped/include/dnet/intf.h index 778fed900..25499947e 100644 --- a/libdnet-stripped/include/dnet/intf.h +++ b/libdnet-stripped/include/dnet/intf.h @@ -60,7 +60,6 @@ intf_t *intf_open(void); int intf_get(intf_t *i, struct intf_entry *entry); int intf_get_src(intf_t *i, struct intf_entry *entry, struct addr *src); int intf_get_dst(intf_t *i, struct intf_entry *entry, struct addr *dst); -int intf_get_pcap_devname(const char *ifname, char *pcapdev, int pcapdevlen); int intf_set(intf_t *i, const struct intf_entry *entry); int intf_loop(intf_t *i, intf_handler callback, void *arg); intf_t *intf_close(intf_t *i); diff --git a/libdnet-stripped/src/eth-win32.c b/libdnet-stripped/src/eth-win32.c index dbb05dbf8..7a1b9b9ce 100644 --- a/libdnet-stripped/src/eth-win32.c +++ b/libdnet-stripped/src/eth-win32.c @@ -43,7 +43,7 @@ eth_open(const char *device) eth_t *eth; char pname[128]; - if (intf_get_pcap_devname(device, pname, sizeof(pname)) != 0) + if (eth_get_pcap_devname(device, pname, sizeof(pname)) != 0) return NULL; if ((eth = calloc(1, sizeof(*eth))) == NULL) @@ -118,7 +118,7 @@ eth_set(eth_t *eth, const eth_addr_t *ea) /* Converts a dnet interface name (ifname) to its pcap equivalent, which is stored in pcapdev (up to a length of pcapdevlen). Returns 0 and fills in pcapdev if successful. */ -int intf_get_pcap_devname(const char *ifname, char *pcapdev, int pcapdevlen) { +int eth_get_pcap_devname(const char *ifname, char *pcapdev, int pcapdevlen) { int i; intf_t *intf; struct intf_entry ie; diff --git a/tcpip.cc b/tcpip.cc index e919b651d..ea9a5e6e9 100644 --- a/tcpip.cc +++ b/tcpip.cc @@ -928,7 +928,7 @@ bool DnetName2PcapName(const char *dnetdev, char *pcapdev, int pcapdevlen) { // OK, so it isn't in the cache. Let's ask dnet for it. /* Converts a dnet interface name (ifname) to its pcap equivalent, which is stored in pcapdev (up to a length of pcapdevlen). Returns 0 and fills in pcapdev if successful. */ - if (intf_get_pcap_devname(dnetdev, tmpdev, sizeof(tmpdev)) != 0) + if (eth_get_pcap_devname(dnetdev, tmpdev, sizeof(tmpdev)) != 0) return false; // We've got it. Let's add it to the cache