1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 13:11:28 +00:00

Rename intf_get_pcap_devname to eth_get_pcap_devname to reflect its new home.

This commit is contained in:
david
2008-06-20 20:44:54 +00:00
parent b145c5549d
commit 09cc37f7f0
4 changed files with 5 additions and 4 deletions

View File

@@ -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); ssize_t eth_send(eth_t *e, const void *buf, size_t len);
eth_t *eth_close(eth_t *e); 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); char *eth_ntop(const eth_addr_t *eth, char *dst, size_t len);
int eth_pton(const char *src, eth_addr_t *dst); int eth_pton(const char *src, eth_addr_t *dst);
char *eth_ntoa(const eth_addr_t *eth); char *eth_ntoa(const eth_addr_t *eth);

View File

@@ -60,7 +60,6 @@ intf_t *intf_open(void);
int intf_get(intf_t *i, struct intf_entry *entry); 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_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_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_set(intf_t *i, const struct intf_entry *entry);
int intf_loop(intf_t *i, intf_handler callback, void *arg); int intf_loop(intf_t *i, intf_handler callback, void *arg);
intf_t *intf_close(intf_t *i); intf_t *intf_close(intf_t *i);

View File

@@ -43,7 +43,7 @@ eth_open(const char *device)
eth_t *eth; eth_t *eth;
char pname[128]; 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; return NULL;
if ((eth = calloc(1, sizeof(*eth))) == 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 /* 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. */ 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; int i;
intf_t *intf; intf_t *intf;
struct intf_entry ie; struct intf_entry ie;

View File

@@ -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. // 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 /* 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. */ 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; return false;
// We've got it. Let's add it to the cache // We've got it. Let's add it to the cache