mbgtools-lx
4.2.8
|
Macros | |
#define | _mbg_swab_mbg_vlan_cfg(_p) _mbg_swab16( _p ) |
#define | VLAN_ID_BITS 12 |
number of bits to hold the ID More... | |
#define | N_VLAN_ID ( 1 << VLAN_ID_BITS ) |
number of ID values More... | |
#define | MIN_VLAN_ID 0 |
minimum ID value More... | |
#define | MAX_VLAN_ID ( N_VLAN_ID - 1 ) |
maximum ID value More... | |
#define | VLAN_ID_SHIFT 0 |
#define | VLAN_ID_MSK ( ( 1 << VLAN_ID_BITS ) - 1 ) |
#define | VLAN_PRIORITY_BITS 3 |
number of bits to hold priority More... | |
#define | N_VLAN_PRIORITY ( 1 << VLAN_PRIORITY_BITS ) |
number of priority values More... | |
#define | MIN_VLAN_PRIORITY 0 |
minimum priority More... | |
#define | MAX_VLAN_PRIORITY ( N_VLAN_PRIORITY - 1 ) |
maximum priority More... | |
#define | VLAN_PRIORITY_SHIFT ( ( 8 * sizeof( MBG_VLAN_CFG ) ) - VLAN_PRIORITY_BITS ) |
#define | VLAN_PRIORITY_MSK ( ( 1 << VLAN_PRIORITY_BITS ) - 1 ) |
#define | _decode_vlan_id(_cfg) ( ( (_cfg) >> VLAN_ID_SHIFT ) & VLAN_ID_MSK ) |
Macros used to encode/decode packed vlan_cfg variables. More... | |
#define | _decode_vlan_priority(_cfg) ( ( (_cfg) >> VLAN_PRIORITY_SHIFT ) & VLAN_PRIORITY_MSK ) |
#define | _encode_vlan_cfg(_id, _prty) ( ( (_id) << VLAN_ID_SHIFT ) | ( (_prty) << VLAN_PRIORITY_SHIFT ) ) |
Typedefs | |
typedef uint16_t | MBG_VLAN_CFG |
VLAN configuration. More... | |
#define _decode_vlan_id | ( | _cfg | ) | ( ( (_cfg) >> VLAN_ID_SHIFT ) & VLAN_ID_MSK ) |
#define _decode_vlan_priority | ( | _cfg | ) | ( ( (_cfg) >> VLAN_PRIORITY_SHIFT ) & VLAN_PRIORITY_MSK ) |
#define _encode_vlan_cfg | ( | _id, | |
_prty | |||
) | ( ( (_id) << VLAN_ID_SHIFT ) | ( (_prty) << VLAN_PRIORITY_SHIFT ) ) |
#define _mbg_swab_mbg_vlan_cfg | ( | _p | ) | _mbg_swab16( _p ) |
#define MAX_VLAN_PRIORITY ( N_VLAN_PRIORITY - 1 ) |
#define N_VLAN_ID ( 1 << VLAN_ID_BITS ) |
#define N_VLAN_PRIORITY ( 1 << VLAN_PRIORITY_BITS ) |
#define VLAN_ID_MSK ( ( 1 << VLAN_ID_BITS ) - 1 ) |
#define VLAN_PRIORITY_BITS 3 |
#define VLAN_PRIORITY_MSK ( ( 1 << VLAN_PRIORITY_BITS ) - 1 ) |
#define VLAN_PRIORITY_SHIFT ( ( 8 * sizeof( MBG_VLAN_CFG ) ) - VLAN_PRIORITY_BITS ) |
typedef uint16_t MBG_VLAN_CFG |