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

Go to the source code of this file.

Data Structures

struct  mac_address_t_
 

Typedefs

typedef struct mac_address_t_ mac_address_t
 

Functions

 STATIC_ASSERT ((sizeof(mac_address_t)==6), "MAC address must represent the on wire format")
 
static u64 ethernet_mac_address_u64 (const u8 *a)
 
static void ethernet_mac_address_from_u64 (u64 u, u8 *a)
 
static int ethernet_mac_address_is_multicast_u64 (u64 a)
 
static int ethernet_mac_address_is_zero (const u8 *mac)
 
static void ethernet_mac_address_generate (u8 *mac)
 
static int ethernet_mac_address_equal (const u8 *a, const u8 *b)
 
static_always_inline void mac_address_from_bytes (mac_address_t *mac, const u8 *bytes)
 
static_always_inline void mac_address_to_bytes (const mac_address_t *mac, u8 *bytes)
 
static_always_inline int mac_address_is_zero (const mac_address_t *mac)
 
static_always_inline u64 mac_address_as_u64 (const mac_address_t *mac)
 
static_always_inline void mac_address_from_u64 (mac_address_t *mac, u64 u)
 
static_always_inline void mac_address_copy (mac_address_t *dst, const mac_address_t *src)
 
static_always_inline int mac_address_cmp (const mac_address_t *a, const mac_address_t *b)
 
static_always_inline int mac_address_equal (const mac_address_t *a, const mac_address_t *b)
 
static_always_inline void mac_address_set_zero (mac_address_t *mac)
 
static_always_inline int mac_address_n_bits_set (const mac_address_t *a)
 
void mac_address_increment (mac_address_t *mac)
 
uword unformat_mac_address_t (unformat_input_t *input, va_list *args)
 
u8format_mac_address_t (u8 *s, va_list *args)
 

Variables

const mac_address_t ZERO_MAC_ADDRESS
 

Typedef Documentation

◆ mac_address_t

typedef struct mac_address_t_ mac_address_t

Function Documentation

◆ ethernet_mac_address_equal()

static int ethernet_mac_address_equal ( const u8 a,
const u8 b 
)
inlinestatic

Definition at line 85 of file mac_address.h.

+ Here is the caller graph for this function:

◆ ethernet_mac_address_from_u64()

static void ethernet_mac_address_from_u64 ( u64  u,
u8 a 
)
inlinestatic

Definition at line 50 of file mac_address.h.

◆ ethernet_mac_address_generate()

static void ethernet_mac_address_generate ( u8 mac)
inlinestatic

Definition at line 74 of file mac_address.h.

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

◆ ethernet_mac_address_is_multicast_u64()

static int ethernet_mac_address_is_multicast_u64 ( u64  a)
inlinestatic

Definition at line 62 of file mac_address.h.

◆ ethernet_mac_address_is_zero()

static int ethernet_mac_address_is_zero ( const u8 mac)
inlinestatic

Definition at line 68 of file mac_address.h.

◆ ethernet_mac_address_u64()

static u64 ethernet_mac_address_u64 ( const u8 a)
inlinestatic

Definition at line 40 of file mac_address.h.

+ Here is the caller graph for this function:

◆ format_mac_address_t()

u8* format_mac_address_t ( u8 s,
va_list *  args 
)

Definition at line 27 of file mac_address.c.

+ Here is the caller graph for this function:

◆ mac_address_as_u64()

static_always_inline u64 mac_address_as_u64 ( const mac_address_t mac)

Definition at line 112 of file mac_address.h.

+ Here is the caller graph for this function:

◆ mac_address_cmp()

static_always_inline int mac_address_cmp ( const mac_address_t a,
const mac_address_t b 
)

Definition at line 134 of file mac_address.h.

+ Here is the caller graph for this function:

◆ mac_address_copy()

static_always_inline void mac_address_copy ( mac_address_t dst,
const mac_address_t src 
)

Definition at line 128 of file mac_address.h.

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

◆ mac_address_equal()

static_always_inline int mac_address_equal ( const mac_address_t a,
const mac_address_t b 
)

Definition at line 140 of file mac_address.h.

+ Here is the caller graph for this function:

◆ mac_address_from_bytes()

static_always_inline void mac_address_from_bytes ( mac_address_t mac,
const u8 bytes 
)

Definition at line 92 of file mac_address.h.

+ Here is the caller graph for this function:

◆ mac_address_from_u64()

static_always_inline void mac_address_from_u64 ( mac_address_t mac,
u64  u 
)

Definition at line 122 of file mac_address.h.

+ Here is the caller graph for this function:

◆ mac_address_increment()

void mac_address_increment ( mac_address_t mac)

Definition at line 65 of file mac_address.c.

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

◆ mac_address_is_zero()

static_always_inline int mac_address_is_zero ( const mac_address_t mac)

Definition at line 106 of file mac_address.h.

+ Here is the caller graph for this function:

◆ mac_address_n_bits_set()

static_always_inline int mac_address_n_bits_set ( const mac_address_t a)

Definition at line 153 of file mac_address.h.

+ Here is the call graph for this function:

◆ mac_address_set_zero()

static_always_inline void mac_address_set_zero ( mac_address_t mac)

Definition at line 146 of file mac_address.h.

+ Here is the caller graph for this function:

◆ mac_address_to_bytes()

static_always_inline void mac_address_to_bytes ( const mac_address_t mac,
u8 bytes 
)

Definition at line 99 of file mac_address.h.

+ Here is the caller graph for this function:

◆ STATIC_ASSERT()

STATIC_ASSERT ( (sizeof(mac_address_t)==6)  ,
"MAC address must represent the on wire format  
)

◆ unformat_mac_address_t()

uword unformat_mac_address_t ( unformat_input_t input,
va_list *  args 
)

Definition at line 37 of file mac_address.c.

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

Variable Documentation

◆ ZERO_MAC_ADDRESS

const mac_address_t ZERO_MAC_ADDRESS

Definition at line 19 of file mac_address.c.