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

Go to the source code of this file.

Data Structures

struct  ether_header
 

Macros

#define ND_LONGJMP_FROM_TCHECK
 
#define ETHER_HDRLEN   14
 

Functions

static void ether_addresses_print (netdissect_options *ndo, const u_char *src, const u_char *dst)
 
static void ether_type_print (netdissect_options *ndo, uint16_t type)
 
static u_int ether_common_print (netdissect_options *ndo, const u_char *p, u_int length, u_int caplen, void(*print_switch_tag)(netdissect_options *ndo, const u_char *), u_int switch_tag_len, void(*print_encap_header)(netdissect_options *ndo, const u_char *), const u_char *encap_header_arg)
 
u_int ether_switch_tag_print (netdissect_options *ndo, const u_char *p, u_int length, u_int caplen, void(*print_switch_tag)(netdissect_options *, const u_char *), u_int switch_tag_len)
 
u_int ether_print (netdissect_options *ndo, const u_char *p, u_int length, u_int caplen, void(*print_encap_header)(netdissect_options *ndo, const u_char *), const u_char *encap_header_arg)
 
void ether_if_print (netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p)
 
void netanalyzer_if_print (netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p)
 
void netanalyzer_transparent_if_print (netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p)
 
int ethertype_print (netdissect_options *ndo, u_short ether_type, const u_char *p, u_int length, u_int caplen, const struct lladdr_info *src, const struct lladdr_info *dst)
 

Variables

const struct tok ethertype_values []
 

Macro Definition Documentation

◆ ETHER_HDRLEN

#define ETHER_HDRLEN   14

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

◆ ND_LONGJMP_FROM_TCHECK

#define ND_LONGJMP_FROM_TCHECK

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

Function Documentation

◆ ether_addresses_print()

static void ether_addresses_print ( netdissect_options ndo,
const u_char *  src,
const u_char *  dst 
)
static

Definition at line 111 of file print-ether.c.

References GET_ETHERADDR_STRING, and ND_PRINT.

Referenced by ether_common_print().

◆ ether_common_print()

◆ ether_if_print()

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

◆ ether_print()

u_int ether_print ( netdissect_options ndo,
const u_char *  p,
u_int  length,
u_int  caplen,
void(*)(netdissect_options *ndo, const u_char *)  print_encap_header,
const u_char *  encap_header_arg 
)

◆ ether_switch_tag_print()

u_int ether_switch_tag_print ( netdissect_options ndo,
const u_char *  p,
u_int  length,
u_int  caplen,
void(*)(netdissect_options *, const u_char *)  print_switch_tag,
u_int  switch_tag_len 
)

Definition at line 418 of file print-ether.c.

References ether_common_print().

Referenced by brcm_tag_if_print(), dsa_if_print(), and edsa_if_print().

◆ ether_type_print()

static void ether_type_print ( netdissect_options ndo,
uint16_t  type 
)
static

Definition at line 119 of file print-ether.c.

References ethertype_values, ND_PRINT, netdissect_options::ndo_qflag, and tok2str().

Referenced by ether_common_print().

◆ ethertype_print()

int ethertype_print ( netdissect_options ndo,
u_short  ether_type,
const u_char *  p,
u_int  length,
u_int  caplen,
const struct lladdr_info src,
const struct lladdr_info dst 
)

◆ netanalyzer_if_print()

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

◆ netanalyzer_transparent_if_print()

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

Variable Documentation

◆ ethertype_values