/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 1994 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* Portions of this source code were derived from Berkeley 4.3 BSD
* under license from the Regents of the University of California.
*/
#ifndef _ARPA_NAMESER_H
#define _ARPA_NAMESER_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/isa_defs.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Define constants based on rfc883
*/
/* Number of bytes of fixed size data in query structure */
/* number of bytes of fixed size data in resource record */
/*
* Internet nameserver port number
*/
/*
* Currently defined opcodes
*/
/* #define xxx 0x3 */ /* 0x3 reserved */
/* non standard */
/*
* Currently defined response codes
*/
/* non standard */
/*
* Type values for resources and queries
*/
/* non standard */
/* Query type values which do not appear in resource records */
/*
* Values for class field
*/
/* Query class values which do not appear in resource records */
/*
* Status return codes for T_UNSPEC conversion routines
*/
#define CONV_SUCCESS 0
/*
* 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 {
#if defined(_BIT_FIELDS_HTOL) || defined(BIT_ZERO_ON_LEFT)
/* Bit zero on left: SPARC and similar architectures */
/* fields in third byte */
/* fields in fourth byte */
#else
#if defined(_BIT_FIELDS_LTOH) || defined(BIT_ZERO_ON_RIGHT)
/* Bit zero on right: Intel x86 and similar architectures */
/* fields in third byte */
/* fields in fourth byte */
#else
/* you must determine what the correct bit order is for your compiler */
#endif
#endif
/* remaining bytes */
} HEADER;
/*
* Defines for handling compressed domain names
*/
/*
* Structure for passing resource records around.
*/
struct rrec {
};
/*
* Pointer is advanced; we assume that both arguments
* are lvalues and will already be in registers.
* cp MUST be u_char *.
*/
(s) = *(cp)++ << 8; \
(s) |= *(cp)++; \
}
(l) = *(cp)++ << 8; \
(l) |= *(cp)++; (l) <<= 8; \
(l) |= *(cp)++; (l) <<= 8; \
(l) |= *(cp)++; \
}
*(cp)++ = (s) >> 8; \
*(cp)++ = (s); \
}
/*
* Warning: PUTLONG destroys its first argument.
*/
(cp)[3] = l; \
(cp)[0] = l >> 8; \
}
#ifdef __cplusplus
}
#endif
#endif /* _ARPA_NAMESER_H */