FD.io VPP  v19.08-23-g4b943d6
Vector Packet Processing
udp_echo.c File Reference
+ Include dependency graph for udp_echo.c:

Go to the source code of this file.

Data Structures

struct  udp_echo_main_t
 

Macros

#define vl_typedefs   /* define message structures */
 
#define vl_endianfun   /* define message structures */
 
#define vl_print(handle, ...)
 
#define vl_printfun
 
#define TIMEOUT   600.0
 
#define foreach_tcp_echo_msg
 
#define vl_api_version(n, v)   static u32 vpe_api_version = v;
 

Enumerations

enum  connection_state_t {
  STATE_START, STATE_ATTACHED, STATE_LISTEN, STATE_READY,
  STATE_DATA_DONE, STATE_DISCONNECTED, STATE_DETACHED, STATE_START,
  STATE_ATTACHED, STATE_LISTEN, STATE_READY, STATE_DISCONNECTING,
  STATE_FAILED, STATE_DETACHED, STATE_START, STATE_ATTACHED,
  STATE_BOUND, STATE_READY, STATE_FAILED, STATE_DISCONNECTING,
  STATE_DETACHED
}
 

Functions

static void stop_signal (int signum)
 
static void stats_signal (int signum)
 
static clib_error_tsetup_signal_handlers (void)
 
uword unformat_ip4_address (unformat_input_t *input, va_list *args)
 
uword unformat_ip6_address (unformat_input_t *input, va_list *args)
 
uword unformat_uri (unformat_input_t *input, va_list *args)
 
static void application_send_attach (udp_echo_main_t *utm)
 
void application_detach (udp_echo_main_t *utm)
 
static void vl_api_application_attach_reply_t_handler (vl_api_application_attach_reply_t *mp)
 
static void vl_api_application_detach_reply_t_handler (vl_api_application_detach_reply_t *mp)
 
u8format_api_error (u8 *s, va_list *args)
 
int wait_for_state_change (udp_echo_main_t *utm, connection_state_t state)
 
static __clib_unused void * cut_through_thread_fn (void *arg)
 
static void session_accepted_handler (session_accepted_msg_t *mp)
 
static void session_disconnected_handler (session_disconnected_msg_t *mp)
 
static void session_connected_handler (session_connected_msg_t *mp)
 
static void session_bound_handler (session_bound_msg_t *mp)
 
static void handle_mq_event (session_event_t *e)
 
static void udp_client_send_connect (udp_echo_main_t *utm)
 
static void send_test_chunk (udp_echo_main_t *utm, app_session_t *s, u32 bytes)
 
static void recv_test_chunk (udp_echo_main_t *utm, app_session_t *s)
 
void client_send_data (udp_echo_main_t *utm, u32 session_index)
 
static int application_attach (udp_echo_main_t *utm)
 
static void client_test (udp_echo_main_t *utm)
 
static void vl_api_map_another_segment_t_handler (vl_api_map_another_segment_t *mp)
 
static void vl_api_unmap_segment_t_handler (vl_api_unmap_segment_t *mp)
 
static void vl_api_unbind_uri_reply_t_handler (vl_api_unbind_uri_reply_t *mp)
 
static void vl_api_app_cut_through_registration_add_t_handler (vl_api_app_cut_through_registration_add_t *mp)
 
void tcp_echo_api_hookup (udp_echo_main_t *utm)
 
int connect_to_vpp (char *name)
 
void vlib_cli_output (struct vlib_main_t *vm, char *fmt,...)
 
static void init_error_string_table (udp_echo_main_t *utm)
 
void server_handle_fifo_event_rx (udp_echo_main_t *utm, u32 session_index)
 
static void server_handle_event_queue (udp_echo_main_t *utm)
 
static void server_unbind (udp_echo_main_t *utm)
 
static void server_bind (udp_echo_main_t *utm)
 
void udp_server_test (udp_echo_main_t *utm)
 
int main (int argc, char **argv)
 
void vl_client_add_api_signatures (vl_api_memclnt_create_t *mp)
 
u32 vl (void *p)
 

Variables

udp_echo_main_t udp_echo_main
 
u64 server_bytes_received
 
u64 server_bytes_sent
 

Macro Definition Documentation

#define foreach_tcp_echo_msg
Value:
_(UNBIND_URI_REPLY, unbind_uri_reply) \
_(MAP_ANOTHER_SEGMENT, map_another_segment) \
_(UNMAP_SEGMENT, unmap_segment) \
_(APPLICATION_ATTACH_REPLY, application_attach_reply) \
_(APPLICATION_DETACH_REPLY, application_detach_reply) \
_(APP_CUT_THROUGH_REGISTRATION_ADD, app_cut_through_registration_add) \

Definition at line 906 of file udp_echo.c.

#define TIMEOUT   600.0
#define vl_api_version (   n,
 
)    static u32 vpe_api_version = v;

Definition at line 1230 of file udp_echo.c.

#define vl_endianfun   /* define message structures */

Definition at line 40 of file udp_echo.c.

#define vl_print (   handle,
  ... 
)

Definition at line 45 of file udp_echo.c.

#define vl_printfun

Definition at line 46 of file udp_echo.c.

#define vl_typedefs   /* define message structures */

Definition at line 34 of file udp_echo.c.

Enumeration Type Documentation

Enumerator
STATE_START 
STATE_ATTACHED 
STATE_LISTEN 
STATE_READY 
STATE_DATA_DONE 
STATE_DISCONNECTED 
STATE_DETACHED 
STATE_START 
STATE_ATTACHED 
STATE_LISTEN 
STATE_READY 
STATE_DISCONNECTING 
STATE_FAILED 
STATE_DETACHED 
STATE_START 
STATE_ATTACHED 
STATE_BOUND 
STATE_READY 
STATE_FAILED 
STATE_DISCONNECTING 
STATE_DETACHED 

Definition at line 50 of file udp_echo.c.

Function Documentation

static int application_attach ( udp_echo_main_t utm)
static

Definition at line 795 of file udp_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void application_detach ( udp_echo_main_t utm)

Definition at line 321 of file udp_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void application_send_attach ( udp_echo_main_t utm)
static

Definition at line 299 of file udp_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void client_send_data ( udp_echo_main_t utm,
u32  session_index 
)

Definition at line 745 of file udp_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void client_test ( udp_echo_main_t utm)
static

Definition at line 807 of file udp_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int connect_to_vpp ( char *  name)

Definition at line 930 of file udp_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static __clib_unused void* cut_through_thread_fn ( void *  arg)
static

Definition at line 423 of file udp_echo.c.

+ Here is the call graph for this function:

u8* format_api_error ( u8 s,
va_list *  args 
)

Definition at line 384 of file udp_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void handle_mq_event ( session_event_t *  e)
static

Definition at line 678 of file udp_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void init_error_string_table ( udp_echo_main_t utm)
static

Definition at line 951 of file udp_echo.c.

+ Here is the caller graph for this function:

int main ( int  argc,
char **  argv 
)

Definition at line 1124 of file udp_echo.c.

+ Here is the call graph for this function:

static void recv_test_chunk ( udp_echo_main_t utm,
app_session_t s 
)
static

Definition at line 739 of file udp_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void send_test_chunk ( udp_echo_main_t utm,
app_session_t s,
u32  bytes 
)
static

Definition at line 714 of file udp_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void server_bind ( udp_echo_main_t utm)
static

Definition at line 1078 of file udp_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void server_handle_event_queue ( udp_echo_main_t utm)
static

Definition at line 1025 of file udp_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void server_handle_fifo_event_rx ( udp_echo_main_t utm,
u32  session_index 
)

Definition at line 963 of file udp_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void server_unbind ( udp_echo_main_t utm)
static

Definition at line 1064 of file udp_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void session_accepted_handler ( session_accepted_msg_t mp)
static

Definition at line 488 of file udp_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void session_bound_handler ( session_bound_msg_t mp)
static

Definition at line 643 of file udp_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void session_connected_handler ( session_connected_msg_t mp)
static

Definition at line 577 of file udp_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void session_disconnected_handler ( session_disconnected_msg_t mp)
static

Definition at line 543 of file udp_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* setup_signal_handlers ( void  )
static

Definition at line 154 of file udp_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void stats_signal ( int  signum)
static

Definition at line 147 of file udp_echo.c.

+ Here is the caller graph for this function:

static void stop_signal ( int  signum)
static

Definition at line 139 of file udp_echo.c.

+ Here is the caller graph for this function:

void tcp_echo_api_hookup ( udp_echo_main_t utm)

Definition at line 915 of file udp_echo.c.

+ Here is the caller graph for this function:

static void udp_client_send_connect ( udp_echo_main_t utm)
static

Definition at line 700 of file udp_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void udp_server_test ( udp_echo_main_t utm)

Definition at line 1093 of file udp_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword unformat_ip4_address ( unformat_input_t input,
va_list *  args 
)

Definition at line 164 of file udp_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword unformat_ip6_address ( unformat_input_t input,
va_list *  args 
)

Definition at line 184 of file udp_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword unformat_uri ( unformat_input_t input,
va_list *  args 
)

Definition at line 275 of file udp_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 vl ( void *  p)

Definition at line 1245 of file udp_echo.c.

static void vl_api_app_cut_through_registration_add_t_handler ( vl_api_app_cut_through_registration_add_t mp)
static

Definition at line 901 of file udp_echo.c.

+ Here is the caller graph for this function:

static void vl_api_application_attach_reply_t_handler ( vl_api_application_attach_reply_t mp)
static

Definition at line 334 of file udp_echo.c.

+ Here is the call graph for this function:

static void vl_api_application_detach_reply_t_handler ( vl_api_application_detach_reply_t *  mp)
static

Definition at line 375 of file udp_echo.c.

static void vl_api_map_another_segment_t_handler ( vl_api_map_another_segment_t mp)
static

Definition at line 840 of file udp_echo.c.

+ Here is the call graph for this function:

static void vl_api_unbind_uri_reply_t_handler ( vl_api_unbind_uri_reply_t *  mp)
static

Definition at line 889 of file udp_echo.c.

+ Here is the call graph for this function:

static void vl_api_unmap_segment_t_handler ( vl_api_unmap_segment_t mp)
static

Definition at line 867 of file udp_echo.c.

+ Here is the call graph for this function:

void vl_client_add_api_signatures ( vl_api_memclnt_create_t mp)

Definition at line 1235 of file udp_echo.c.

void vlib_cli_output ( struct vlib_main_t vm,
char *  fmt,
  ... 
)

Definition at line 945 of file udp_echo.c.

+ Here is the call graph for this function:

int wait_for_state_change ( udp_echo_main_t utm,
connection_state_t  state 
)

Definition at line 400 of file udp_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

u64 server_bytes_received

Definition at line 420 of file udp_echo.c.

u64 server_bytes_sent

Definition at line 420 of file udp_echo.c.

udp_echo_main_t udp_echo_main

Definition at line 136 of file udp_echo.c.