diff options
author | Guy Harris <guy@alum.mit.edu> | 2012-06-11 13:22:34 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2012-06-11 13:22:34 -0700 |
commit | 2426611584e9099af5f98d18ef37337df9bef025 (patch) | |
tree | 4a79e50330d0f179362445bab756177565991310 /pcap-null.c | |
parent | 4e14566d51233686b7f4563f0a48a11a3f9eb808 (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-null.c')
-rw-r--r-- | pcap-null.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pcap-null.c b/pcap-null.c index 2d271eb4..67373868 100644 --- a/pcap-null.c +++ b/pcap-null.c @@ -40,7 +40,7 @@ static const char rcsid[] _U_ = static char nosup[] = "live packet capture not supported on this system"; pcap_t * -pcap_create(const char *device, char *ebuf) +pcap_create_interface(const char *device, char *ebuf) { (void)strlcpy(ebuf, nosup, PCAP_ERRBUF_SIZE); return (NULL); |