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


#define LWRES_LWPACKETFLAG_RESPONSE   0x0001U /* if set, pkt is a response */
#define LWRES_FLAG_SECUREDATA   0x00000002U
#define LWRES_OPCODE_NOOP   0x00000000U
#define LWRES_ADDR_LEN   6
#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 */


typedef struct lwres_addr lwres_addr_t


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)


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

Macro Definition Documentation


#define LWRDATA_VALIDATED   0x00000001

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


#define LWRES_ADDR_LEN   6

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


#define LWRES_ADDRTYPE_V4   0x00000001U /* ipv4 */

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


#define LWRES_ADDRTYPE_V6   0x00000002U /* ipv6 */

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


#define LWRES_FLAG_SECUREDATA   0x00000002U

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



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



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



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



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



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



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



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


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

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



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


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

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


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

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



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



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



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


#define LWRES_OPCODE_NOOP   0x00000000U

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



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 

◆ lwres_printbinlen()

static unsigned lwres_printbinlen ( netdissect_options ndo,
const u_char *  p0 

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 

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 

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[]

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[]

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

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

◆ opcode

const struct tok opcode[]
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().