aboutsummaryrefslogtreecommitdiff
path: root/pcap-sita.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2012-06-11 13:22:34 -0700
committerGuy Harris <guy@alum.mit.edu>2012-06-11 13:22:34 -0700
commit2426611584e9099af5f98d18ef37337df9bef025 (patch)
tree4a79e50330d0f179362445bab756177565991310 /pcap-sita.c
parent4e14566d51233686b7f4563f0a48a11a3f9eb808 (diff)
Have non-interface modules take responsibility for identifying their devices.
Have a table of routines to do pcap_create() for devices that aren't regular network interfaces. Try each of those in succession until one says "it's mine" (whether it succeeds or fails); if none do, do a pcap_create() for a regular interface. Have those routines do more stringent tests of the name - don't just accept any name that has a particular substring anywhere in it. That reduces the likelihood of a false match (as happened with the CANbus module when somebody renamed their Ethernet interface "canopy"). Have the table also include routines for pcap_findalldevs().
Diffstat (limited to 'pcap-sita.c')
-rw-r--r--pcap-sita.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pcap-sita.c b/pcap-sita.c
index 971f8b03..4379f2cf 100644
--- a/pcap-sita.c
+++ b/pcap-sita.c
@@ -776,7 +776,7 @@ static int acn_open_live(const char *name, char *errbuf, int *linktype) { /* re
iface_t *p;
pcap_if_t *alldevsp;
- pcap_findalldevs(&alldevsp, errbuf);
+ pcap_findalldevs_interfaces(&alldevsp, errbuf);
for (chassis = 0; chassis <= MAX_CHASSIS; chassis++) { /* scan the table... */
for (geoslot = 0; geoslot <= MAX_GEOSLOT; geoslot++) {
u = &units[chassis][geoslot];
@@ -968,7 +968,7 @@ static int pcap_activate_sita(pcap_t *handle) {
return 0;
}
-pcap_t *pcap_create(const char *device, char *ebuf) {
+pcap_t *pcap_create_interface(const char *device, char *ebuf) {
pcap_t *p;
p = pcap_create_common(device, ebuf);