FD.io VPP  v20.09-64-g4f7b92f0a
Vector Packet Processing
mc_socket.c File Reference
+ Include dependency graph for mc_socket.c:

Go to the source code of this file.

Typedefs

typedef void() mc_msg_handler_t(mc_main_t *mcm, void *msg, u32 buffer_index)
 

Functions

static u8format_socket_peer_id (u8 *s, va_list *args)
 
static void msg_handler (mc_main_t *mcm, u32 buffer_index, u32 handler_frees_buffer, void *_h)
 
static uword append_buffer_index_to_iovec (vlib_main_t *vm, u32 buffer_index, struct iovec **iovs_return)
 
static clib_error_tsendmsg_helper (mc_socket_main_t *msm, int socket, struct sockaddr_in *tx_addr, u32 buffer_index)
 
static clib_error_ttx_buffer (void *transport, mc_transport_type_t type, u32 buffer_index)
 
static clib_error_ttx_ack (void *transport, mc_peer_id_t dest_peer_id, u32 buffer_index)
 
static clib_error_trecvmsg_helper (mc_socket_main_t *msm, int socket, struct sockaddr_in *rx_addr, u32 *buffer_index, u32 drop_message)
 
static clib_error_tmastership_socket_read_ready (clib_file_t *uf)
 
static clib_error_tto_relay_socket_read_ready (clib_file_t *uf)
 
static clib_error_tfrom_relay_socket_read_ready (clib_file_t *uf)
 
static clib_error_tjoin_socket_read_ready (clib_file_t *uf)
 
static clib_error_tack_socket_read_ready (clib_file_t *uf)
 
static void catchup_cleanup (mc_socket_main_t *msm, mc_socket_catchup_t *c, clib_file_main_t *um, clib_file_t *uf)
 
static mc_socket_catchup_tfind_catchup_from_file_descriptor (mc_socket_main_t *msm, int file_descriptor)
 
static clib_error_tcatchup_socket_read_ready (clib_file_t *uf, int is_server)
 
static clib_error_tcatchup_server_read_ready (clib_file_t *uf)
 
static clib_error_tcatchup_client_read_ready (clib_file_t *uf)
 
static clib_error_tcatchup_socket_write_ready (clib_file_t *uf, int is_server)
 
static clib_error_tcatchup_server_write_ready (clib_file_t *uf)
 
static clib_error_tcatchup_client_write_ready (clib_file_t *uf)
 
static clib_error_tcatchup_socket_error_ready (clib_file_t *uf)
 
static clib_error_tcatchup_listen_read_ready (clib_file_t *uf)
 
static word find_and_bind_to_free_port (word sock, word port)
 
static clib_error_tsetup_mutlicast_socket (mc_socket_main_t *msm, mc_multicast_socket_t *ms, char *type, uword udp_port)
 
static clib_error_tsocket_setup (mc_socket_main_t *msm)
 
static void * catchup_add_pending_output (mc_socket_catchup_t *c, uword n_bytes, u8 *set_output_vector)
 
static uword catchup_request_fun (void *transport_main, u32 stream_index, mc_peer_id_t catchup_peer_id)
 
static void catchup_send_fun (void *transport_main, uword opaque, u8 *data)
 
static int find_interface_ip4_address (char *if_name, u32 *ip4_address, u32 *mtu)
 
clib_error_tmc_socket_main_init (mc_socket_main_t *msm, char **intfc_probe_list, int n_intfcs_to_probe)
 

Typedef Documentation

◆ mc_msg_handler_t

typedef void() mc_msg_handler_t(mc_main_t *mcm, void *msg, u32 buffer_index)

Definition at line 39 of file mc_socket.c.

Function Documentation

◆ ack_socket_read_ready()

static clib_error_t* ack_socket_read_ready ( clib_file_t uf)
static

Definition at line 357 of file mc_socket.c.

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

◆ append_buffer_index_to_iovec()

static uword append_buffer_index_to_iovec ( vlib_main_t vm,
u32  buffer_index,
struct iovec **  iovs_return 
)
static

Definition at line 57 of file mc_socket.c.

+ Here is the call graph for this function:

◆ catchup_add_pending_output()

static void* catchup_add_pending_output ( mc_socket_catchup_t c,
uword  n_bytes,
u8 set_output_vector 
)
static

Definition at line 821 of file mc_socket.c.

+ Here is the caller graph for this function:

◆ catchup_cleanup()

static void catchup_cleanup ( mc_socket_main_t msm,
mc_socket_catchup_t c,
clib_file_main_t um,
clib_file_t uf 
)
static

Definition at line 373 of file mc_socket.c.

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

◆ catchup_client_read_ready()

static clib_error_t* catchup_client_read_ready ( clib_file_t uf)
static

Definition at line 450 of file mc_socket.c.

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

◆ catchup_client_write_ready()

static clib_error_t* catchup_client_write_ready ( clib_file_t uf)
static

Definition at line 547 of file mc_socket.c.

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

◆ catchup_listen_read_ready()

static clib_error_t* catchup_listen_read_ready ( clib_file_t uf)
static

Definition at line 564 of file mc_socket.c.

+ Here is the caller graph for this function:

◆ catchup_request_fun()

static uword catchup_request_fun ( void *  transport_main,
u32  stream_index,
mc_peer_id_t  catchup_peer_id 
)
static

Definition at line 843 of file mc_socket.c.

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

◆ catchup_send_fun()

static void catchup_send_fun ( void *  transport_main,
uword  opaque,
u8 data 
)
static

Definition at line 925 of file mc_socket.c.

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

◆ catchup_server_read_ready()

static clib_error_t* catchup_server_read_ready ( clib_file_t uf)
static

Definition at line 444 of file mc_socket.c.

+ Here is the call graph for this function:

◆ catchup_server_write_ready()

static clib_error_t* catchup_server_write_ready ( clib_file_t uf)
static

Definition at line 541 of file mc_socket.c.

+ Here is the call graph for this function:

◆ catchup_socket_error_ready()

static clib_error_t* catchup_socket_error_ready ( clib_file_t uf)
static

Definition at line 553 of file mc_socket.c.

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

◆ catchup_socket_read_ready()

static clib_error_t* catchup_socket_read_ready ( clib_file_t uf,
int  is_server 
)
static

Definition at line 394 of file mc_socket.c.

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

◆ catchup_socket_write_ready()

static clib_error_t* catchup_socket_write_ready ( clib_file_t uf,
int  is_server 
)
static

Definition at line 464 of file mc_socket.c.

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

◆ find_and_bind_to_free_port()

static word find_and_bind_to_free_port ( word  sock,
word  port 
)
static

Definition at line 629 of file mc_socket.c.

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

◆ find_catchup_from_file_descriptor()

static mc_socket_catchup_t* find_catchup_from_file_descriptor ( mc_socket_main_t msm,
int  file_descriptor 
)
static

Definition at line 385 of file mc_socket.c.

+ Here is the caller graph for this function:

◆ find_interface_ip4_address()

static int find_interface_ip4_address ( char *  if_name,
u32 ip4_address,
u32 mtu 
)
static

Definition at line 933 of file mc_socket.c.

+ Here is the caller graph for this function:

◆ format_socket_peer_id()

static u8* format_socket_peer_id ( u8 s,
va_list *  args 
)
static

Definition at line 26 of file mc_socket.c.

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

◆ from_relay_socket_read_ready()

static clib_error_t* from_relay_socket_read_ready ( clib_file_t uf)
static

Definition at line 300 of file mc_socket.c.

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

◆ join_socket_read_ready()

static clib_error_t* join_socket_read_ready ( clib_file_t uf)
static

Definition at line 320 of file mc_socket.c.

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

◆ mastership_socket_read_ready()

static clib_error_t* mastership_socket_read_ready ( clib_file_t uf)
static

Definition at line 246 of file mc_socket.c.

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

◆ mc_socket_main_init()

clib_error_t* mc_socket_main_init ( mc_socket_main_t msm,
char **  intfc_probe_list,
int  n_intfcs_to_probe 
)

Definition at line 973 of file mc_socket.c.

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

◆ msg_handler()

static void msg_handler ( mc_main_t *  mcm,
u32  buffer_index,
u32  handler_frees_buffer,
void *  _h 
)
inlinestatic

Definition at line 43 of file mc_socket.c.

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

◆ recvmsg_helper()

static clib_error_t* recvmsg_helper ( mc_socket_main_t msm,
int  socket,
struct sockaddr_in *  rx_addr,
u32 buffer_index,
u32  drop_message 
)
static

Definition at line 160 of file mc_socket.c.

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

◆ sendmsg_helper()

static clib_error_t* sendmsg_helper ( mc_socket_main_t msm,
int  socket,
struct sockaddr_in *  tx_addr,
u32  buffer_index 
)
static

Definition at line 81 of file mc_socket.c.

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

◆ setup_mutlicast_socket()

static clib_error_t* setup_mutlicast_socket ( mc_socket_main_t msm,
mc_multicast_socket_t ms,
char *  type,
uword  udp_port 
)
static

Definition at line 649 of file mc_socket.c.

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

◆ socket_setup()

static clib_error_t* socket_setup ( mc_socket_main_t msm)
static

Definition at line 711 of file mc_socket.c.

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

◆ to_relay_socket_read_ready()

static clib_error_t* to_relay_socket_read_ready ( clib_file_t uf)
static

Definition at line 266 of file mc_socket.c.

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

◆ tx_ack()

static clib_error_t* tx_ack ( void *  transport,
mc_peer_id_t  dest_peer_id,
u32  buffer_index 
)
static

Definition at line 142 of file mc_socket.c.

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

◆ tx_buffer()

static clib_error_t* tx_buffer ( void *  transport,
mc_transport_type_t  type,
u32  buffer_index 
)
static

Definition at line 129 of file mc_socket.c.

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