FD.io VPP  v16.06
Vector Packet Processing
ip6_packet.h File Reference
+ Include dependency graph for ip6_packet.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  ip6_address_t
 
struct  ip6_header_t
 

Macros

#define ip46_address_is_ip4(ip46)   (((ip46)->pad[0] | (ip46)->pad[1] | (ip46)->pad[2]) == 0)
 
#define ip46_address_mask_ip4(ip46)   ((ip46)->pad[0] = (ip46)->pad[1] = (ip46)->pad[2] = 0)
 
#define ip46_address_set_ip4(ip46, ip)   (ip46_address_mask_ip4(ip46), (ip46)->ip4 = (ip)[0])
 
#define ip46_address_reset(ip46)   ((ip46)->as_u64[0] = (ip46)->as_u64[1] = 0)
 
#define foreach_ip6_multicast_address_scope
 
#define foreach_ip6_multicast_link_local_group_id
 
#define IP6_MLDP_ALERT_TYPE   0x5
 
#define ip6_frag_hdr_offset(hdr)   (clib_net_to_host_u16((hdr)->fragment_offset_and_more) >> 3)
 
#define ip6_frag_hdr_more(hdr)   (clib_net_to_host_u16((hdr)->fragment_offset_and_more) & 0x1)
 
#define ip6_frag_hdr_offset_and_more(offset, more)   clib_host_to_net_u16(((offset) << 3) + !!(more))
 

Enumerations

enum  ip6_multicast_address_scope_t { foreach_ip6_multicast_address_scope }
 
enum  ip6_multicast_link_local_group_id_t { foreach_ip6_multicast_link_local_group_id }
 

Functions

typedef CLIB_PACKED (struct{ip6_address_t ip6_addr;u32 fib_index;}) ip6_address_fib_t
 
typedef CLIB_PACKED (union{struct{u32 pad[3];ip4_address_t ip4;};ip6_address_t ip6;u64 as_u64[2];}) ip46_address_t
 
always_inline void ip6_addr_fib_init (ip6_address_fib_t *addr_fib, ip6_address_t *address, u32 fib_index)
 
always_inline uword ip6_address_is_multicast (ip6_address_t *a)
 
always_inline void ip6_set_reserved_multicast_address (ip6_address_t *a, ip6_multicast_address_scope_t scope, u16 id)
 
always_inline void ip6_set_solicited_node_multicast_address (ip6_address_t *a, u32 id)
 
always_inline void ip6_link_local_address_from_ethernet_address (ip6_address_t *a, u8 *ethernet_address)
 
always_inline void ip6_multicast_ethernet_address (u8 *ethernet_address, u32 group_id)
 
always_inline uword ip6_address_is_equal (ip6_address_t *a, ip6_address_t *b)
 
always_inline uword ip6_address_is_equal_masked (ip6_address_t *a, ip6_address_t *b, ip6_address_t *mask)
 
always_inline void ip6_address_mask (ip6_address_t *a, ip6_address_t *mask)
 
always_inline void ip6_address_set_zero (ip6_address_t *a)
 
always_inline void ip6_address_mask_from_width (ip6_address_t *a, u32 width)
 
always_inline uword ip6_address_is_zero (ip6_address_t *a)
 
always_inline uword ip6_address_is_unspecified (ip6_address_t *a)
 
always_inline uword ip6_address_is_loopback (ip6_address_t *a)
 
always_inline uword ip6_address_is_link_local_unicast (ip6_address_t *a)
 
always_inline uword ip6_address_is_local_unicast (ip6_address_t *a)
 
always_inline uword ip6_is_solicited_node_multicast_address (ip6_address_t *a)
 
always_inline voidip6_next_header (ip6_header_t *i)
 
always_inline void ip6_tcp_reply_x1 (ip6_header_t *ip0, tcp_header_t *tcp0)
 
always_inline void ip6_tcp_reply_x2 (ip6_header_t *ip0, ip6_header_t *ip1, tcp_header_t *tcp0, tcp_header_t *tcp1)
 
typedef CLIB_PACKED (struct{u8 data;}) ip6_pad1_option_t
 
typedef CLIB_PACKED (struct{u8 type;u8 len;u8 data[0];}) ip6_padN_option_t
 
typedef CLIB_PACKED (struct{#define IP6_MLDP_ALERT_TYPE u8 type;u8 len;u16 value;}) ip6_router_alert_option_t
 
typedef CLIB_PACKED (struct{u8 next_hdr;u8 n_data_u64s;u8 data[0];}) ip6_hop_by_hop_ext_t
 
typedef CLIB_PACKED (struct{u8 next_hdr;u8 rsv;u16 fragment_offset_and_more;u32 identification;}) ip6_frag_hdr_t
 

Macro Definition Documentation

#define foreach_ip6_multicast_address_scope
Value:
_ (loopback, 0x1) \
_ (link_local, 0x2) \
_ (admin_local, 0x4) \
_ (site_local, 0x5) \
_ (organization_local, 0x8) \
_ (global, 0xe)

Definition at line 92 of file ip6_packet.h.

#define foreach_ip6_multicast_link_local_group_id
Value:
_ (all_hosts, 0x1) \
_ (all_routers, 0x2) \
_ (rip_routers, 0x9) \
_ (eigrp_routers, 0xa) \
_ (pim_routers, 0xd) \
_ (mldv2_routers, 0x16)

Definition at line 100 of file ip6_packet.h.

#define ip46_address_is_ip4 (   ip46)    (((ip46)->pad[0] | (ip46)->pad[1] | (ip46)->pad[2]) == 0)

Definition at line 69 of file ip6_packet.h.

#define ip46_address_mask_ip4 (   ip46)    ((ip46)->pad[0] = (ip46)->pad[1] = (ip46)->pad[2] = 0)

Definition at line 70 of file ip6_packet.h.

#define ip46_address_reset (   ip46)    ((ip46)->as_u64[0] = (ip46)->as_u64[1] = 0)

Definition at line 72 of file ip6_packet.h.

#define ip46_address_set_ip4 (   ip46,
  ip 
)    (ip46_address_mask_ip4(ip46), (ip46)->ip4 = (ip)[0])

Definition at line 71 of file ip6_packet.h.

#define ip6_frag_hdr_more (   hdr)    (clib_net_to_host_u16((hdr)->fragment_offset_and_more) & 0x1)

Definition at line 388 of file ip6_packet.h.

#define ip6_frag_hdr_offset (   hdr)    (clib_net_to_host_u16((hdr)->fragment_offset_and_more) >> 3)

Definition at line 385 of file ip6_packet.h.

#define ip6_frag_hdr_offset_and_more (   offset,
  more 
)    clib_host_to_net_u16(((offset) << 3) + !!(more))

Definition at line 391 of file ip6_packet.h.

#define IP6_MLDP_ALERT_TYPE   0x5

Enumeration Type Documentation

Enumerator
foreach_ip6_multicast_address_scope 

Definition at line 108 of file ip6_packet.h.

Enumerator
foreach_ip6_multicast_link_local_group_id 

Definition at line 114 of file ip6_packet.h.

Function Documentation

typedef CLIB_PACKED ( struct{ip6_address_t ip6_addr;u32 fib_index;}  )

+ Here is the caller graph for this function:

typedef CLIB_PACKED ( union{struct{u32 pad[3];ip4_address_t ip4;};ip6_address_t ip6;u64 as_u64[2];}  )
typedef CLIB_PACKED ( struct{u8 data;}  )
typedef CLIB_PACKED ( struct{u8 type;u8 len;u8 data[0];}  )
typedef CLIB_PACKED ( struct{#define IP6_MLDP_ALERT_TYPE u8 type;u8 len;u16 value;}  )
typedef CLIB_PACKED ( struct{u8 next_hdr;u8 n_data_u64s;u8 data[0];}  )
typedef CLIB_PACKED ( struct{u8 next_hdr;u8 rsv;u16 fragment_offset_and_more;u32 identification;}  )
always_inline void ip6_addr_fib_init ( ip6_address_fib_t *  addr_fib,
ip6_address_t address,
u32  fib_index 
)

Definition at line 75 of file ip6_packet.h.

+ Here is the caller graph for this function:

always_inline uword ip6_address_is_equal ( ip6_address_t a,
ip6_address_t b 
)

Definition at line 174 of file ip6_packet.h.

+ Here is the caller graph for this function:

always_inline uword ip6_address_is_equal_masked ( ip6_address_t a,
ip6_address_t b,
ip6_address_t mask 
)

Definition at line 184 of file ip6_packet.h.

always_inline uword ip6_address_is_link_local_unicast ( ip6_address_t a)

Definition at line 260 of file ip6_packet.h.

+ Here is the caller graph for this function:

always_inline uword ip6_address_is_local_unicast ( ip6_address_t a)

Definition at line 265 of file ip6_packet.h.

always_inline uword ip6_address_is_loopback ( ip6_address_t a)

Definition at line 248 of file ip6_packet.h.

+ Here is the call graph for this function:

always_inline uword ip6_address_is_multicast ( ip6_address_t a)

Definition at line 121 of file ip6_packet.h.

+ Here is the caller graph for this function:

always_inline uword ip6_address_is_unspecified ( ip6_address_t a)

Definition at line 243 of file ip6_packet.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline uword ip6_address_is_zero ( ip6_address_t a)

Definition at line 232 of file ip6_packet.h.

+ Here is the caller graph for this function:

always_inline void ip6_address_mask ( ip6_address_t a,
ip6_address_t mask 
)

Definition at line 201 of file ip6_packet.h.

+ Here is the caller graph for this function:

always_inline void ip6_address_mask_from_width ( ip6_address_t a,
u32  width 
)

Definition at line 217 of file ip6_packet.h.

+ Here is the caller graph for this function:

always_inline void ip6_address_set_zero ( ip6_address_t a)

Definition at line 209 of file ip6_packet.h.

always_inline uword ip6_is_solicited_node_multicast_address ( ip6_address_t a)

Definition at line 270 of file ip6_packet.h.

always_inline void ip6_link_local_address_from_ethernet_address ( ip6_address_t a,
u8 ethernet_address 
)

Definition at line 147 of file ip6_packet.h.

+ Here is the caller graph for this function:

always_inline void ip6_multicast_ethernet_address ( u8 ethernet_address,
u32  group_id 
)

Definition at line 163 of file ip6_packet.h.

always_inline void* ip6_next_header ( ip6_header_t i)

Definition at line 297 of file ip6_packet.h.

+ Here is the caller graph for this function:

always_inline void ip6_set_reserved_multicast_address ( ip6_address_t a,
ip6_multicast_address_scope_t  scope,
u16  id 
)

Definition at line 125 of file ip6_packet.h.

+ Here is the caller graph for this function:

always_inline void ip6_set_solicited_node_multicast_address ( ip6_address_t a,
u32  id 
)

Definition at line 135 of file ip6_packet.h.

+ Here is the caller graph for this function:

always_inline void ip6_tcp_reply_x1 ( ip6_header_t ip0,
tcp_header_t tcp0 
)

Definition at line 301 of file ip6_packet.h.

always_inline void ip6_tcp_reply_x2 ( ip6_header_t ip0,
ip6_header_t ip1,
tcp_header_t tcp0,
tcp_header_t tcp1 
)

Definition at line 323 of file ip6_packet.h.

+ Here is the call graph for this function: