FD.io VPP  v17.07.01-10-g3be13f0
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

static void snap_header_set_protocol (snap_header_t *h, snap_oui_and_protocol_t *p)
 
static u32 snap_header_get_oui (snap_header_t *h)
 
static 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)
 
static 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 57 of file snap.h.

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

Definition at line 123 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 70 of file snap.h.

Enumerator
SNAP_N_ERROR 

Definition at line 127 of file snap.h.

Function Documentation

static snap_protocol_info_t* snap_get_protocol_info ( snap_main_t sm,
snap_header_t h 
)
inlinestatic

Definition at line 156 of file snap.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 snap_header_get_oui ( snap_header_t h)
inlinestatic

Definition at line 150 of file snap.h.

+ Here is the caller graph for this function:

static void snap_header_set_protocol ( snap_header_t h,
snap_oui_and_protocol_t p 
)
inlinestatic

Definition at line 113 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 311 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void snap_setup_node ( vlib_main_t vm,
u32  node_index 
)
inlinestatic

Definition at line 188 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 177 of file snap.h.

format_function_t format_snap_header_with_length

Definition at line 178 of file snap.h.

format_function_t format_snap_protocol

Definition at line 176 of file snap.h.

snap_main_t snap_main

Definition at line 168 of file snap.h.

unformat_function_t unformat_pg_snap_header

Definition at line 185 of file snap.h.

unformat_function_t unformat_snap_header

Definition at line 184 of file snap.h.

unformat_function_t unformat_snap_protocol

Definition at line 181 of file snap.h.