|
The Assimilation Monitoring Project
|
Simple libpcap interface definitions. More...


Go to the source code of this file.
Macros | |
| #define | ENABLE_LLDP 0x1 |
| Enable LLDP protocol. More... | |
| #define | ENABLE_CDP 0x2 |
| Enable CDP protocol. More... | |
Functions | |
| WINEXPORT pcap_t * | create_pcap_listener (const char *dev, gboolean blocking, unsigned listenmask, struct bpf_program *) |
| Set up pcap listener for the given interfaces and protocols. More... | |
| WINEXPORT void | close_pcap_listener (pcap_t *, const char *dev, unsigned listenmask) |
| Close this pcap_listener, and undo listens for multicast addresses. More... | |
Simple libpcap interface definitions.
Creates a libpcap pcap_t listener for the given set of protocols. This is a much higher level, but much less flexible approach than the native libpcap interface.
This file is part of the Assimilation Project.
The Assimilation software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with the Assimilation Project software. If not, see http://www.gnu.org/licenses/
Definition in file pcap_min.h.
| WINEXPORT void close_pcap_listener | ( | pcap_t * | , |
| const char * | dev, | ||
| unsigned | listenmask | ||
| ) |
Close this pcap_listener, and undo listens for multicast addresses.
| dev | device that this is opened on |
| listenmask | The 'listenmask' given to create_pcap_listener |
Definition at line 190 of file pcap_min.c.
References _enable_mcast_address(), and DIMOF.
Referenced by create_pcap_listener(), and g_source_pcap_finalize().


| WINEXPORT pcap_t* create_pcap_listener | ( | const char * | dev, |
| gboolean | blocking, | ||
| unsigned | listenmask, | ||
| struct bpf_program * | prog | ||
| ) |
Set up pcap listener for the given interfaces and protocols.
| [in] | dev | Device name to listen on |
| [in] | blocking | TRUE if this is a blocking connection |
| [in] | listenmask | Bit mask of protocols to listen for (see list of valid bits) |
| [out] | prog | Compiled PCAP program |
Definition at line 64 of file pcap_min.c.
References _enable_mcast_address(), BINDDEBUG, close_pcap_listener(), DEBUGMSG1, DIMOF, and cma.cma::rc.
Referenced by g_source_pcap_new().

