FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
transport_types.h File Reference
+ Include dependency graph for transport_types.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  transport_endpoint_
 
struct  transport_endpoint_pair_
 
struct  transport_endpt_attr_
 
struct  transport_endpt_crypto_cfg_
 
struct  transport_endpt_ext_cfg_
 

Macros

#define TRANSPORT_MAX_HDRS_LEN   140 /* Max number of bytes for headers */
 
#define TRANSPORT_CONN_ID_LEN   44
 
#define c_lcl_ip   connection.lcl_ip
 Macros for 'derived classes' where base is named "connection". More...
 
#define c_rmt_ip   connection.rmt_ip
 
#define c_lcl_ip4   connection.lcl_ip.ip4
 
#define c_rmt_ip4   connection.rmt_ip.ip4
 
#define c_lcl_ip6   connection.lcl_ip.ip6
 
#define c_rmt_ip6   connection.rmt_ip.ip6
 
#define c_lcl_port   connection.lcl_port
 
#define c_rmt_port   connection.rmt_port
 
#define c_proto   connection.proto
 
#define c_fib_index   connection.fib_index
 
#define c_s_index   connection.s_index
 
#define c_c_index   connection.c_index
 
#define c_is_ip4   connection.is_ip4
 
#define c_thread_index   connection.thread_index
 
#define c_elog_track   connection.elog_track
 
#define c_cc_stat_tstamp   connection.cc_stat_tstamp
 
#define c_rmt_fei   connection.rmt_fei
 
#define c_rmt_dpo   connection.rmt_dpo
 
#define c_opaque_id   connection.opaque_conn_id
 
#define c_stats   connection.stats
 
#define c_pacer   connection.pacer
 
#define c_flags   connection.flags
 
#define s_ho_handle   pacer.bytes_per_sec
 
#define foreach_transport_proto
 
#define foreach_transport_endpoint_fields
 fib table endpoint is associated with More...
 
#define foreach_transport_endpoint_cfg_fields
 
#define foreach_transport_endpt_cfg_flags
 
#define foreach_transport_attr_fields
 
#define ENDPOINT_INVALID_INDEX   ((u32)~0)
 

Typedefs

typedef enum transport_dequeue_type_ transport_tx_fn_type_t
 
typedef enum transport_service_type_ transport_service_type_t
 
typedef enum transport_connection_flags_ transport_connection_flags_t
 
typedef struct _spacer spacer_t
 
typedef struct _transport_connection transport_connection_t
 
typedef enum _transport_proto transport_proto_t
 
typedef struct transport_endpoint_ transport_endpoint_t
 
typedef enum transport_endpt_cfg_flags_ transport_endpt_cfg_flags_t
 
typedef struct transport_endpoint_pair_ transport_endpoint_cfg_t
 
typedef enum transport_endpt_attr_flag_bit_ transport_endpt_attr_flag_bit_t
 
typedef enum transport_endpt_attr_flag_ transport_endpt_attr_flag_t
 
typedef enum transport_endpt_attr_type_ transport_endpt_attr_type_t
 
typedef struct transport_endpt_attr_ transport_endpt_attr_t
 
typedef enum transport_endpt_ext_cfg_type_ transport_endpt_ext_cfg_type_t
 
typedef struct transport_endpt_crypto_cfg_ transport_endpt_crypto_cfg_t
 
typedef struct transport_endpt_ext_cfg_ transport_endpt_ext_cfg_t
 
typedef clib_bihash_24_8_t transport_endpoint_table_t
 

Enumerations

enum  transport_dequeue_type_ {
  TRANSPORT_TX_PEEK, TRANSPORT_TX_DEQUEUE, TRANSPORT_TX_INTERNAL, TRANSPORT_TX_DGRAM,
  TRANSPORT_TX_N_FNS
}
 
enum  transport_service_type_ { TRANSPORT_SERVICE_VC, TRANSPORT_SERVICE_CL, TRANSPORT_SERVICE_APP, TRANSPORT_N_SERVICES }
 
enum  transport_connection_flags_ { TRANSPORT_CONNECTION_F_IS_TX_PACED = 1 << 0, TRANSPORT_CONNECTION_F_NO_LOOKUP = 1 << 1, TRANSPORT_CONNECTION_F_DESCHED = 1 << 2, TRANSPORT_CONNECTION_F_CLESS = 1 << 3 }
 
enum  transport_endpt_cfg_flags_ { TRANSPORT_CFG_F_CONNECTED = 1 << 0, TRANSPORT_CFG_F_UNIDIRECTIONAL = 1 << 1 }
 
enum  transport_endpt_attr_flag_bit_ { foreach_transport_endpt_cfg_flags }
 
enum  transport_endpt_attr_flag_ { foreach_transport_endpt_cfg_flags }
 
enum  transport_endpt_attr_type_ { foreach_transport_attr_fields }
 
enum  transport_endpt_ext_cfg_type_ { TRANSPORT_ENDPT_EXT_CFG_NONE, TRANSPORT_ENDPT_EXT_CFG_CRYPTO }
 

Functions

 STATIC_ASSERT (sizeof(transport_connection_t)<=128, "moved into 3rd cache line")
 
u8format_transport_proto (u8 *s, va_list *args)
 
u8format_transport_proto_short (u8 *s, va_list *args)
 
u8format_transport_connection (u8 *s, va_list *args)
 
u8format_transport_listen_connection (u8 *s, va_list *args)
 
u8format_transport_half_open_connection (u8 *s, va_list *args)
 
uword unformat_transport_proto (unformat_input_t *input, va_list *args)
 
u8format_transport_protos (u8 *s, va_list *args)
 
static u8 transport_connection_fib_proto (transport_connection_t *tc)
 
static u8 transport_endpoint_fib_proto (transport_endpoint_t *tep)
 
u8 transport_protocol_is_cl (transport_proto_t tp)
 
transport_service_type_t transport_protocol_service_type (transport_proto_t)
 
transport_tx_fn_type_t transport_protocol_tx_fn_type (transport_proto_t tp)
 

Variables

update conn id len
 

Macro Definition Documentation

◆ c_c_index

#define c_c_index   connection.c_index

Definition at line 138 of file transport_types.h.

◆ c_cc_stat_tstamp

#define c_cc_stat_tstamp   connection.cc_stat_tstamp

Definition at line 142 of file transport_types.h.

◆ c_elog_track

#define c_elog_track   connection.elog_track

Definition at line 141 of file transport_types.h.

◆ c_fib_index

#define c_fib_index   connection.fib_index

Definition at line 136 of file transport_types.h.

◆ c_flags

#define c_flags   connection.flags

Definition at line 148 of file transport_types.h.

◆ c_is_ip4

#define c_is_ip4   connection.is_ip4

Definition at line 139 of file transport_types.h.

◆ c_lcl_ip

#define c_lcl_ip   connection.lcl_ip

Macros for 'derived classes' where base is named "connection".

Definition at line 127 of file transport_types.h.

◆ c_lcl_ip4

#define c_lcl_ip4   connection.lcl_ip.ip4

Definition at line 129 of file transport_types.h.

◆ c_lcl_ip6

#define c_lcl_ip6   connection.lcl_ip.ip6

Definition at line 131 of file transport_types.h.

◆ c_lcl_port

#define c_lcl_port   connection.lcl_port

Definition at line 133 of file transport_types.h.

◆ c_opaque_id

#define c_opaque_id   connection.opaque_conn_id

Definition at line 145 of file transport_types.h.

◆ c_pacer

#define c_pacer   connection.pacer

Definition at line 147 of file transport_types.h.

◆ c_proto

#define c_proto   connection.proto

Definition at line 135 of file transport_types.h.

◆ c_rmt_dpo

#define c_rmt_dpo   connection.rmt_dpo

Definition at line 144 of file transport_types.h.

◆ c_rmt_fei

#define c_rmt_fei   connection.rmt_fei

Definition at line 143 of file transport_types.h.

◆ c_rmt_ip

#define c_rmt_ip   connection.rmt_ip

Definition at line 128 of file transport_types.h.

◆ c_rmt_ip4

#define c_rmt_ip4   connection.rmt_ip.ip4

Definition at line 130 of file transport_types.h.

◆ c_rmt_ip6

#define c_rmt_ip6   connection.rmt_ip.ip6

Definition at line 132 of file transport_types.h.

◆ c_rmt_port

#define c_rmt_port   connection.rmt_port

Definition at line 134 of file transport_types.h.

◆ c_s_index

#define c_s_index   connection.s_index

Definition at line 137 of file transport_types.h.

◆ c_stats

#define c_stats   connection.stats

Definition at line 146 of file transport_types.h.

◆ c_thread_index

#define c_thread_index   connection.thread_index

Definition at line 140 of file transport_types.h.

◆ ENDPOINT_INVALID_INDEX

#define ENDPOINT_INVALID_INDEX   ((u32)~0)

Definition at line 289 of file transport_types.h.

◆ foreach_transport_attr_fields

#define foreach_transport_attr_fields
Value:
_ (u64, next_output_node, NEXT_OUTPUT_NODE) \
_ (u16, mss, MSS) \
_ (u8, flags, FLAGS) \
_ (u8, cc_algo, CC_ALGO)

Definition at line 239 of file transport_types.h.

◆ foreach_transport_endpoint_cfg_fields

#define foreach_transport_endpoint_cfg_fields
Value:
foreach_transport_endpoint_fields \
_(u16, mss) \
_(u8, transport_flags) \

Definition at line 206 of file transport_types.h.

◆ foreach_transport_endpoint_fields

#define foreach_transport_endpoint_fields
Value:
_(ip46_address_t, ip) /**< ip address in net order */ \
_(u16, port) /**< port in net order */ \
_(u8, is_ip4) /**< set if ip4 */ \
_(u32, sw_if_index) /**< interface endpoint is associated with */ \
_(u32, fib_index)

fib table endpoint is associated with

Definition at line 185 of file transport_types.h.

◆ foreach_transport_endpt_cfg_flags

foreach_transport_endpt_cfg_flags
Value:
_ (CSUM_OFFLOAD) \
_ (GSO) \
_ (RATE_SAMPLING)

Definition at line 219 of file transport_types.h.

◆ foreach_transport_proto

#define foreach_transport_proto
Value:
_ (TCP, "tcp", "T") \
_ (UDP, "udp", "U") \
_ (NONE, "ct", "C") \
_ (TLS, "tls", "J") \
_ (QUIC, "quic", "Q") \
_ (DTLS, "dtls", "D") \
_ (SRTP, "srtp", "R")

Definition at line 160 of file transport_types.h.

◆ s_ho_handle

#define s_ho_handle   pacer.bytes_per_sec

Definition at line 149 of file transport_types.h.

◆ TRANSPORT_CONN_ID_LEN

#define TRANSPORT_CONN_ID_LEN   44

Definition at line 74 of file transport_types.h.

◆ TRANSPORT_MAX_HDRS_LEN

#define TRANSPORT_MAX_HDRS_LEN   140 /* Max number of bytes for headers */

Definition at line 25 of file transport_types.h.

Typedef Documentation

◆ spacer_t

typedef struct _spacer spacer_t

◆ transport_connection_flags_t

◆ transport_connection_t

typedef struct _transport_connection transport_connection_t

◆ transport_endpoint_cfg_t

◆ transport_endpoint_t

◆ transport_endpoint_table_t

typedef clib_bihash_24_8_t transport_endpoint_table_t

Definition at line 287 of file transport_types.h.

◆ transport_endpt_attr_flag_bit_t

◆ transport_endpt_attr_flag_t

◆ transport_endpt_attr_t

◆ transport_endpt_attr_type_t

◆ transport_endpt_cfg_flags_t

◆ transport_endpt_crypto_cfg_t

◆ transport_endpt_ext_cfg_t

◆ transport_endpt_ext_cfg_type_t

◆ transport_proto_t

typedef enum _transport_proto transport_proto_t

◆ transport_service_type_t

◆ transport_tx_fn_type_t

Enumeration Type Documentation

◆ transport_connection_flags_

Enumerator
TRANSPORT_CONNECTION_F_IS_TX_PACED 
TRANSPORT_CONNECTION_F_NO_LOOKUP 

Don't register connection in lookup.

Does not apply to local apps and transports using the network layer (udp/tcp)

TRANSPORT_CONNECTION_F_DESCHED 

Connection descheduled by the session layer.

TRANSPORT_CONNECTION_F_CLESS 

Connection is "connection less".

Some important implications of that are that connections are not pinned to workers and listeners will have fifos associated to them

Definition at line 45 of file transport_types.h.

◆ transport_dequeue_type_

Enumerator
TRANSPORT_TX_PEEK 

reliable transport protos

TRANSPORT_TX_DEQUEUE 

unreliable transport protos

TRANSPORT_TX_INTERNAL 

apps acting as transports

TRANSPORT_TX_DGRAM 

datagram mode

TRANSPORT_TX_N_FNS 

Definition at line 28 of file transport_types.h.

◆ transport_endpt_attr_flag_

Enumerator
foreach_transport_endpt_cfg_flags 

Definition at line 231 of file transport_types.h.

◆ transport_endpt_attr_flag_bit_

Enumerator
foreach_transport_endpt_cfg_flags 

Definition at line 224 of file transport_types.h.

◆ transport_endpt_attr_type_

Enumerator
foreach_transport_attr_fields 

Definition at line 245 of file transport_types.h.

◆ transport_endpt_cfg_flags_

Enumerator
TRANSPORT_CFG_F_CONNECTED 
TRANSPORT_CFG_F_UNIDIRECTIONAL 

Definition at line 200 of file transport_types.h.

◆ transport_endpt_ext_cfg_type_

Enumerator
TRANSPORT_ENDPT_EXT_CFG_NONE 
TRANSPORT_ENDPT_EXT_CFG_CRYPTO 

Definition at line 263 of file transport_types.h.

◆ transport_service_type_

Enumerator
TRANSPORT_SERVICE_VC 

virtual circuit service

TRANSPORT_SERVICE_CL 

connectionless service

TRANSPORT_SERVICE_APP 

app transport service

TRANSPORT_N_SERVICES 

Definition at line 37 of file transport_types.h.

Function Documentation

◆ format_transport_connection()

u8* format_transport_connection ( u8 s,
va_list *  args 
)

Definition at line 80 of file transport.c.

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

◆ format_transport_half_open_connection()

u8* format_transport_half_open_connection ( u8 s,
va_list *  args 
)

Definition at line 124 of file transport.c.

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

◆ format_transport_listen_connection()

u8* format_transport_listen_connection ( u8 s,
va_list *  args 
)

Definition at line 110 of file transport.c.

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

◆ format_transport_proto()

u8* format_transport_proto ( u8 s,
va_list *  args 
)

Definition at line 52 of file transport.c.

◆ format_transport_proto_short()

u8* format_transport_proto_short ( u8 s,
va_list *  args 
)

Definition at line 65 of file transport.c.

+ Here is the caller graph for this function:

◆ format_transport_protos()

u8* format_transport_protos ( u8 s,
va_list *  args 
)

Definition at line 190 of file transport.c.

+ Here is the caller graph for this function:

◆ STATIC_ASSERT()

STATIC_ASSERT ( sizeof(transport_connection_t)<=  128,
"moved into 3rd cache line"   
)

◆ transport_connection_fib_proto()

static u8 transport_connection_fib_proto ( transport_connection_t tc)
inlinestatic

Definition at line 292 of file transport_types.h.

+ Here is the caller graph for this function:

◆ transport_endpoint_fib_proto()

static u8 transport_endpoint_fib_proto ( transport_endpoint_t tep)
inlinestatic

Definition at line 298 of file transport_types.h.

◆ transport_protocol_is_cl()

u8 transport_protocol_is_cl ( transport_proto_t  tp)

Definition at line 356 of file transport.c.

+ Here is the caller graph for this function:

◆ transport_protocol_service_type()

transport_service_type_t transport_protocol_service_type ( transport_proto_t  )

Definition at line 290 of file transport.c.

+ Here is the caller graph for this function:

◆ transport_protocol_tx_fn_type()

transport_tx_fn_type_t transport_protocol_tx_fn_type ( transport_proto_t  tp)

Definition at line 296 of file transport.c.

+ Here is the caller graph for this function:

◆ unformat_transport_proto()

uword unformat_transport_proto ( unformat_input_t input,
va_list *  args 
)

Definition at line 155 of file transport.c.

Variable Documentation

◆ len

update conn id len

Definition at line 153 of file transport_types.h.

TCP
TCP(sport=80, dport=6872)
u16
unsigned short u16
Definition: types.h:57
port
u16 port
Definition: lb_types.api:73
peer
vl_api_address_t peer
Definition: teib.api:28
u64
unsigned long u64
Definition: types.h:89
u32
unsigned int u32
Definition: types.h:88
transport_endpoint_
Definition: transport_types.h:193
u8
unsigned char u8
Definition: types.h:56
ip
vl_api_address_t ip
Definition: l2.api:558
sw_if_index
vl_api_interface_index_t sw_if_index
Definition: wireguard.api:34
flags
vl_api_wireguard_peer_flags_t flags
Definition: wireguard.api:105