Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/arpa
File: nameser.h
/*
[0] Fix | Delete
* Copyright (c) 1983, 1989, 1993
[1] Fix | Delete
* The Regents of the University of California. All rights reserved.
[2] Fix | Delete
*
[3] Fix | Delete
* Redistribution and use in source and binary forms, with or without
[4] Fix | Delete
* modification, are permitted provided that the following conditions
[5] Fix | Delete
* are met:
[6] Fix | Delete
* 1. Redistributions of source code must retain the above copyright
[7] Fix | Delete
* notice, this list of conditions and the following disclaimer.
[8] Fix | Delete
* 2. Redistributions in binary form must reproduce the above copyright
[9] Fix | Delete
* notice, this list of conditions and the following disclaimer in the
[10] Fix | Delete
* documentation and/or other materials provided with the distribution.
[11] Fix | Delete
* 4. Neither the name of the University nor the names of its contributors
[12] Fix | Delete
* may be used to endorse or promote products derived from this software
[13] Fix | Delete
* without specific prior written permission.
[14] Fix | Delete
*
[15] Fix | Delete
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
[16] Fix | Delete
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
[17] Fix | Delete
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
[18] Fix | Delete
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
[19] Fix | Delete
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
[20] Fix | Delete
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
[21] Fix | Delete
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
[22] Fix | Delete
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
[23] Fix | Delete
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
[24] Fix | Delete
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
[25] Fix | Delete
* SUCH DAMAGE.
[26] Fix | Delete
*/
[27] Fix | Delete
[28] Fix | Delete
/*
[29] Fix | Delete
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
[30] Fix | Delete
* Copyright (c) 1996-1999 by Internet Software Consortium.
[31] Fix | Delete
*
[32] Fix | Delete
* Permission to use, copy, modify, and distribute this software for any
[33] Fix | Delete
* purpose with or without fee is hereby granted, provided that the above
[34] Fix | Delete
* copyright notice and this permission notice appear in all copies.
[35] Fix | Delete
*
[36] Fix | Delete
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
[37] Fix | Delete
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
[38] Fix | Delete
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
[39] Fix | Delete
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
[40] Fix | Delete
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
[41] Fix | Delete
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
[42] Fix | Delete
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
[43] Fix | Delete
* SOFTWARE.
[44] Fix | Delete
*/
[45] Fix | Delete
[46] Fix | Delete
#ifndef _ARPA_NAMESER_H_
[47] Fix | Delete
#define _ARPA_NAMESER_H_
[48] Fix | Delete
[49] Fix | Delete
#include <sys/param.h>
[50] Fix | Delete
#include <sys/types.h>
[51] Fix | Delete
#include <stdint.h>
[52] Fix | Delete
[53] Fix | Delete
/*
[54] Fix | Delete
* Define constants based on RFC 883, RFC 1034, RFC 1035
[55] Fix | Delete
*/
[56] Fix | Delete
#define NS_PACKETSZ 512 /*%< default UDP packet size */
[57] Fix | Delete
#define NS_MAXDNAME 1025 /*%< maximum domain name */
[58] Fix | Delete
#define NS_MAXMSG 65535 /*%< maximum message size */
[59] Fix | Delete
#define NS_MAXCDNAME 255 /*%< maximum compressed domain name */
[60] Fix | Delete
#define NS_MAXLABEL 63 /*%< maximum length of domain label */
[61] Fix | Delete
#define NS_HFIXEDSZ 12 /*%< #/bytes of fixed data in header */
[62] Fix | Delete
#define NS_QFIXEDSZ 4 /*%< #/bytes of fixed data in query */
[63] Fix | Delete
#define NS_RRFIXEDSZ 10 /*%< #/bytes of fixed data in r record */
[64] Fix | Delete
#define NS_INT32SZ 4 /*%< #/bytes of data in a uint32_t */
[65] Fix | Delete
#define NS_INT16SZ 2 /*%< #/bytes of data in a uint16_t */
[66] Fix | Delete
#define NS_INT8SZ 1 /*%< #/bytes of data in a uint8_t */
[67] Fix | Delete
#define NS_INADDRSZ 4 /*%< IPv4 T_A */
[68] Fix | Delete
#define NS_IN6ADDRSZ 16 /*%< IPv6 T_AAAA */
[69] Fix | Delete
#define NS_CMPRSFLGS 0xc0 /*%< Flag bits indicating name compression. */
[70] Fix | Delete
#define NS_DEFAULTPORT 53 /*%< For both TCP and UDP. */
[71] Fix | Delete
/*
[72] Fix | Delete
* These can be expanded with synonyms, just keep ns_parse.c:ns_parserecord()
[73] Fix | Delete
* in synch with it.
[74] Fix | Delete
*/
[75] Fix | Delete
typedef enum __ns_sect {
[76] Fix | Delete
ns_s_qd = 0, /*%< Query: Question. */
[77] Fix | Delete
ns_s_zn = 0, /*%< Update: Zone. */
[78] Fix | Delete
ns_s_an = 1, /*%< Query: Answer. */
[79] Fix | Delete
ns_s_pr = 1, /*%< Update: Prerequisites. */
[80] Fix | Delete
ns_s_ns = 2, /*%< Query: Name servers. */
[81] Fix | Delete
ns_s_ud = 2, /*%< Update: Update. */
[82] Fix | Delete
ns_s_ar = 3, /*%< Query|Update: Additional records. */
[83] Fix | Delete
ns_s_max = 4
[84] Fix | Delete
} ns_sect;
[85] Fix | Delete
[86] Fix | Delete
/*%
[87] Fix | Delete
* This is a message handle. It is caller allocated and has no dynamic data.
[88] Fix | Delete
* This structure is intended to be opaque to all but ns_parse.c, thus the
[89] Fix | Delete
* leading _'s on the member names. Use the accessor functions, not the _'s.
[90] Fix | Delete
*/
[91] Fix | Delete
typedef struct __ns_msg {
[92] Fix | Delete
const unsigned char *_msg, *_eom;
[93] Fix | Delete
uint16_t _id, _flags, _counts[ns_s_max];
[94] Fix | Delete
const unsigned char *_sections[ns_s_max];
[95] Fix | Delete
ns_sect _sect;
[96] Fix | Delete
int _rrnum;
[97] Fix | Delete
const unsigned char *_msg_ptr;
[98] Fix | Delete
} ns_msg;
[99] Fix | Delete
[100] Fix | Delete
/* Private data structure - do not use from outside library. */
[101] Fix | Delete
struct _ns_flagdata { int mask, shift; };
[102] Fix | Delete
extern const struct _ns_flagdata _ns_flagdata[];
[103] Fix | Delete
[104] Fix | Delete
/* Accessor macros - this is part of the public interface. */
[105] Fix | Delete
[106] Fix | Delete
#define ns_msg_id(handle) ((handle)._id + 0)
[107] Fix | Delete
#define ns_msg_base(handle) ((handle)._msg + 0)
[108] Fix | Delete
#define ns_msg_end(handle) ((handle)._eom + 0)
[109] Fix | Delete
#define ns_msg_size(handle) ((handle)._eom - (handle)._msg)
[110] Fix | Delete
#define ns_msg_count(handle, section) ((handle)._counts[section] + 0)
[111] Fix | Delete
[112] Fix | Delete
/*%
[113] Fix | Delete
* This is a parsed record. It is caller allocated and has no dynamic data.
[114] Fix | Delete
*/
[115] Fix | Delete
typedef struct __ns_rr {
[116] Fix | Delete
char name[NS_MAXDNAME];
[117] Fix | Delete
uint16_t type;
[118] Fix | Delete
uint16_t rr_class;
[119] Fix | Delete
uint32_t ttl;
[120] Fix | Delete
uint16_t rdlength;
[121] Fix | Delete
const unsigned char * rdata;
[122] Fix | Delete
} ns_rr;
[123] Fix | Delete
[124] Fix | Delete
/* Accessor macros - this is part of the public interface. */
[125] Fix | Delete
#define ns_rr_name(rr) (((rr).name[0] != '\0') ? (rr).name : ".")
[126] Fix | Delete
#define ns_rr_type(rr) ((ns_type)((rr).type + 0))
[127] Fix | Delete
#define ns_rr_class(rr) ((ns_class)((rr).rr_class + 0))
[128] Fix | Delete
#define ns_rr_ttl(rr) ((rr).ttl + 0)
[129] Fix | Delete
#define ns_rr_rdlen(rr) ((rr).rdlength + 0)
[130] Fix | Delete
#define ns_rr_rdata(rr) ((rr).rdata + 0)
[131] Fix | Delete
[132] Fix | Delete
/*%
[133] Fix | Delete
* These don't have to be in the same order as in the packet flags word,
[134] Fix | Delete
* and they can even overlap in some cases, but they will need to be kept
[135] Fix | Delete
* in synch with ns_parse.c:ns_flagdata[].
[136] Fix | Delete
*/
[137] Fix | Delete
typedef enum __ns_flag {
[138] Fix | Delete
ns_f_qr, /*%< Question/Response. */
[139] Fix | Delete
ns_f_opcode, /*%< Operation code. */
[140] Fix | Delete
ns_f_aa, /*%< Authoritative Answer. */
[141] Fix | Delete
ns_f_tc, /*%< Truncation occurred. */
[142] Fix | Delete
ns_f_rd, /*%< Recursion Desired. */
[143] Fix | Delete
ns_f_ra, /*%< Recursion Available. */
[144] Fix | Delete
ns_f_z, /*%< MBZ. */
[145] Fix | Delete
ns_f_ad, /*%< Authentic Data (DNSSEC). */
[146] Fix | Delete
ns_f_cd, /*%< Checking Disabled (DNSSEC). */
[147] Fix | Delete
ns_f_rcode, /*%< Response code. */
[148] Fix | Delete
ns_f_max
[149] Fix | Delete
} ns_flag;
[150] Fix | Delete
[151] Fix | Delete
/*%
[152] Fix | Delete
* Currently defined opcodes.
[153] Fix | Delete
*/
[154] Fix | Delete
typedef enum __ns_opcode {
[155] Fix | Delete
ns_o_query = 0, /*%< Standard query. */
[156] Fix | Delete
ns_o_iquery = 1, /*%< Inverse query (deprecated/unsupported). */
[157] Fix | Delete
ns_o_status = 2, /*%< Name server status query (unsupported). */
[158] Fix | Delete
/* Opcode 3 is undefined/reserved. */
[159] Fix | Delete
ns_o_notify = 4, /*%< Zone change notification. */
[160] Fix | Delete
ns_o_update = 5, /*%< Zone update message. */
[161] Fix | Delete
ns_o_max = 6
[162] Fix | Delete
} ns_opcode;
[163] Fix | Delete
[164] Fix | Delete
/*%
[165] Fix | Delete
* Currently defined response codes.
[166] Fix | Delete
*/
[167] Fix | Delete
typedef enum __ns_rcode {
[168] Fix | Delete
ns_r_noerror = 0, /*%< No error occurred. */
[169] Fix | Delete
ns_r_formerr = 1, /*%< Format error. */
[170] Fix | Delete
ns_r_servfail = 2, /*%< Server failure. */
[171] Fix | Delete
ns_r_nxdomain = 3, /*%< Name error. */
[172] Fix | Delete
ns_r_notimpl = 4, /*%< Unimplemented. */
[173] Fix | Delete
ns_r_refused = 5, /*%< Operation refused. */
[174] Fix | Delete
/* these are for BIND_UPDATE */
[175] Fix | Delete
ns_r_yxdomain = 6, /*%< Name exists */
[176] Fix | Delete
ns_r_yxrrset = 7, /*%< RRset exists */
[177] Fix | Delete
ns_r_nxrrset = 8, /*%< RRset does not exist */
[178] Fix | Delete
ns_r_notauth = 9, /*%< Not authoritative for zone */
[179] Fix | Delete
ns_r_notzone = 10, /*%< Zone of record different from zone section */
[180] Fix | Delete
ns_r_max = 11,
[181] Fix | Delete
/* The following are EDNS extended rcodes */
[182] Fix | Delete
ns_r_badvers = 16,
[183] Fix | Delete
/* The following are TSIG errors */
[184] Fix | Delete
ns_r_badsig = 16,
[185] Fix | Delete
ns_r_badkey = 17,
[186] Fix | Delete
ns_r_badtime = 18
[187] Fix | Delete
} ns_rcode;
[188] Fix | Delete
[189] Fix | Delete
/* BIND_UPDATE */
[190] Fix | Delete
typedef enum __ns_update_operation {
[191] Fix | Delete
ns_uop_delete = 0,
[192] Fix | Delete
ns_uop_add = 1,
[193] Fix | Delete
ns_uop_max = 2
[194] Fix | Delete
} ns_update_operation;
[195] Fix | Delete
[196] Fix | Delete
/*%
[197] Fix | Delete
* This structure is used for TSIG authenticated messages
[198] Fix | Delete
*/
[199] Fix | Delete
struct ns_tsig_key {
[200] Fix | Delete
char name[NS_MAXDNAME], alg[NS_MAXDNAME];
[201] Fix | Delete
unsigned char *data;
[202] Fix | Delete
int len;
[203] Fix | Delete
};
[204] Fix | Delete
typedef struct ns_tsig_key ns_tsig_key;
[205] Fix | Delete
[206] Fix | Delete
/*%
[207] Fix | Delete
* This structure is used for TSIG authenticated TCP messages
[208] Fix | Delete
*/
[209] Fix | Delete
struct ns_tcp_tsig_state {
[210] Fix | Delete
int counter;
[211] Fix | Delete
struct dst_key *key;
[212] Fix | Delete
void *ctx;
[213] Fix | Delete
unsigned char sig[NS_PACKETSZ];
[214] Fix | Delete
int siglen;
[215] Fix | Delete
};
[216] Fix | Delete
typedef struct ns_tcp_tsig_state ns_tcp_tsig_state;
[217] Fix | Delete
[218] Fix | Delete
#define NS_TSIG_FUDGE 300
[219] Fix | Delete
#define NS_TSIG_TCP_COUNT 100
[220] Fix | Delete
#define NS_TSIG_ALG_HMAC_MD5 "HMAC-MD5.SIG-ALG.REG.INT"
[221] Fix | Delete
[222] Fix | Delete
#define NS_TSIG_ERROR_NO_TSIG -10
[223] Fix | Delete
#define NS_TSIG_ERROR_NO_SPACE -11
[224] Fix | Delete
#define NS_TSIG_ERROR_FORMERR -12
[225] Fix | Delete
[226] Fix | Delete
/*%
[227] Fix | Delete
* Currently defined type values for resources and queries.
[228] Fix | Delete
*/
[229] Fix | Delete
typedef enum __ns_type
[230] Fix | Delete
{
[231] Fix | Delete
ns_t_invalid = 0,
[232] Fix | Delete
[233] Fix | Delete
ns_t_a = 1,
[234] Fix | Delete
ns_t_ns = 2,
[235] Fix | Delete
ns_t_md = 3,
[236] Fix | Delete
ns_t_mf = 4,
[237] Fix | Delete
ns_t_cname = 5,
[238] Fix | Delete
ns_t_soa = 6,
[239] Fix | Delete
ns_t_mb = 7,
[240] Fix | Delete
ns_t_mg = 8,
[241] Fix | Delete
ns_t_mr = 9,
[242] Fix | Delete
ns_t_null = 10,
[243] Fix | Delete
ns_t_wks = 11,
[244] Fix | Delete
ns_t_ptr = 12,
[245] Fix | Delete
ns_t_hinfo = 13,
[246] Fix | Delete
ns_t_minfo = 14,
[247] Fix | Delete
ns_t_mx = 15,
[248] Fix | Delete
ns_t_txt = 16,
[249] Fix | Delete
ns_t_rp = 17,
[250] Fix | Delete
ns_t_afsdb = 18,
[251] Fix | Delete
ns_t_x25 = 19,
[252] Fix | Delete
ns_t_isdn = 20,
[253] Fix | Delete
ns_t_rt = 21,
[254] Fix | Delete
ns_t_nsap = 22,
[255] Fix | Delete
ns_t_nsap_ptr = 23,
[256] Fix | Delete
ns_t_sig = 24,
[257] Fix | Delete
ns_t_key = 25,
[258] Fix | Delete
ns_t_px = 26,
[259] Fix | Delete
ns_t_gpos = 27,
[260] Fix | Delete
ns_t_aaaa = 28,
[261] Fix | Delete
ns_t_loc = 29,
[262] Fix | Delete
ns_t_nxt = 30,
[263] Fix | Delete
ns_t_eid = 31,
[264] Fix | Delete
ns_t_nimloc = 32,
[265] Fix | Delete
ns_t_srv = 33,
[266] Fix | Delete
ns_t_atma = 34,
[267] Fix | Delete
ns_t_naptr = 35,
[268] Fix | Delete
ns_t_kx = 36,
[269] Fix | Delete
ns_t_cert = 37,
[270] Fix | Delete
ns_t_a6 = 38,
[271] Fix | Delete
ns_t_dname = 39,
[272] Fix | Delete
ns_t_sink = 40,
[273] Fix | Delete
ns_t_opt = 41,
[274] Fix | Delete
ns_t_apl = 42,
[275] Fix | Delete
ns_t_ds = 43,
[276] Fix | Delete
ns_t_sshfp = 44,
[277] Fix | Delete
ns_t_ipseckey = 45,
[278] Fix | Delete
ns_t_rrsig = 46,
[279] Fix | Delete
ns_t_nsec = 47,
[280] Fix | Delete
ns_t_dnskey = 48,
[281] Fix | Delete
ns_t_dhcid = 49,
[282] Fix | Delete
ns_t_nsec3 = 50,
[283] Fix | Delete
ns_t_nsec3param = 51,
[284] Fix | Delete
ns_t_tlsa = 52,
[285] Fix | Delete
ns_t_smimea = 53,
[286] Fix | Delete
ns_t_hip = 55,
[287] Fix | Delete
ns_t_ninfo = 56,
[288] Fix | Delete
ns_t_rkey = 57,
[289] Fix | Delete
ns_t_talink = 58,
[290] Fix | Delete
ns_t_cds = 59,
[291] Fix | Delete
ns_t_cdnskey = 60,
[292] Fix | Delete
ns_t_openpgpkey = 61,
[293] Fix | Delete
ns_t_csync = 62,
[294] Fix | Delete
ns_t_spf = 99,
[295] Fix | Delete
ns_t_uinfo = 100,
[296] Fix | Delete
ns_t_uid = 101,
[297] Fix | Delete
ns_t_gid = 102,
[298] Fix | Delete
ns_t_unspec = 103,
[299] Fix | Delete
ns_t_nid = 104,
[300] Fix | Delete
ns_t_l32 = 105,
[301] Fix | Delete
ns_t_l64 = 106,
[302] Fix | Delete
ns_t_lp = 107,
[303] Fix | Delete
ns_t_eui48 = 108,
[304] Fix | Delete
ns_t_eui64 = 109,
[305] Fix | Delete
ns_t_tkey = 249,
[306] Fix | Delete
ns_t_tsig = 250,
[307] Fix | Delete
ns_t_ixfr = 251,
[308] Fix | Delete
ns_t_axfr = 252,
[309] Fix | Delete
ns_t_mailb = 253,
[310] Fix | Delete
ns_t_maila = 254,
[311] Fix | Delete
ns_t_any = 255,
[312] Fix | Delete
ns_t_uri = 256,
[313] Fix | Delete
ns_t_caa = 257,
[314] Fix | Delete
ns_t_avc = 258,
[315] Fix | Delete
ns_t_ta = 32768,
[316] Fix | Delete
ns_t_dlv = 32769,
[317] Fix | Delete
[318] Fix | Delete
ns_t_max = 65536
[319] Fix | Delete
} ns_type;
[320] Fix | Delete
[321] Fix | Delete
/*%
[322] Fix | Delete
* Values for class field
[323] Fix | Delete
*/
[324] Fix | Delete
typedef enum __ns_class {
[325] Fix | Delete
ns_c_invalid = 0, /*%< Cookie. */
[326] Fix | Delete
ns_c_in = 1, /*%< Internet. */
[327] Fix | Delete
ns_c_2 = 2, /*%< unallocated/unsupported. */
[328] Fix | Delete
ns_c_chaos = 3, /*%< MIT Chaos-net. */
[329] Fix | Delete
ns_c_hs = 4, /*%< MIT Hesiod. */
[330] Fix | Delete
/* Query class values which do not appear in resource records */
[331] Fix | Delete
ns_c_none = 254, /*%< for prereq. sections in update requests */
[332] Fix | Delete
ns_c_any = 255, /*%< Wildcard match. */
[333] Fix | Delete
ns_c_max = 65536
[334] Fix | Delete
} ns_class;
[335] Fix | Delete
[336] Fix | Delete
/* Certificate type values in CERT resource records. */
[337] Fix | Delete
typedef enum __ns_cert_types {
[338] Fix | Delete
cert_t_pkix = 1, /*%< PKIX (X.509v3) */
[339] Fix | Delete
cert_t_spki = 2, /*%< SPKI */
[340] Fix | Delete
cert_t_pgp = 3, /*%< PGP */
[341] Fix | Delete
cert_t_url = 253, /*%< URL private type */
[342] Fix | Delete
cert_t_oid = 254 /*%< OID private type */
[343] Fix | Delete
} ns_cert_types;
[344] Fix | Delete
[345] Fix | Delete
/*%
[346] Fix | Delete
* EDNS0 extended flags and option codes, host order.
[347] Fix | Delete
*/
[348] Fix | Delete
#define NS_OPT_DNSSEC_OK 0x8000U
[349] Fix | Delete
#define NS_OPT_NSID 3
[350] Fix | Delete
[351] Fix | Delete
/*%
[352] Fix | Delete
* Inline versions of get/put short/long. Pointer is advanced.
[353] Fix | Delete
*/
[354] Fix | Delete
#define NS_GET16(s, cp) do { \
[355] Fix | Delete
const unsigned char *t_cp = (const unsigned char *)(cp); \
[356] Fix | Delete
(s) = ((uint16_t)t_cp[0] << 8) \
[357] Fix | Delete
| ((uint16_t)t_cp[1]) \
[358] Fix | Delete
; \
[359] Fix | Delete
(cp) += NS_INT16SZ; \
[360] Fix | Delete
} while (0)
[361] Fix | Delete
[362] Fix | Delete
#define NS_GET32(l, cp) do { \
[363] Fix | Delete
const unsigned char *t_cp = (const unsigned char *)(cp); \
[364] Fix | Delete
(l) = ((uint32_t)t_cp[0] << 24) \
[365] Fix | Delete
| ((uint32_t)t_cp[1] << 16) \
[366] Fix | Delete
| ((uint32_t)t_cp[2] << 8) \
[367] Fix | Delete
| ((uint32_t)t_cp[3]) \
[368] Fix | Delete
; \
[369] Fix | Delete
(cp) += NS_INT32SZ; \
[370] Fix | Delete
} while (0)
[371] Fix | Delete
[372] Fix | Delete
#define NS_PUT16(s, cp) do { \
[373] Fix | Delete
uint16_t t_s = (uint16_t)(s); \
[374] Fix | Delete
unsigned char *t_cp = (unsigned char *)(cp); \
[375] Fix | Delete
*t_cp++ = t_s >> 8; \
[376] Fix | Delete
*t_cp = t_s; \
[377] Fix | Delete
(cp) += NS_INT16SZ; \
[378] Fix | Delete
} while (0)
[379] Fix | Delete
[380] Fix | Delete
#define NS_PUT32(l, cp) do { \
[381] Fix | Delete
uint32_t t_l = (uint32_t)(l); \
[382] Fix | Delete
unsigned char *t_cp = (unsigned char *)(cp); \
[383] Fix | Delete
*t_cp++ = t_l >> 24; \
[384] Fix | Delete
*t_cp++ = t_l >> 16; \
[385] Fix | Delete
*t_cp++ = t_l >> 8; \
[386] Fix | Delete
*t_cp = t_l; \
[387] Fix | Delete
(cp) += NS_INT32SZ; \
[388] Fix | Delete
} while (0)
[389] Fix | Delete
[390] Fix | Delete
__BEGIN_DECLS
[391] Fix | Delete
int ns_msg_getflag (ns_msg, int) __THROW;
[392] Fix | Delete
unsigned int ns_get16 (const unsigned char *) __THROW;
[393] Fix | Delete
unsigned long ns_get32 (const unsigned char *) __THROW;
[394] Fix | Delete
void ns_put16 (unsigned int, unsigned char *) __THROW;
[395] Fix | Delete
void ns_put32 (unsigned long, unsigned char *) __THROW;
[396] Fix | Delete
int ns_initparse (const unsigned char *, int, ns_msg *) __THROW;
[397] Fix | Delete
int ns_skiprr (const unsigned char *, const unsigned char *,
[398] Fix | Delete
ns_sect, int) __THROW;
[399] Fix | Delete
int ns_parserr (ns_msg *, ns_sect, int, ns_rr *) __THROW;
[400] Fix | Delete
int ns_sprintrr (const ns_msg *, const ns_rr *,
[401] Fix | Delete
const char *, const char *, char *, size_t)
[402] Fix | Delete
__THROW;
[403] Fix | Delete
int ns_sprintrrf (const unsigned char *, size_t, const char *,
[404] Fix | Delete
ns_class, ns_type, unsigned long,
[405] Fix | Delete
const unsigned char *, size_t, const char *,
[406] Fix | Delete
const char *, char *, size_t) __THROW;
[407] Fix | Delete
int ns_format_ttl (unsigned long, char *, size_t) __THROW;
[408] Fix | Delete
int ns_parse_ttl (const char *, unsigned long *) __THROW;
[409] Fix | Delete
uint32_t ns_datetosecs (const char *, int *) __THROW;
[410] Fix | Delete
int ns_name_ntol (const unsigned char *, unsigned char *, size_t)
[411] Fix | Delete
__THROW;
[412] Fix | Delete
int ns_name_ntop (const unsigned char *, char *, size_t) __THROW;
[413] Fix | Delete
int ns_name_pton (const char *, unsigned char *, size_t) __THROW;
[414] Fix | Delete
int ns_name_unpack (const unsigned char *, const unsigned char *,
[415] Fix | Delete
const unsigned char *, unsigned char *, size_t)
[416] Fix | Delete
__THROW;
[417] Fix | Delete
int ns_name_pack (const unsigned char *, unsigned char *, int,
[418] Fix | Delete
const unsigned char **, const unsigned char **)
[419] Fix | Delete
__THROW;
[420] Fix | Delete
int ns_name_uncompress (const unsigned char *,
[421] Fix | Delete
const unsigned char *,
[422] Fix | Delete
const unsigned char *,
[423] Fix | Delete
char *, size_t) __THROW;
[424] Fix | Delete
int ns_name_compress (const char *, unsigned char *, size_t,
[425] Fix | Delete
const unsigned char **,
[426] Fix | Delete
const unsigned char **) __THROW;
[427] Fix | Delete
int ns_name_skip (const unsigned char **, const unsigned char *)
[428] Fix | Delete
__THROW;
[429] Fix | Delete
void ns_name_rollback (const unsigned char *,
[430] Fix | Delete
const unsigned char **,
[431] Fix | Delete
const unsigned char **) __THROW;
[432] Fix | Delete
int ns_samedomain (const char *, const char *) __THROW;
[433] Fix | Delete
int ns_subdomain (const char *, const char *) __THROW;
[434] Fix | Delete
int ns_makecanon (const char *, char *, size_t) __THROW;
[435] Fix | Delete
int ns_samename (const char *, const char *) __THROW;
[436] Fix | Delete
__END_DECLS
[437] Fix | Delete
[438] Fix | Delete
#include <arpa/nameser_compat.h>
[439] Fix | Delete
[440] Fix | Delete
#endif /* !_ARPA_NAMESER_H_ */
[441] Fix | Delete
/*! \file */
[442] Fix | Delete
[443] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function