libpcap
1.10.1
About: libpcap is a packet filter library used by tools like tcpdump.
![]() ![]() |
#include "varattrs.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <limits.h>
#include <unistd.h>
#include <errno.h>
#include <signal.h>
#include <sys/types.h>
#include <pcap.h>
#include "pcap/funcattrs.h"
Go to the source code of this file.
Macros | |
#define | B_OPTION "b" |
#define | R_OPTION "r" |
#define | S_OPTION "s" |
#define | COMMAND_OPTIONS B_OPTION "i:mn" R_OPTION S_OPTION "t:" |
#define | USAGE_OPTIONS "-" B_OPTION "mn" R_OPTION S_OPTION |
Functions | |
static void | countme (u_char *, const struct pcap_pkthdr *, const u_char *) |
static void | usage (void) |
static void | error (const char *,...) |
static void | warning (const char *,...) |
static char * | copy_argv (char **) |
static void | sigint_handler (int signum) |
int | main (int argc, char **argv) |
static char * | copy_argv (register char **argv) |
Variables | |
static const char | copyright [] |
static char * | program_name |
static pcap_t * | pd |
static int | breaksigint = 0 |
#define B_OPTION "b" |
Definition at line 88 of file capturetest.c.
Definition at line 93 of file capturetest.c.
#define R_OPTION "r" |
Definition at line 89 of file capturetest.c.
#define S_OPTION "s" |
Definition at line 90 of file capturetest.c.
Definition at line 94 of file capturetest.c.
|
static |
Referenced by main().
|
static |
Definition at line 352 of file capturetest.c.
References error().
|
static |
Definition at line 297 of file capturetest.c.
Referenced by main().
|
static |
Definition at line 314 of file capturetest.c.
References program_name.
Referenced by copy_argv(), and main().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 97 of file capturetest.c.
References breaksigint, COMMAND_OPTIONS, copy_argv(), countme(), errno, error(), getopt(), pcap_if::name, optarg, opterr, optind, pcap_activate(), pcap_close(), pcap_compile(), pcap_create(), pcap_dispatch(), PCAP_ERRBUF_SIZE, pcap_findalldevs(), pcap_freealldevs(), pcap_freecode(), pcap_geterr(), pcap_lookupnet(), pcap_set_immediate_mode(), pcap_set_snaplen(), pcap_set_timeout(), pcap_setfilter(), pcap_setnonblock(), pcap_stats(), pcap_statustostr(), pd, printf(), program_name, pcap_stat::ps_drop, pcap_stat::ps_ifdrop, pcap_stat::ps_recv, sigint_handler(), strerror(), strtol(), usage(), and warning().
|
static |
Definition at line 70 of file capturetest.c.
References breaksigint, pcap_breakloop(), and pd.
Referenced by main().
|
static |
Definition at line 305 of file capturetest.c.
References program_name, and USAGE_OPTIONS.
Referenced by main().
|
static |
Definition at line 333 of file capturetest.c.
References program_name.
Referenced by main(), and pcap_nametoport().
|
static |
Definition at line 65 of file capturetest.c.
Referenced by main(), and sigint_handler().
|
static |
Definition at line 25 of file capturetest.c.
|
static |
Definition at line 63 of file capturetest.c.
Referenced by dag_activate(), dag_get_datalink(), dag_platform_cleanup(), dag_read(), dag_setnonblock(), dag_stats(), dlpromiscon(), dpdk_init_timer(), dpdk_read_with_timeout(), main(), nic_stats_display(), pcap_activate_dlpi(), pcap_activate_libdlpi(), pcap_cleanup_dlpi(), pcap_cleanup_dos(), pcap_cleanup_libdlpi(), pcap_create_interface(), pcap_dpdk_activate(), pcap_dpdk_close(), pcap_dpdk_dispatch(), pcap_dpdk_getnonblock(), pcap_dpdk_setnonblock(), pcap_dpdk_stats(), pcap_inject_dlpi(), pcap_inject_libdlpi(), pcap_process_pkts(), pcap_read_libdlpi(), pcap_read_one(), pcap_set_wait(), pcap_stats_dlpi(), pcap_stats_dos(), and sigint_handler().