| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Make it
if (case 1)
type = type 1;
else if (case 2)
type = type 2;
and indent it a bit more clearly.
|
| |
|
|
|
|
|
| |
"private" is a C++ keyword; rename the "private" member of a pcap_t to
"priv" to avoid that, as per Gisle Vanem's suggestion.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Put the private data right after the pcap_t structure, with a pointer to
it in the pcap_t.
The initial goal is to allow new pcap modules to be added without having
to hack pcap-int.h.
In the longer term, we may want to freeze the pcap_t structure, except
possibly for adding new method pointers at the end, and provide an ABI
for adding modules.
We also put the stuff used by the read path at the beginning of the
pcap_t structure, to try to keep it on the same set of cache lines.
|
|
|
|
| |
It's almost like nflog but with different structures/constants.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
|
| |
Check for EPROTONOSUPPORT as well as EAFNOSUPPORT.
Reviewed-By: Guy Harris <guy@alum.mit.edu>
|
|
|
|
|
| |
That way, the same declarations are used in the file that defines the
functions and the files that use them, so we actually do type checking.
|
|
|
|
| |
Reviewed-And-Tweaked-By: Guy Harris <guy@alum.mit.edu>
|
|
Reviewed-By: Guy Harris <guy@alum.mit.edu>
|