FD.io VPP  v18.10-34-gcce845e
Vector Packet Processing
ip_packet.h File Reference
+ Include dependency graph for ip_packet.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ip_protocol(n, s)   IP_PROTOCOL_##s = n,
 
#define ip_port(s, n)   IP_PORT_##s = n,
 
#define foreach_ip_builtin_multicast_group
 
#define ip_csum_update(sum, old, new, type, field)
 

Typedefs

typedef enum ip_protocol ip_protocol_t
 
typedef uword ip_csum_t
 

Enumerations

enum  ip_protocol { ip_protocol, ip_protocol }
 
enum  ip_port_t { ip_port, ip_port }
 
enum  ip_builtin_protocol_t { IP_BUILTIN_PROTOCOL_UDP, IP_BUILTIN_PROTOCOL_ICMP, IP_BUILTIN_PROTOCOL_UNKNOWN }
 
enum  ip_multicast_group_t { foreach_ip_builtin_multicast_group }
 

Functions

static_always_inline u16 ip_csum (void *data, u16 n_left)
 
static ip_csum_t ip_csum_with_carry (ip_csum_t sum, ip_csum_t x)
 
static ip_csum_t ip_csum_add_even (ip_csum_t c, ip_csum_t x)
 
static ip_csum_t ip_csum_sub_even (ip_csum_t c, ip_csum_t x)
 
static ip_csum_t ip_csum_update_inline (ip_csum_t sum, ip_csum_t old, ip_csum_t new, u32 field_byte_offset, u32 field_n_bytes)
 
static u16 ip_csum_fold (ip_csum_t c)
 
static ip_csum_t ip_incremental_checksum (ip_csum_t sum, void *_data, uword n_bytes)
 
static u16 ip_csum_and_memcpy_fold (ip_csum_t sum, void *dst)
 

Variables

ip_csum_t(* vnet_incremental_checksum_fp )(ip_csum_t, void *, uword)
 

Macro Definition Documentation

#define foreach_ip_builtin_multicast_group
Value:
_ (1, all_hosts_on_subnet) \
_ (2, all_routers_on_subnet) \
_ (4, dvmrp) \
_ (5, ospf_all_routers) \
_ (6, ospf_designated_routers) \
_ (13, pim) \
_ (18, vrrp) \
_ (102, hsrp) \
_ (22, igmp_v3)

Definition at line 69 of file ip_packet.h.

#define ip_csum_update (   sum,
  old,
  new,
  type,
  field 
)
Value:
ip_csum_update_inline ((sum), (old), (new), \
STRUCT_OFFSET_OF (type, field), \
STRUCT_SIZE_OF (type, field))
#define STRUCT_OFFSET_OF(t, f)
Definition: clib.h:64
static ip_csum_t ip_csum_update_inline(ip_csum_t sum, ip_csum_t old, ip_csum_t new, u32 field_byte_offset, u32 field_n_bytes)
Definition: ip_packet.h:215
#define STRUCT_SIZE_OF(t, f)
Definition: clib.h:66

Definition at line 231 of file ip_packet.h.

#define ip_port (   s,
 
)    IP_PORT_##s = n,

Definition at line 56 of file ip_packet.h.

#define ip_protocol (   n,
 
)    IP_PROTOCOL_##s = n,

Definition at line 48 of file ip_packet.h.

Typedef Documentation

typedef uword ip_csum_t

Definition at line 181 of file ip_packet.h.

typedef enum ip_protocol ip_protocol_t

Enumeration Type Documentation

Enumerator
IP_BUILTIN_PROTOCOL_UDP 
IP_BUILTIN_PROTOCOL_ICMP 
IP_BUILTIN_PROTOCOL_UNKNOWN 

Definition at line 62 of file ip_packet.h.

Enumerator
foreach_ip_builtin_multicast_group 

Definition at line 80 of file ip_packet.h.

enum ip_port_t
Enumerator
ip_port 
ip_port 

Definition at line 54 of file ip_packet.h.

Enumerator
ip_protocol 
ip_protocol 

Definition at line 46 of file ip_packet.h.

Function Documentation

static_always_inline u16 ip_csum ( void *  data,
u16  n_left 
)

Definition at line 90 of file ip_packet.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ip_csum_t ip_csum_add_even ( ip_csum_t  c,
ip_csum_t  x 
)
inlinestatic

Definition at line 192 of file ip_packet.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u16 ip_csum_and_memcpy_fold ( ip_csum_t  sum,
void *  dst 
)
inlinestatic

Definition at line 260 of file ip_packet.h.

+ Here is the call graph for this function:

static u16 ip_csum_fold ( ip_csum_t  c)
inlinestatic

Definition at line 237 of file ip_packet.h.

static ip_csum_t ip_csum_sub_even ( ip_csum_t  c,
ip_csum_t  x 
)
inlinestatic

Definition at line 209 of file ip_packet.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ip_csum_t ip_csum_update_inline ( ip_csum_t  sum,
ip_csum_t  old,
ip_csum_t  new,
u32  field_byte_offset,
u32  field_n_bytes 
)
inlinestatic

Definition at line 215 of file ip_packet.h.

+ Here is the call graph for this function:

static ip_csum_t ip_csum_with_carry ( ip_csum_t  sum,
ip_csum_t  x 
)
inlinestatic

Definition at line 184 of file ip_packet.h.

+ Here is the caller graph for this function:

ip_csum_t ip_incremental_checksum ( ip_csum_t  sum,
void *  _data,
uword  n_bytes 
)
inlinestatic

Definition at line 254 of file ip_packet.h.

+ Here is the caller graph for this function:

Variable Documentation

ip_csum_t(* vnet_incremental_checksum_fp) (ip_csum_t, void *, uword)

Definition at line 145 of file ip_checksum.c.