MIO libpcap source initializers. More...
Go to the source code of this file.
Data Structures | |
| struct | _MIOSourcePCapFileConfig |
| libpcap dumpfile source configuration context. More... | |
| struct | _MIOSourcePCapLiveConfig |
| libpcap live source configuration context. More... | |
Macros | |
| #define | mio_pcap(_s_) ((pcap_t *)(_s_)->vsp) |
| Convenience macro to get a source's currently open pcap context. More... | |
Typedefs | |
| typedef struct _MIOSourcePCapFileConfig | MIOSourcePCapFileConfig |
| libpcap dumpfile source configuration context. More... | |
| typedef struct _MIOSourcePCapLiveConfig | MIOSourcePCapLiveConfig |
| libpcap live source configuration context. More... | |
Functions | |
| gboolean | mio_source_init_pcap_dir (MIOSource *source, const char *spec, MIOType vsp_type, void *cfg, GError **err) |
| Initialize a pcap source for reading every libpcap dumpfile from a specified directory. More... | |
| gboolean | mio_source_init_pcap_glob (MIOSource *source, const char *spec, MIOType vsp_type, void *cfg, GError **err) |
| Initialize a pcap source for reading every libpcap dumpfile from a specified glob(3) expression. More... | |
| gboolean | mio_source_init_pcap_single (MIOSource *source, const char *spec, MIOType vsp_type, void *cfg, GError **err) |
| Initialize a pcap source for a single libpcap dumpfile. More... | |
| gboolean | mio_source_init_pcap_stdin (MIOSource *source, const char *spec, MIOType vsp_type, void *cfg, GError **err) |
| Initialize a pcap source for a single libpcap dumpfile read from standard input. More... | |
| gboolean | mio_source_init_pcap_live (MIOSource *source, const char *spec, MIOType vsp_type, void *cfg, GError **err) |
| Initialize a pcap source for live capture from an interface using libpcap. More... | |
MIO libpcap source initializers.
Most applications should use the interface in mio_config.h to access these initializers.
| #define mio_pcap | ( | _s_ | ) | ((pcap_t *)(_s_)->vsp) |
Convenience macro to get a source's currently open pcap context.
Only valid if the source's vsp_type is MIO_T_PCAP.
| typedef struct _MIOSourcePCapFileConfig MIOSourcePCapFileConfig |
libpcap dumpfile source configuration context.
Pass as the cfg argument to any pcap file source initializer.
| typedef struct _MIOSourcePCapLiveConfig MIOSourcePCapLiveConfig |
libpcap live source configuration context.
Pass as the cfg argument to mio_source_init_pcap_live().
| gboolean mio_source_init_pcap_dir | ( | MIOSource * | source, |
| const char * | spec, | ||
| MIOType | vsp_type, | ||
| void * | cfg, | ||
| GError ** | err | ||
| ) |
Initialize a pcap source for reading every libpcap dumpfile from a specified directory.
| source | pointer to MIOSource to initialize. This MIOSource will be overwritten. |
| spec | input specifier to initialize MIOSource with. Must be the pathname of an accessible directory. |
| vsp_type | requested source pointer type, or MIO_T_ANY for default. |
| cfg | pointer to configuration context. Must be a pointer to an MIOSourcePcapFileConfig structure. |
| err | An error description pointer. |
| gboolean mio_source_init_pcap_glob | ( | MIOSource * | source, |
| const char * | spec, | ||
| MIOType | vsp_type, | ||
| void * | cfg, | ||
| GError ** | err | ||
| ) |
Initialize a pcap source for reading every libpcap dumpfile from a specified glob(3) expression.
Fails over to mio_source_init_pcap_single() if the specifier contains no glob expression characters.
| source | pointer to MIOSource to initialize. This MIOSource will be overwritten. |
| spec | input specifier to initialize MIOSource with. Must be a glob expression. |
| vsp_type | requested source pointer type, or MIO_T_ANY for default. |
| cfg | pointer to configuration context. Must be a pointer to an MIOSourcePcapFileConfig structure. |
| err | An error description pointer. |
| gboolean mio_source_init_pcap_live | ( | MIOSource * | source, |
| const char * | spec, | ||
| MIOType | vsp_type, | ||
| void * | cfg, | ||
| GError ** | err | ||
| ) |
Initialize a pcap source for live capture from an interface using libpcap.
Depending on the operating system and configuration, this may require special privileges.
| source | pointer to MIOSource to initialize. This MIOSource will be overwritten. |
| spec | input specifier to initialize MIOSource with. Must be a valid libpcap interface name. |
| vsp_type | requested source pointer type, or MIO_T_ANY for default. |
| cfg | pointer to configuration context. Must be a pointer to an MIOSourcePcapLiveConfig structure. |
| err | An error description pointer. |
| gboolean mio_source_init_pcap_single | ( | MIOSource * | source, |
| const char * | spec, | ||
| MIOType | vsp_type, | ||
| void * | cfg, | ||
| GError ** | err | ||
| ) |
Initialize a pcap source for a single libpcap dumpfile.
Fails over to mio_source_init_pcap_stdin() if specifier is the special string "-".
| source | pointer to MIOSource to initialize. This MIOSource will be overwritten. |
| spec | input specifier to initialize MIOSource with. Must be a filename. |
| vsp_type | requested source pointer type, or MIO_T_ANY for default. |
| cfg | pointer to configuration context. Must be a pointer to an MIOSourcePcapFileConfig structure. |
| err | An error description pointer. |
| gboolean mio_source_init_pcap_stdin | ( | MIOSource * | source, |
| const char * | spec, | ||
| MIOType | vsp_type, | ||
| void * | cfg, | ||
| GError ** | err | ||
| ) |
Initialize a pcap source for a single libpcap dumpfile read from standard input.
| source | pointer to MIOSource to initialize. This MIOSource will be overwritten. |
| spec | input specifier to initialize MIOSource with. Must be the string "-". |
| vsp_type | requested source pointer type, or MIO_T_ANY for default. |
| cfg | pointer to configuration context. Must be a pointer to an MIOSourcePcapFileConfig structure. |
| err | An error description pointer. |