FD.io VPP  v17.10-9-gd594711
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_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
 

Functions

static void print_memif_details ()
 
int add_epoll_fd (int fd, uint32_t events)
 
int mod_epoll_fd (int fd, uint32_t events)
 
int del_epoll_fd (int fd)
 
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_buffer_alloc (long index, long n, uint16_t qid)
 
int icmpr_tx_burst (long index, uint16_t qid)
 
int on_interrupt (memif_conn_handle_t conn, void *private_ctx, uint16_t qid)
 
int icmpr_memif_create (long index, long mode)
 
int icmpr_memif_delete (long index)
 
void print_help ()
 
int icmpr_free ()
 
int icmpr_set_ip (long index, char *ip)
 
int icmpr_set_rx_mode (long index, long qid, char *mode)
 
int user_input_handler ()
 
int poll_event (int timeout)
 
int main ()
 

Variables

int epfd
 
memif_connection_t memif_connection [MAX_CONNS]
 
long ctx [MAX_CONNS]
 

Macro Definition Documentation

#define APP_NAME   "ICMP_Responder"

Definition at line 50 of file main.c.

#define DBG (   ...)

Definition at line 61 of file main.c.

#define IF_NAME   "memif_connection"

Definition at line 51 of file main.c.

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

Definition at line 64 of file main.c.

#define MAX_CONNS   50

Definition at line 71 of file main.c.

#define MAX_MEMIF_BUFS   256

Definition at line 70 of file main.c.

Function Documentation

int add_epoll_fd ( int  fd,
uint32_t  events 
)

Definition at line 180 of file main.c.

+ Here is the caller graph for this function:

int control_fd_update ( int  fd,
uint8_t  events 
)

Definition at line 261 of file main.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int del_epoll_fd ( int  fd)

Definition at line 222 of file main.c.

+ Here is the caller graph for this function:

int icmpr_buffer_alloc ( long  index,
long  n,
uint16_t  qid 
)

Definition at line 280 of file main.c.

+ Here is the call graph for this function:

int icmpr_free ( )

Definition at line 501 of file main.c.

+ Here is the call graph for this function:

int icmpr_memif_create ( long  index,
long  mode 
)

Definition at line 381 of file main.c.

+ Here is the call graph for this function:

int icmpr_memif_delete ( long  index)

Definition at line 440 of file main.c.

+ Here is the call graph for this function:

int icmpr_set_ip ( long  index,
char *  ip 
)

Definition at line 521 of file main.c.

+ Here is the caller graph for this function:

int icmpr_set_rx_mode ( long  index,
long  qid,
char *  mode 
)

Definition at line 579 of file main.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int icmpr_tx_burst ( long  index,
uint16_t  qid 
)

Definition at line 300 of file main.c.

+ Here is the call graph for this function:

int main ( )

Definition at line 761 of file main.c.

+ Here is the call graph for this function:

int mod_epoll_fd ( int  fd,
uint32_t  events 
)

Definition at line 201 of file main.c.

+ Here is the caller graph for this function:

int on_connect ( memif_conn_handle_t  conn,
void *  private_ctx 
)

Definition at line 243 of file main.c.

int on_disconnect ( memif_conn_handle_t  conn,
void *  private_ctx 
)

Definition at line 252 of file main.c.

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

Definition at line 318 of file main.c.

+ Here is the call graph for this function:

int poll_event ( int  timeout)

Definition at line 705 of file main.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void print_help ( )

Definition at line 474 of file main.c.

static void print_memif_details ( )
static

Definition at line 99 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 614 of file main.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

long ctx[MAX_CONNS]

Definition at line 95 of file main.c.

int epfd

Definition at line 73 of file main.c.

Definition at line 94 of file main.c.