#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <assert.h>
#include <net/if.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <poll.h>
#include <unistd.h>
#include <signal.h>
#include <inttypes.h>
#include <sys/socket.h>
#include <sys/mman.h>
#include <linux/if_packet.h>
#include <linux/if_ether.h>
#include <linux/ip.h>
Go to the source code of this file.
|
#define | likely(x) __builtin_expect(!!(x), 1) |
|
#define | unlikely(x) __builtin_expect(!!(x), 0) |
|
◆ likely
#define likely |
( |
|
x | ) |
__builtin_expect(!!(x), 1) |
◆ unlikely
#define unlikely |
( |
|
x | ) |
__builtin_expect(!!(x), 0) |
◆ display()
static void display |
( |
tpacket3_hdr * |
ppd | ) |
|
|
static |
◆ flush_block()
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argp |
|
) |
| |
◆ setup_socket()
static int setup_socket |
( |
ring * |
ring, |
|
|
char * |
netdev |
|
) |
| |
|
static |
◆ sighandler()
static void sighandler |
( |
int |
| ) |
|
|
static |
◆ teardown_socket()
static void teardown_socket |
( |
ring * |
ring, |
|
|
int |
fd |
|
) |
| |
|
static |
◆ walk_block()
static void walk_block |
( |
block_desc * |
pbd, |
|
|
const int |
|
|
) |
| |
|
static |
◆ bytes_total
unsigned long bytes_total = 0 |
|
static |
◆ packets_total
unsigned long packets_total = 0 |
|
static |
◆ sigint