tcpdump  4.99.1
About: tcpdump is a tool for network monitoring and data acquisition.
  Fossies Dox: tcpdump-4.99.1.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

print-brcmtag.c File Reference
#include "netdissect-stdinc.h"
#include "netdissect.h"
#include "ethertype.h"
#include "addrtoname.h"
#include "extract.h"
Include dependency graph for print-brcmtag.c:

Go to the source code of this file.

Macros

#define ND_LONGJMP_FROM_TCHECK
 
#define ETHER_TYPE_LEN   2
 
#define BRCM_TAG_LEN   4
 
#define BRCM_OPCODE_SHIFT   5
 
#define BRCM_OPCODE_MASK   0x7
 
#define BRCM_IG_TC_SHIFT   2
 
#define BRCM_IG_TC_MASK   0x7
 
#define BRCM_IG_TE_MASK   0x3
 
#define BRCM_IG_TS_SHIFT   7
 
#define BRCM_IG_DSTMAP_MASK   0x1ff
 
#define BRCM_EG_CID_MASK   0xff
 
#define BRCM_EG_RC_MASK   0xff
 
#define BRCM_EG_RC_RSVD   (3 << 6)
 
#define BRCM_EG_RC_EXCEPTION   (1 << 5)
 
#define BRCM_EG_RC_PROT_SNOOP   (1 << 4)
 
#define BRCM_EG_RC_PROT_TERM   (1 << 3)
 
#define BRCM_EG_RC_SWITCH   (1 << 2)
 
#define BRCM_EG_RC_MAC_LEARN   (1 << 1)
 
#define BRCM_EG_RC_MIRROR   (1 << 0)
 
#define BRCM_EG_TC_SHIFT   5
 
#define BRCM_EG_TC_MASK   0x7
 
#define BRCM_EG_PID_MASK   0x1f
 

Functions

static void brcm_tag_print (netdissect_options *ndo, const u_char *bp)
 
void brcm_tag_if_print (netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p)
 
void brcm_tag_prepend_if_print (netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p)
 

Variables

static const struct tok brcm_tag_te_values []
 
static const struct tok brcm_tag_rc_values []
 

Macro Definition Documentation

◆ BRCM_EG_CID_MASK

#define BRCM_EG_CID_MASK   0xff

Definition at line 50 of file print-brcmtag.c.

◆ BRCM_EG_PID_MASK

#define BRCM_EG_PID_MASK   0x1f

Definition at line 61 of file print-brcmtag.c.

◆ BRCM_EG_RC_EXCEPTION

#define BRCM_EG_RC_EXCEPTION   (1 << 5)

Definition at line 53 of file print-brcmtag.c.

◆ BRCM_EG_RC_MAC_LEARN

#define BRCM_EG_RC_MAC_LEARN   (1 << 1)

Definition at line 57 of file print-brcmtag.c.

◆ BRCM_EG_RC_MASK

#define BRCM_EG_RC_MASK   0xff

Definition at line 51 of file print-brcmtag.c.

◆ BRCM_EG_RC_MIRROR

#define BRCM_EG_RC_MIRROR   (1 << 0)

Definition at line 58 of file print-brcmtag.c.

◆ BRCM_EG_RC_PROT_SNOOP

#define BRCM_EG_RC_PROT_SNOOP   (1 << 4)

Definition at line 54 of file print-brcmtag.c.

◆ BRCM_EG_RC_PROT_TERM

#define BRCM_EG_RC_PROT_TERM   (1 << 3)

Definition at line 55 of file print-brcmtag.c.

◆ BRCM_EG_RC_RSVD

#define BRCM_EG_RC_RSVD   (3 << 6)

Definition at line 52 of file print-brcmtag.c.

◆ BRCM_EG_RC_SWITCH

#define BRCM_EG_RC_SWITCH   (1 << 2)

Definition at line 56 of file print-brcmtag.c.

◆ BRCM_EG_TC_MASK

#define BRCM_EG_TC_MASK   0x7

Definition at line 60 of file print-brcmtag.c.

◆ BRCM_EG_TC_SHIFT

#define BRCM_EG_TC_SHIFT   5

Definition at line 59 of file print-brcmtag.c.

◆ BRCM_IG_DSTMAP_MASK

#define BRCM_IG_DSTMAP_MASK   0x1ff

Definition at line 47 of file print-brcmtag.c.

◆ BRCM_IG_TC_MASK

#define BRCM_IG_TC_MASK   0x7

Definition at line 44 of file print-brcmtag.c.

◆ BRCM_IG_TC_SHIFT

#define BRCM_IG_TC_SHIFT   2

Definition at line 43 of file print-brcmtag.c.

◆ BRCM_IG_TE_MASK

#define BRCM_IG_TE_MASK   0x3

Definition at line 45 of file print-brcmtag.c.

◆ BRCM_IG_TS_SHIFT

#define BRCM_IG_TS_SHIFT   7

Definition at line 46 of file print-brcmtag.c.

◆ BRCM_OPCODE_MASK

#define BRCM_OPCODE_MASK   0x7

Definition at line 40 of file print-brcmtag.c.

◆ BRCM_OPCODE_SHIFT

#define BRCM_OPCODE_SHIFT   5

Definition at line 39 of file print-brcmtag.c.

◆ BRCM_TAG_LEN

#define BRCM_TAG_LEN   4

Definition at line 38 of file print-brcmtag.c.

◆ ETHER_TYPE_LEN

#define ETHER_TYPE_LEN   2

Definition at line 36 of file print-brcmtag.c.

◆ ND_LONGJMP_FROM_TCHECK

#define ND_LONGJMP_FROM_TCHECK

Definition at line 30 of file print-brcmtag.c.

Function Documentation

◆ brcm_tag_if_print()

void brcm_tag_if_print ( netdissect_options ndo,
const struct pcap_pkthdr *  h,
const u_char *  p 
)

◆ brcm_tag_prepend_if_print()

void brcm_tag_prepend_if_print ( netdissect_options ndo,
const struct pcap_pkthdr *  h,
const u_char *  p 
)

◆ brcm_tag_print()

Variable Documentation

◆ brcm_tag_rc_values

const struct tok brcm_tag_rc_values[]
static
Initial value:
= {
{ 1, "mirror" },
{ 2, "MAC learning" },
{ 4, "switching" },
{ 8, "prot term" },
{ 16, "prot snoop" },
{ 32, "exception" },
{ 0, NULL }
}

Definition at line 1 of file print-brcmtag.c.

Referenced by brcm_tag_print().

◆ brcm_tag_te_values

const struct tok brcm_tag_te_values[]
static
Initial value:
= {
{ 0, "None" },
{ 1, "Untag" },
{ 2, "Header"},
{ 3, "Reserved" },
{ 0, NULL }
}

Definition at line 1 of file print-brcmtag.c.

Referenced by brcm_tag_print().