FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
main.c File Reference
+ Include dependency graph for main.c:

Go to the source code of this file.

Data Structures

struct  memif_connection
 
struct  per_thread_data
 
struct  icmpr_main
 

Macros

#define APP_NAME   "ICMP_Responder_mt_v3.1"
 
#define IF_NAME   "memif_connection"
 
#define DBG(...)
 
#define ICMPR_BUFFER_LENGTH   32
 
#define ICMPR_SOCKET_FILENAME_LEN   256
 
#define ICMPR_MEMIF_BUFFER_NUM   256
 

Functions

int add_epoll_fd (int epfd, int fd, uint32_t events)
 
int mod_epoll_fd (int epfd, int fd, uint32_t events)
 
int del_epoll_fd (int epfd, int fd)
 
static int control_fd_update (int fd, uint8_t events, void *private_ctx)
 
static int on_connect (memif_conn_handle_t conn, void *private_ctx)
 
static int on_disconnect (memif_conn_handle_t conn, void *private_ctx)
 
static int on_interrupt (memif_conn_handle_t conn, void *private_ctx, uint16_t qid)
 
int poll_event (memif_per_thread_main_handle_t pt_main, int pcfd, int epfd, int timeout)
 
static void * icmpr_thread_fn (void *data)
 
static void icmpr_print_help ()
 
static void icmpr_show_memifs ()
 
int main (int argc, char **argv)
 

Variables

static struct option options []
 
struct icmpr_main icmpr_main
 

Macro Definition Documentation

◆ APP_NAME

#define APP_NAME   "ICMP_Responder_mt_v3.1"

Definition at line 35 of file main.c.

◆ DBG

#define DBG (   ...)

Definition at line 45 of file main.c.

◆ ICMPR_BUFFER_LENGTH

#define ICMPR_BUFFER_LENGTH   32

Definition at line 48 of file main.c.

◆ ICMPR_MEMIF_BUFFER_NUM

#define ICMPR_MEMIF_BUFFER_NUM   256

Definition at line 50 of file main.c.

◆ ICMPR_SOCKET_FILENAME_LEN

#define ICMPR_SOCKET_FILENAME_LEN   256

Definition at line 49 of file main.c.

◆ IF_NAME

#define IF_NAME   "memif_connection"

Definition at line 36 of file main.c.

Function Documentation

◆ add_epoll_fd()

int add_epoll_fd ( int  epfd,
int  fd,
uint32_t  events 
)

Definition at line 89 of file main.c.

◆ control_fd_update()

static int control_fd_update ( int  fd,
uint8_t  events,
void *  private_ctx 
)
static

Definition at line 151 of file main.c.

+ Here is the call graph for this function:

◆ del_epoll_fd()

int del_epoll_fd ( int  epfd,
int  fd 
)

Definition at line 131 of file main.c.

◆ icmpr_print_help()

static void icmpr_print_help ( )
static

Definition at line 414 of file main.c.

+ Here is the caller graph for this function:

◆ icmpr_show_memifs()

static void icmpr_show_memifs ( )
static

Definition at line 421 of file main.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ icmpr_thread_fn()

static void* icmpr_thread_fn ( void *  data)
static

Definition at line 308 of file main.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 444 of file main.c.

+ Here is the call graph for this function:

◆ mod_epoll_fd()

int mod_epoll_fd ( int  epfd,
int  fd,
uint32_t  events 
)

Definition at line 110 of file main.c.

◆ on_connect()

static int on_connect ( memif_conn_handle_t  conn,
void *  private_ctx 
)
static

Definition at line 175 of file main.c.

+ Here is the call graph for this function:

◆ on_disconnect()

static int on_disconnect ( memif_conn_handle_t  conn,
void *  private_ctx 
)
static

Definition at line 194 of file main.c.

◆ on_interrupt()

static int on_interrupt ( memif_conn_handle_t  conn,
void *  private_ctx,
uint16_t  qid 
)
static

Definition at line 211 of file main.c.

+ Here is the call graph for this function:

◆ poll_event()

int poll_event ( memif_per_thread_main_handle_t  pt_main,
int  pcfd,
int  epfd,
int  timeout 
)

Definition at line 271 of file main.c.

+ Here is the call graph for this function:

Variable Documentation

◆ icmpr_main

Definition at line 86 of file main.c.

◆ options

struct option options[]
static
Initial value:
= {
{"threads", required_argument, 0, 't'},
{"if_num", required_argument, 0, 'i'}
}

Definition at line 52 of file main.c.