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

Go to the source code of this file.

Data Structures

struct  lwres_lwpacket
 
struct  lwres_nooprequest_t
 
struct  lwres_noopresponse_t
 
struct  lwres_addr
 
struct  lwres_gabnrequest_t
 
struct  lwres_gabnresponse_t
 
struct  lwres_gnbarequest_t
 
struct  lwres_gnbaresponse_t
 
struct  lwres_grbnrequest_t
 
struct  lwres_grbnresponse_t
 

Macros

#define ND_LONGJMP_FROM_TCHECK
 
#define LWRES_LWPACKETFLAG_RESPONSE   0x0001U /* if set, pkt is a response */
 
#define LWRES_LWPACKETVERSION_0   0
 
#define LWRES_FLAG_TRUSTNOTREQUIRED   0x00000001U
 
#define LWRES_FLAG_SECUREDATA   0x00000002U
 
#define LWRES_OPCODE_NOOP   0x00000000U
 
#define LWRES_OPCODE_GETADDRSBYNAME   0x00010001U
 
#define LWRES_ADDR_LEN   6
 
#define LWRES_GABNREQUEST_LEN   10
 
#define LWRES_GABNRESPONSE_LEN   10
 
#define LWRES_OPCODE_GETNAMEBYADDR   0x00010002U
 
#define LWRES_GNBAREQUEST_LEN   4
 
#define LWRES_GNBARESPONSE_LEN   8
 
#define LWRES_OPCODE_GETRDATABYNAME   0x00010003U
 
#define LWRES_GRBNREQUEST_LEN   10
 
#define LWRES_GRBNRESPONSE_LEN   16
 
#define LWRDATA_VALIDATED   0x00000001
 
#define LWRES_ADDRTYPE_V4   0x00000001U /* ipv4 */
 
#define LWRES_ADDRTYPE_V6   0x00000002U /* ipv6 */
 
#define LWRES_MAX_ALIASES   16 /* max # of aliases */
 
#define LWRES_MAX_ADDRS   64 /* max # of addrs */
 

Typedefs

typedef struct lwres_addr lwres_addr_t
 

Functions

static unsigned lwres_printname (netdissect_options *ndo, size_t l, const u_char *p0)
 
static unsigned lwres_printnamelen (netdissect_options *ndo, const u_char *p)
 
static unsigned lwres_printbinlen (netdissect_options *ndo, const u_char *p0)
 
static int lwres_printaddr (netdissect_options *ndo, const u_char *p0)
 
void lwres_print (netdissect_options *ndo, const u_char *bp, u_int length)
 

Variables

static const struct tok opcode []
 
const struct tok ns_type2str []
 
const struct tok ns_class2str []
 

Macro Definition Documentation

◆ LWRDATA_VALIDATED

#define LWRDATA_VALIDATED   0x00000001

Definition at line 172 of file print-lwres.c.

◆ LWRES_ADDR_LEN

#define LWRES_ADDR_LEN   6

Definition at line 99 of file print-lwres.c.

◆ LWRES_ADDRTYPE_V4

#define LWRES_ADDRTYPE_V4   0x00000001U /* ipv4 */

Definition at line 174 of file print-lwres.c.

◆ LWRES_ADDRTYPE_V6

#define LWRES_ADDRTYPE_V6   0x00000002U /* ipv6 */

Definition at line 175 of file print-lwres.c.

◆ LWRES_FLAG_SECUREDATA

#define LWRES_FLAG_SECUREDATA   0x00000002U

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

◆ LWRES_FLAG_TRUSTNOTREQUIRED

#define LWRES_FLAG_TRUSTNOTREQUIRED   0x00000001U

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

◆ LWRES_GABNREQUEST_LEN

#define LWRES_GABNREQUEST_LEN   10

Definition at line 108 of file print-lwres.c.

◆ LWRES_GABNRESPONSE_LEN

#define LWRES_GABNRESPONSE_LEN   10

Definition at line 120 of file print-lwres.c.

◆ LWRES_GNBAREQUEST_LEN

#define LWRES_GNBAREQUEST_LEN   4

Definition at line 131 of file print-lwres.c.

◆ LWRES_GNBARESPONSE_LEN

#define LWRES_GNBARESPONSE_LEN   8

Definition at line 141 of file print-lwres.c.

◆ LWRES_GRBNREQUEST_LEN

#define LWRES_GRBNREQUEST_LEN   10

Definition at line 156 of file print-lwres.c.

◆ LWRES_GRBNRESPONSE_LEN

#define LWRES_GRBNRESPONSE_LEN   16

Definition at line 170 of file print-lwres.c.

◆ LWRES_LWPACKETFLAG_RESPONSE

#define LWRES_LWPACKETFLAG_RESPONSE   0x0001U /* if set, pkt is a response */

Definition at line 63 of file print-lwres.c.

◆ LWRES_LWPACKETVERSION_0

#define LWRES_LWPACKETVERSION_0   0

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

◆ LWRES_MAX_ADDRS

#define LWRES_MAX_ADDRS   64 /* max # of addrs */

Definition at line 178 of file print-lwres.c.

◆ LWRES_MAX_ALIASES

#define LWRES_MAX_ALIASES   16 /* max # of aliases */

Definition at line 177 of file print-lwres.c.

◆ LWRES_OPCODE_GETADDRSBYNAME

#define LWRES_OPCODE_GETADDRSBYNAME   0x00010001U

Definition at line 90 of file print-lwres.c.

◆ LWRES_OPCODE_GETNAMEBYADDR

#define LWRES_OPCODE_GETNAMEBYADDR   0x00010002U

Definition at line 125 of file print-lwres.c.

◆ LWRES_OPCODE_GETRDATABYNAME

#define LWRES_OPCODE_GETRDATABYNAME   0x00010003U

Definition at line 146 of file print-lwres.c.

◆ LWRES_OPCODE_NOOP

#define LWRES_OPCODE_NOOP   0x00000000U

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

◆ ND_LONGJMP_FROM_TCHECK

#define ND_LONGJMP_FROM_TCHECK

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

Typedef Documentation

◆ lwres_addr_t

typedef struct lwres_addr lwres_addr_t

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

Function Documentation

◆ lwres_print()

void lwres_print ( netdissect_options ndo,
const u_char *  bp,
u_int  length 
)

Definition at line 274 of file print-lwres.c.

References lwres_gabnrequest_t::addrtypes, lwres_lwpacket::authlength, lwres_lwpacket::authtype, C_IN, lwres_gabnrequest_t::flags, lwres_gabnresponse_t::flags, lwres_gnbarequest_t::flags, lwres_gnbaresponse_t::flags, lwres_grbnrequest_t::flags, lwres_grbnresponse_t::flags, GET_BE_U_2, GET_BE_U_4, lwres_lwpacket::length, LWRES_ADDRTYPE_V4, LWRES_ADDRTYPE_V6, LWRES_GABNREQUEST_LEN, LWRES_GABNRESPONSE_LEN, LWRES_GNBAREQUEST_LEN, LWRES_GNBARESPONSE_LEN, LWRES_GRBNREQUEST_LEN, LWRES_GRBNRESPONSE_LEN, LWRES_LWPACKETFLAG_RESPONSE, LWRES_LWPACKETVERSION_0, LWRES_OPCODE_GETADDRSBYNAME, LWRES_OPCODE_GETNAMEBYADDR, LWRES_OPCODE_GETRDATABYNAME, LWRES_OPCODE_NOOP, lwres_printaddr(), lwres_printbinlen(), lwres_printname(), lwres_printnamelen(), lwres_gabnresponse_t::naddrs, lwres_gabnresponse_t::naliases, lwres_gnbaresponse_t::naliases, lwres_gabnrequest_t::namelen, lwres_grbnrequest_t::namelen, ND_PRINT, nd_print_invalid(), ND_TCHECK_2, ND_TCHECK_4, netdissect_options::ndo_protocol, netdissect_options::ndo_vflag, lwres_grbnresponse_t::nrdatas, ns_class2str, ns_type2str, lwres_grbnresponse_t::nsigs, opcode, lwres_lwpacket::opcode, lwres_lwpacket::pktflags, lwres_grbnrequest_t::rdclass, lwres_grbnresponse_t::rdclass, lwres_grbnrequest_t::rdtype, lwres_grbnresponse_t::rdtype, lwres_gabnresponse_t::realnamelen, lwres_gnbaresponse_t::realnamelen, lwres_lwpacket::recvlength, lwres_lwpacket::result, lwres_lwpacket::serial, tok2str(), lwres_grbnresponse_t::ttl, unsigned_relts_print(), and lwres_lwpacket::version.

Referenced by udp_print().

◆ lwres_printaddr()

static int lwres_printaddr ( netdissect_options ndo,
const u_char *  p0 
)
static

◆ lwres_printbinlen()

static unsigned lwres_printbinlen ( netdissect_options ndo,
const u_char *  p0 
)
static

Definition at line 217 of file print-lwres.c.

References GET_BE_U_2, GET_U_1, and ND_PRINT.

Referenced by lwres_print().

◆ lwres_printname()

static unsigned lwres_printname ( netdissect_options ndo,
size_t  l,
const u_char *  p0 
)
static

Definition at line 193 of file print-lwres.c.

References GET_U_1, ND_PRINT, and nd_printn().

Referenced by lwres_print(), and lwres_printnamelen().

◆ lwres_printnamelen()

static unsigned lwres_printnamelen ( netdissect_options ndo,
const u_char *  p 
)
static

Definition at line 205 of file print-lwres.c.

References GET_BE_U_2, and lwres_printname().

Referenced by lwres_print().

Variable Documentation

◆ ns_class2str

const struct tok ns_class2str[]
extern

Definition at line 373 of file print-domain.c.

Referenced by lwres_print(), ns_qprint(), and ns_rprint().

◆ ns_type2str

const struct tok ns_type2str[]
extern

Definition at line 373 of file print-domain.c.

Referenced by lwres_print(), ns_qprint(), and ns_rprint().

◆ opcode

const struct tok opcode[]
static
Initial value:
= {
{ 0x00000000U , "noop", },
{ 0x00010001U , "getaddrsbyname", },
{ 0x00010002U , "getnamebyaddr", },
{ 0x00010003U , "getrdatabyname", },
{ 0, NULL, },
}

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

Referenced by bos_reply_print(), cb_reply_print(), cfm_print(), fs_reply_print(), is_ubik(), kauth_reply_print(), lwres_print(), mpcp_print(), nbt_udp137_print(), ntp_control_print(), prot_reply_print(), rx_cache_find(), rx_print(), tftp_print(), ubik_reply_print(), vldb_reply_print(), and vol_reply_print().