home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NeXTSTEP 3.0
/
NeXTSTEP3.0.iso
/
NextDeveloper
/
Headers
/
bsd
/
arpa
/
m68k
/
nameser.h
Wrap
Text File
|
1992-03-04
|
1KB
|
45 lines
/* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved.
*
* File: bsd/arpa/m68k/nameser.h
*
* m68k dependant name server data structures.
*/
/*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* @(#)nameser.h 5.17 (Berkeley) 11/17/87
*/
/*
* Structure for query header, the order of the fields is machine and
* compiler dependent, in our case, the bits within a byte are assignd
* least significant first, while the order of transmition is most
* significant first. This requires a somewhat confusing rearrangement.
*/
typedef struct {
u_short id; /* query identification number */
/* Bit zero on left: Gould and similar architectures */
/* fields in third byte */
u_char qr:1; /* response flag */
u_char opcode:4; /* purpose of message */
u_char aa:1; /* authoritive answer */
u_char tc:1; /* truncated message */
u_char rd:1; /* recursion desired */
/* fields in fourth byte */
u_char ra:1; /* recursion available */
u_char pr:1; /* primary server required (non standard) */
u_char unused:2; /* unused bits */
u_char rcode:4; /* response code */
/* remaining bytes */
u_short qdcount; /* number of question entries */
u_short ancount; /* number of answer en4P6s */
u_short nscount; /* number of authority entries */
u_short arcount; /* number of resource entries */
} HEADER;