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-macsec.c File Reference
#include "netdissect-stdinc.h"
#include "netdissect.h"
#include "addrtoname.h"
#include "ethertype.h"
#include "extract.h"
Include dependency graph for print-macsec.c:

Go to the source code of this file.

Data Structures

struct  macsec_sectag
 

Macros

#define MACSEC_DEFAULT_ICV_LEN   16
 
#define MACSEC_TCI_VERSION   0x80
 
#define MACSEC_TCI_ES   0x40 /* end station */
 
#define MACSEC_TCI_SC   0x20 /* SCI present */
 
#define MACSEC_TCI_SCB   0x10 /* epon */
 
#define MACSEC_TCI_E   0x08 /* encryption */
 
#define MACSEC_TCI_C   0x04 /* changed text */
 
#define MACSEC_AN_MASK   0x03 /* association number */
 
#define MACSEC_TCI_FLAGS   (MACSEC_TCI_ES | MACSEC_TCI_SC | MACSEC_TCI_SCB | MACSEC_TCI_E | MACSEC_TCI_C)
 
#define MACSEC_TCI_CONFID   (MACSEC_TCI_E | MACSEC_TCI_C)
 
#define MACSEC_SL_MASK   0x3F /* short length */
 
#define MACSEC_SECTAG_LEN_NOSCI   6 /* length of MACsec header without SCI */
 
#define MACSEC_SECTAG_LEN_SCI   14 /* length of MACsec header with SCI */
 
#define SCI_FMT   "%016" PRIx64
 

Functions

static void macsec_print_header (netdissect_options *ndo, const struct macsec_sectag *sectag, u_int short_length)
 
int macsec_print (netdissect_options *ndo, const u_char **bp, u_int *lengthp, u_int *caplenp, u_int *hdrlenp, const struct lladdr_info *src, const struct lladdr_info *dst)
 

Variables

static const struct tok macsec_flag_values []
 

Macro Definition Documentation

◆ MACSEC_AN_MASK

#define MACSEC_AN_MASK   0x03 /* association number */

Definition at line 71 of file print-macsec.c.

◆ MACSEC_DEFAULT_ICV_LEN

#define MACSEC_DEFAULT_ICV_LEN   16

Definition at line 35 of file print-macsec.c.

◆ MACSEC_SECTAG_LEN_NOSCI

#define MACSEC_SECTAG_LEN_NOSCI   6 /* length of MACsec header without SCI */

Definition at line 76 of file print-macsec.c.

◆ MACSEC_SECTAG_LEN_SCI

#define MACSEC_SECTAG_LEN_SCI   14 /* length of MACsec header with SCI */

Definition at line 77 of file print-macsec.c.

◆ MACSEC_SL_MASK

#define MACSEC_SL_MASK   0x3F /* short length */

Definition at line 74 of file print-macsec.c.

◆ MACSEC_TCI_C

#define MACSEC_TCI_C   0x04 /* changed text */

Definition at line 70 of file print-macsec.c.

◆ MACSEC_TCI_CONFID

#define MACSEC_TCI_CONFID   (MACSEC_TCI_E | MACSEC_TCI_C)

Definition at line 73 of file print-macsec.c.

◆ MACSEC_TCI_E

#define MACSEC_TCI_E   0x08 /* encryption */

Definition at line 69 of file print-macsec.c.

◆ MACSEC_TCI_ES

#define MACSEC_TCI_ES   0x40 /* end station */

Definition at line 66 of file print-macsec.c.

◆ MACSEC_TCI_FLAGS

#define MACSEC_TCI_FLAGS   (MACSEC_TCI_ES | MACSEC_TCI_SC | MACSEC_TCI_SCB | MACSEC_TCI_E | MACSEC_TCI_C)

Definition at line 72 of file print-macsec.c.

◆ MACSEC_TCI_SC

#define MACSEC_TCI_SC   0x20 /* SCI present */

Definition at line 67 of file print-macsec.c.

◆ MACSEC_TCI_SCB

#define MACSEC_TCI_SCB   0x10 /* epon */

Definition at line 68 of file print-macsec.c.

◆ MACSEC_TCI_VERSION

#define MACSEC_TCI_VERSION   0x80

Definition at line 65 of file print-macsec.c.

◆ SCI_FMT

#define SCI_FMT   "%016" PRIx64

Definition at line 79 of file print-macsec.c.

Function Documentation

◆ macsec_print()

◆ macsec_print_header()

static void macsec_print_header ( netdissect_options ndo,
const struct macsec_sectag sectag,
u_int  short_length 
)
static

Variable Documentation

◆ macsec_flag_values

const struct tok macsec_flag_values[]
static
Initial value:
= {
{ 0x08 , "E" },
{ 0x04 , "C" },
{ 0x40 , "S" },
{ 0x10 , "B" },
{ 0x20 , "I" },
{ 0, NULL }
}

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

Referenced by macsec_print_header().