Listing 1.5 Name Service Packet Header FLAGS
Subfield Values
NS_Header.h
#define NBTNS_R_BIT 0x8000 /* The 'R'esponse bit */
/* OPCODE values */
#define OPCODE_QUERY 0x0000 /* Query (0<<11) */
#define OPCODE_REGISTER 0x2800 /* Registration (5<<11) */
#define OPCODE_RELEASE 0x3000 /* Release (6<<11) */
#define OPCODE_WACK 0x3800 /* WACK (7<<11) */
#define OPCODE_REFRESH 0x4000 /* Refresh (8<<11) */
#define OPCODE_ALTREFRESH 0x4800 /* Alt Refresh (9<<11) */
#define OPCODE_MULTIHOMED 0x7800 /* Multi-homed (f<<11) */
#define OPCODE_MASK 0x7800 /* Mask */
/* NM_FLAGS subfield bits */
#define NM_AA_BIT 0x0400 /* Authoritative Answer */
#define NM_TR_BIT 0x0200 /* TRuncation flag */
#define NM_RD_BIT 0x0100 /* Recursion Desired */
#define NM_RA_BIT 0x0080 /* Recursion Available */
#define NM_B_BIT 0x0010 /* Broadcast flag */
/* Return Codes */
#define RCODE_POS_RSP 0x0000 /* Positive Response */
#define RCODE_FMT_ERR 0x0001 /* Format Error */
#define RCODE_SRV_ERR 0x0002 /* Server failure */
#define RCODE_NAM_ERR 0x0003 /* Name Not Found */
#define RCODE_IMP_ERR 0x0004 /* Unsupported request */
#define RCODE_RFS_ERR 0x0005 /* Refused */
#define RCODE_ACT_ERR 0x0006 /* Active error */
#define RCODE_CFT_ERR 0x0007 /* Name in conflict */
#define RCODE_MASK 0x0007 /* Mask */
/* Used to set the record count fields. */
#define QUERYREC 0x1000 /* Query Record */
#define ANSREC 0x0100 /* Answer Record */
#define NSREC 0x0010 /* NS Rec (never used) */
#define ADDREC 0x0001 /* Additional Record */
$Revision: 1.20 $
$Date: 2003/06/28 15:46:32 $
|
Copyright © 1999-2003 Christopher R. Hertel
Released under the terms of the
LGPL
|
|