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)  

addrtoname.h File Reference
#include "extract.h"
Include dependency graph for addrtoname.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define INET6_ADDRSTRLEN   46
 
#define BUFSIZE   128
 
#define GET_LINKADDR_STRING(p, type, len)   get_linkaddr_string(ndo, (const u_char *)(p), type, len)
 
#define GET_ETHERADDR_STRING(p)   get_etheraddr_string(ndo, (const u_char *)(p))
 
#define GET_LE64ADDR_STRING(p)   get_le64addr_string(ndo, (const u_char *)(p))
 
#define GET_ISONSAP_STRING(nsap, nsap_length)   get_isonsap_string(ndo, (const u_char *)(nsap), nsap_length)
 
#define GET_IPADDR_STRING(p)   get_ipaddr_string(ndo, (const u_char *)(p))
 
#define GET_IP6ADDR_STRING(p)   get_ip6addr_string(ndo, (const u_char *)(p))
 

Enumerations

enum  {
  LINKADDR_ETHER , LINKADDR_FRELAY , LINKADDR_IEEE1394 , LINKADDR_ATM ,
  LINKADDR_OTHER
}
 

Functions

const char * linkaddr_string (netdissect_options *, const uint8_t *, const unsigned int, const unsigned int)
 
const char * etheraddr_string (netdissect_options *, const uint8_t *)
 
const char * le64addr_string (netdissect_options *, const uint8_t *)
 
const char * tcpport_string (netdissect_options *, u_short)
 
const char * udpport_string (netdissect_options *, u_short)
 
const char * isonsap_string (netdissect_options *, const uint8_t *, u_int)
 
const char * dnaddr_string (netdissect_options *, u_short)
 
const char * ipxsap_string (netdissect_options *, u_short)
 
const char * ipaddr_string (netdissect_options *, const u_char *)
 
const char * ip6addr_string (netdissect_options *, const u_char *)
 
const char * intoa (uint32_t)
 
void init_addrtoname (netdissect_options *, uint32_t, uint32_t)
 
struct hnamememnewhnamemem (netdissect_options *)
 
struct h6namememnewh6namemem (netdissect_options *)
 
const char * ieee8021q_tci_string (const uint16_t)
 
static const char * get_linkaddr_string (netdissect_options *ndo, const uint8_t *p, const unsigned int type, const unsigned int len)
 
static const char * get_etheraddr_string (netdissect_options *ndo, const uint8_t *p)
 
static const char * get_le64addr_string (netdissect_options *ndo, const u_char *p)
 
static const char * get_isonsap_string (netdissect_options *ndo, const uint8_t *nsap, u_int nsap_length)
 
static const char * get_ipaddr_string (netdissect_options *ndo, const u_char *p)
 
static const char * get_ip6addr_string (netdissect_options *ndo, const u_char *p)
 

Macro Definition Documentation

◆ BUFSIZE

#define BUFSIZE   128

Definition at line 42 of file addrtoname.h.

◆ GET_ETHERADDR_STRING

#define GET_ETHERADDR_STRING (   p)    get_etheraddr_string(ndo, (const u_char *)(p))

Definition at line 117 of file addrtoname.h.

◆ GET_IP6ADDR_STRING

#define GET_IP6ADDR_STRING (   p)    get_ip6addr_string(ndo, (const u_char *)(p))

Definition at line 121 of file addrtoname.h.

◆ GET_IPADDR_STRING

#define GET_IPADDR_STRING (   p)    get_ipaddr_string(ndo, (const u_char *)(p))

Definition at line 120 of file addrtoname.h.

◆ GET_ISONSAP_STRING

#define GET_ISONSAP_STRING (   nsap,
  nsap_length 
)    get_isonsap_string(ndo, (const u_char *)(nsap), nsap_length)

Definition at line 119 of file addrtoname.h.

◆ GET_LE64ADDR_STRING

#define GET_LE64ADDR_STRING (   p)    get_le64addr_string(ndo, (const u_char *)(p))

Definition at line 118 of file addrtoname.h.

◆ GET_LINKADDR_STRING

#define GET_LINKADDR_STRING (   p,
  type,
  len 
)    get_linkaddr_string(ndo, (const u_char *)(p), type, len)

Definition at line 116 of file addrtoname.h.

◆ INET6_ADDRSTRLEN

#define INET6_ADDRSTRLEN   46

Definition at line 29 of file addrtoname.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
LINKADDR_ETHER 
LINKADDR_FRELAY 
LINKADDR_IEEE1394 
LINKADDR_ATM 
LINKADDR_OTHER 

Definition at line 34 of file addrtoname.h.

Function Documentation

◆ dnaddr_string()

const char* dnaddr_string ( netdissect_options ndo,
u_short  dnaddr 
)

◆ etheraddr_string()

◆ get_etheraddr_string()

static const char* get_etheraddr_string ( netdissect_options ndo,
const uint8_t *  p 
)
inlinestatic

Definition at line 76 of file addrtoname.h.

References etheraddr_string(), MAC_ADDR_LEN, nd_trunc_longjmp(), and ND_TTEST_LEN.

◆ get_ip6addr_string()

static const char* get_ip6addr_string ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 109 of file addrtoname.h.

References ip6addr_string(), nd_trunc_longjmp(), and ND_TTEST_16.

◆ get_ipaddr_string()

static const char* get_ipaddr_string ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 101 of file addrtoname.h.

References ipaddr_string(), nd_trunc_longjmp(), and ND_TTEST_4.

◆ get_isonsap_string()

static const char* get_isonsap_string ( netdissect_options ndo,
const uint8_t *  nsap,
u_int  nsap_length 
)
inlinestatic

Definition at line 92 of file addrtoname.h.

References isonsap_string(), nd_trunc_longjmp(), and ND_TTEST_LEN.

◆ get_le64addr_string()

static const char* get_le64addr_string ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 84 of file addrtoname.h.

References le64addr_string(), nd_trunc_longjmp(), and ND_TTEST_8.

◆ get_linkaddr_string()

static const char* get_linkaddr_string ( netdissect_options ndo,
const uint8_t *  p,
const unsigned int  type,
const unsigned int  len 
)
inlinestatic

Definition at line 67 of file addrtoname.h.

References linkaddr_string(), nd_trunc_longjmp(), and ND_TTEST_LEN.

◆ ieee8021q_tci_string()

const char* ieee8021q_tci_string ( const uint16_t  tci)

Definition at line 1325 of file addrtoname.c.

References snprintf().

Referenced by ether_common_print(), of10_bsn_actions_print(), sll2_if_print(), and sll_if_print().

◆ init_addrtoname()

void init_addrtoname ( netdissect_options ndo,
uint32_t  localnet,
uint32_t  mask 
)

◆ intoa()

const char* intoa ( uint32_t  addr)

◆ ip6addr_string()

◆ ipaddr_string()

◆ ipxsap_string()

const char* ipxsap_string ( netdissect_options ndo,
u_short  port 
)

◆ isonsap_string()

const char* isonsap_string ( netdissect_options ndo,
const uint8_t *  nsap,
u_int  nsap_length 
)

◆ le64addr_string()

const char* le64addr_string ( netdissect_options ndo,
const uint8_t *  ep 
)

◆ linkaddr_string()

const char* linkaddr_string ( netdissect_options ndo,
const uint8_t *  ep,
const unsigned int  type,
const unsigned int  len 
)

◆ newh6namemem()

struct h6namemem* newh6namemem ( netdissect_options ndo)

Definition at line 1305 of file addrtoname.c.

References netdissect_options::ndo_error, and S_ERR_ND_MEM_ALLOC.

Referenced by ip6addr_string().

◆ newhnamemem()

◆ tcpport_string()

const char* tcpport_string ( netdissect_options ndo,
u_short  port 
)

◆ udpport_string()

const char* udpport_string ( netdissect_options ndo,
u_short  port 
)