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

Go to the source code of this file.

Data Structures

union  snap_header_t
 
struct  snap_oui_and_protocol_t
 
struct  snap_protocol_info_t
 
struct  snap_main_t
 

Macros

#define foreach_ieee_oui
 
#define foreach_snap_cisco_protocol
 
#define foreach_snap_error
 

Enumerations

enum  ieee_oui_t { foreach_ieee_oui }
 
enum  snap_cisco_protocol_t { foreach_snap_cisco_protocol }
 
enum  snap_error_t { SNAP_N_ERROR }
 

Functions

always_inline void snap_header_set_protocol (snap_header_t *h, snap_oui_and_protocol_t *p)
 
always_inline u32 snap_header_get_oui (snap_header_t *h)
 
always_inline snap_protocol_info_tsnap_get_protocol_info (snap_main_t *sm, snap_header_t *h)
 
void snap_register_input_protocol (vlib_main_t *vm, char *name, u32 ieee_oui, u16 protocol, u32 node_index)
 
void snap_set_adjacency (vnet_rewrite_header_t *rw, uword max_data_bytes, u32 ieee_oui, u16 protocol)
 
always_inline void snap_setup_node (vlib_main_t *vm, u32 node_index)
 

Variables

snap_main_t snap_main
 
format_function_t format_snap_protocol
 
format_function_t format_snap_header
 
format_function_t format_snap_header_with_length
 
unformat_function_t unformat_snap_protocol
 
unformat_function_t unformat_snap_header
 
unformat_function_t unformat_pg_snap_header
 

Macro Definition Documentation

#define foreach_ieee_oui
Value:
_ (0x000000, ethernet) \
_ (0x00000c, cisco)

Definition at line 46 of file snap.h.

#define foreach_snap_cisco_protocol
Value:
_ (0x0102, drip) \
_ (0x0104, port_aggregation_protocol) \
_ (0x0105, mls_hello) \
_ (0x010b, per_vlan_spanning_tree) \
_ (0x010c, vlan_bridge) \
_ (0x0111, unidirectional_link_detection) \
_ (0x2000, cdp) \
_ (0x2001, cgmp) \
_ (0x2003, vtp) \
_ (0x2004, dtp) \
_ (0x200a, stp_uplink_fast)

Definition at line 56 of file snap.h.

#define foreach_snap_error
Value:
_ (NONE, "no error") \
_ (UNKNOWN_PROTOCOL, "unknown oui/snap protocol")

Definition at line 116 of file snap.h.

Enumeration Type Documentation

enum ieee_oui_t
Enumerator
foreach_ieee_oui 

Definition at line 50 of file snap.h.

Enumerator
foreach_snap_cisco_protocol 

Definition at line 69 of file snap.h.

Enumerator
SNAP_N_ERROR 

Definition at line 120 of file snap.h.

Function Documentation

always_inline snap_protocol_info_t* snap_get_protocol_info ( snap_main_t sm,
snap_header_t h 
)

Definition at line 147 of file snap.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline u32 snap_header_get_oui ( snap_header_t h)

Definition at line 141 of file snap.h.

+ Here is the caller graph for this function:

always_inline void snap_header_set_protocol ( snap_header_t h,
snap_oui_and_protocol_t p 
)

Definition at line 106 of file snap.h.

+ Here is the caller graph for this function:

void snap_register_input_protocol ( vlib_main_t vm,
char *  name,
u32  ieee_oui,
u16  protocol,
u32  node_index 
)

Definition at line 305 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void snap_set_adjacency ( vnet_rewrite_header_t *  rw,
uword  max_data_bytes,
u32  ieee_oui,
u16  protocol 
)
always_inline void snap_setup_node ( vlib_main_t vm,
u32  node_index 
)

Definition at line 186 of file snap.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

format_function_t format_snap_header

Definition at line 175 of file snap.h.

format_function_t format_snap_header_with_length

Definition at line 176 of file snap.h.

format_function_t format_snap_protocol

Definition at line 174 of file snap.h.

snap_main_t snap_main

Definition at line 159 of file snap.h.

unformat_function_t unformat_pg_snap_header

Definition at line 183 of file snap.h.

unformat_function_t unformat_snap_header

Definition at line 182 of file snap.h.

unformat_function_t unformat_snap_protocol

Definition at line 179 of file snap.h.