FD.io VPP  v18.01.2-1-g9b554f3
Vector Packet Processing
transport.c File Reference
+ Include dependency graph for transport.c:

Go to the source code of this file.

Macros

#define PORT_MASK   ((1 << 16)- 1)
 

Functions

u8format_transport_proto (u8 *s, va_list *args)
 
u8format_transport_proto_short (u8 *s, va_list *args)
 
uword unformat_transport_proto (unformat_input_t *input, va_list *args)
 
u32 transport_endpoint_lookup (transport_endpoint_table_t *ht, u8 proto, ip46_address_t *ip, u16 port)
 
void transport_endpoint_table_add (transport_endpoint_table_t *ht, u8 proto, transport_endpoint_t *te, u32 value)
 
void transport_endpoint_table_del (transport_endpoint_table_t *ht, u8 proto, transport_endpoint_t *te)
 
void transport_register_protocol (transport_proto_t transport_proto, const transport_proto_vft_t *vft, fib_protocol_t fib_proto, u32 output_node)
 Register transport virtual function table. More...
 
transport_proto_vft_ttransport_protocol_get_vft (transport_proto_t transport_proto)
 Get transport virtual function table. More...
 
void transport_endpoint_del (u32 tepi)
 
static transport_endpoint_ttransport_endpoint_new (void)
 
void transport_endpoint_cleanup (u8 proto, ip46_address_t *lcl_ip, u16 port)
 
int transport_alloc_local_port (u8 proto, ip46_address_t *ip)
 Allocate local port and add if successful add entry to local endpoint table to mark the pair as used. More...
 
int transport_alloc_local_endpoint (u8 proto, transport_endpoint_t *rmt, ip46_address_t *lcl_addr, u16 *lcl_port)
 
void transport_update_time (f64 time_now, u8 thread_index)
 
void transport_enable_disable (vlib_main_t *vm, u8 is_en)
 
void transport_init (void)
 

Variables

transport_proto_vft_ttp_vfts
 Per-type vector of transport protocol virtual function tables. More...
 
static u32 port_allocator_seed
 
static transport_endpoint_table_t local_endpoints_table
 
static transport_endpoint_tlocal_endpoints
 
static clib_spinlock_t local_endpoints_lock
 

Macro Definition Documentation

#define PORT_MASK   ((1 << 16)- 1)

Definition at line 174 of file transport.c.

Function Documentation

u8* format_transport_proto ( u8 s,
va_list *  args 
)

Definition at line 46 of file transport.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_transport_proto_short ( u8 s,
va_list *  args 
)

Definition at line 62 of file transport.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int transport_alloc_local_endpoint ( u8  proto,
transport_endpoint_t rmt,
ip46_address_t *  lcl_addr,
u16 lcl_port 
)

Definition at line 259 of file transport.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int transport_alloc_local_port ( u8  proto,
ip46_address_t *  ip 
)

Allocate local port and add if successful add entry to local endpoint table to mark the pair as used.

Definition at line 214 of file transport.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void transport_enable_disable ( vlib_main_t vm,
u8  is_en 
)

Definition at line 342 of file transport.c.

+ Here is the caller graph for this function:

void transport_endpoint_cleanup ( u8  proto,
ip46_address_t *  lcl_ip,
u16  port 
)

Definition at line 193 of file transport.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void transport_endpoint_del ( u32  tepi)

Definition at line 177 of file transport.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 transport_endpoint_lookup ( transport_endpoint_table_t ht,
u8  proto,
ip46_address_t *  ip,
u16  port 
)

Definition at line 95 of file transport.c.

+ Here is the caller graph for this function:

static transport_endpoint_t* transport_endpoint_new ( void  )
inlinestatic

Definition at line 185 of file transport.c.

+ Here is the caller graph for this function:

void transport_endpoint_table_add ( transport_endpoint_table_t ht,
u8  proto,
transport_endpoint_t te,
u32  value 
)

Definition at line 113 of file transport.c.

+ Here is the caller graph for this function:

void transport_endpoint_table_del ( transport_endpoint_table_t ht,
u8  proto,
transport_endpoint_t te 
)

Definition at line 127 of file transport.c.

+ Here is the caller graph for this function:

void transport_init ( void  )

Definition at line 353 of file transport.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

transport_proto_vft_t* transport_protocol_get_vft ( transport_proto_t  transport_proto)

Get transport virtual function table.

Parameters
type- session type (not protocol type)

Definition at line 167 of file transport.c.

+ Here is the caller graph for this function:

void transport_register_protocol ( transport_proto_t  transport_proto,
const transport_proto_vft_t vft,
fib_protocol_t  fib_proto,
u32  output_node 
)

Register transport virtual function table.

Parameters
transport_proto- transport protocol type (i.e., TCP, UDP ..)
vft- virtual function table for transport proto
fib_proto- network layer protocol
output_node- output node index that session layer will hand off buffers to, for requested fib proto

Definition at line 149 of file transport.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void transport_update_time ( f64  time_now,
u8  thread_index 
)

Definition at line 331 of file transport.c.

+ Here is the caller graph for this function:

uword unformat_transport_proto ( unformat_input_t input,
va_list *  args 
)

Definition at line 78 of file transport.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

transport_endpoint_t* local_endpoints
static

Definition at line 38 of file transport.c.

clib_spinlock_t local_endpoints_lock
static

Definition at line 43 of file transport.c.

transport_endpoint_table_t local_endpoints_table
static

Definition at line 33 of file transport.c.

u32 port_allocator_seed
static

Definition at line 28 of file transport.c.

Per-type vector of transport protocol virtual function tables.

Generate typed init functions for multiple hash table styles...

Definition at line 23 of file transport.c.