FD.io VPP  v18.01.2-1-g9b554f3
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_thread_data_t
 
struct  memif_connection_t
 

Macros

#define APP_NAME   "ICMP_Responder"
 
#define IF_NAME   "memif_connection"
 
#define DBG(...)
 
#define INFO(...)
 
#define MAX_MEMIF_BUFS   256
 
#define MAX_CONNS   50
 
#define MAX_QUEUES   2
 
#define MAX_THREADS   ((MAX_CONNS) * (MAX_QUEUES))
 

Functions

void user_signal_handler (int sig)
 
static void print_memif_details ()
 
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)
 
void * memif_rx_poll (void *ptr)
 
void * memif_rx_interrupt (void *ptr)
 
int on_connect (memif_conn_handle_t conn, void *private_ctx)
 
int on_disconnect (memif_conn_handle_t conn, void *private_ctx)
 
int control_fd_update (int fd, uint8_t events)
 
int icmpr_memif_create (long index)
 
int icmpr_memif_delete (long index)
 
void print_help ()
 
int icmpr_free ()
 
int icmpr_set_ip (long index, char *ip)
 
int user_input_handler ()
 
int poll_event (int timeout)
 
int main ()
 

Variables

int main_epfd
 
memif_connection_t memif_connection [MAX_CONNS]
 
long ctx [MAX_CONNS]
 
memif_thread_data_t thread_data [MAX_THREADS]
 
pthread_t thread [MAX_THREADS]
 

Macro Definition Documentation

#define APP_NAME   "ICMP_Responder"

Definition at line 51 of file main.c.

#define DBG (   ...)

Definition at line 62 of file main.c.

#define IF_NAME   "memif_connection"

Definition at line 52 of file main.c.

#define INFO (   ...)
Value:
do { \
printf ("INFO: "__VA_ARGS__); \
printf ("\n"); \
} while (0)

Definition at line 65 of file main.c.

#define MAX_CONNS   50

Definition at line 72 of file main.c.

#define MAX_MEMIF_BUFS   256

Definition at line 71 of file main.c.

#define MAX_QUEUES   2

Definition at line 73 of file main.c.

#define MAX_THREADS   ((MAX_CONNS) * (MAX_QUEUES))

Definition at line 74 of file main.c.

Function Documentation

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

Definition at line 208 of file main.c.

int control_fd_update ( int  fd,
uint8_t  events 
)

Definition at line 571 of file main.c.

+ Here is the call graph for this function:

int del_epoll_fd ( int  epfd,
int  fd 
)

Definition at line 250 of file main.c.

int icmpr_free ( )

Definition at line 689 of file main.c.

+ Here is the call graph for this function:

int icmpr_memif_create ( long  index)

Definition at line 590 of file main.c.

+ Here is the call graph for this function:

int icmpr_memif_delete ( long  index)

Definition at line 642 of file main.c.

+ Here is the call graph for this function:

int icmpr_set_ip ( long  index,
char *  ip 
)

Definition at line 709 of file main.c.

int main ( )

Definition at line 889 of file main.c.

+ Here is the call graph for this function:

void* memif_rx_interrupt ( void *  ptr)

Definition at line 372 of file main.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void* memif_rx_poll ( void *  ptr)

Definition at line 269 of file main.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 229 of file main.c.

int on_connect ( memif_conn_handle_t  conn,
void *  private_ctx 
)

Definition at line 507 of file main.c.

+ Here is the call graph for this function:

int on_disconnect ( memif_conn_handle_t  conn,
void *  private_ctx 
)

Definition at line 547 of file main.c.

int poll_event ( int  timeout)

Definition at line 833 of file main.c.

+ Here is the call graph for this function:

void print_help ( )

Definition at line 665 of file main.c.

static void print_memif_details ( )
static

Definition at line 119 of file main.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int user_input_handler ( )

Definition at line 768 of file main.c.

+ Here is the call graph for this function:

void user_signal_handler ( int  sig)

Definition at line 113 of file main.c.

+ Here is the caller graph for this function:

Variable Documentation

long ctx[MAX_CONNS]

Definition at line 106 of file main.c.

int main_epfd

Definition at line 76 of file main.c.

Definition at line 105 of file main.c.

pthread_t thread[MAX_THREADS]

Definition at line 110 of file main.c.

Definition at line 109 of file main.c.