a_1.c revision ad1317338af79edad878c9c3e4361798503310ba
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox User * Copyright (C) 2005, 2007, 2009, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
3e02c9e33656dcd9c364633d42dd785d3e6fdd66Automatic Updater * This Source Code Form is subject to the terms of the Mozilla Public
c6fb85f9500350e5ce58c9a24f5d264c8a8bd6f4Automatic Updater * License, v. 2.0. If a copy of the MPL was not distributed with this
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt * file, You can obtain one at http://mozilla.org/MPL/2.0/.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt/* $Id: a_1.c,v 1.8 2009/12/04 22:06:37 tbox Exp $ */
3e02c9e33656dcd9c364633d42dd785d3e6fdd66Automatic Updater/* by Bjorn.Victor@it.uu.se, 2005-05-07 */
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater /* get domain name */
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt buffer_fromregion(&buffer, &token.value.as_region);
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt RETTOK(dns_name_fromtext(&name, &buffer, origin, options, target));
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt if (!ok && (options & DNS_RDATA_CHECKNAMESFAIL) != 0)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt /* 16-bit octal address */
6f1205897504b8f50b1785975482c995888dd630Tinderbox User RETERR(isc_lex_getoctaltoken(lexer, &token, ISC_FALSE));
fd0b768f4c23d22c89f8a156a632831583b7fb68Automatic Updater return (uint16_tobuffer(token.value.as_ulong, target));
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt REQUIRE(rdata->rdclass == dns_rdataclass_ch); /* 3 */
6f1205897504b8f50b1785975482c995888dd630Tinderbox User sub = name_prefix(&name, tctx->origin, &prefix);
6f1205897504b8f50b1785975482c995888dd630Tinderbox User RETERR(dns_name_totext(&prefix, sub, target));
6f1205897504b8f50b1785975482c995888dd630Tinderbox User snprintf(buf, sizeof(buf), "%o", addr); /* note octal */
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);
12bfbed87cfffa65ac300b72c5665ab38a355c2fAutomatic Updater RETERR(dns_name_fromwire(&name, source, dctx, options, target));
12bfbed87cfffa65ac300b72c5665ab38a355c2fAutomatic Updater isc_buffer_activeregion(source, &sregion);
12bfbed87cfffa65ac300b72c5665ab38a355c2fAutomatic Updater isc_buffer_availableregion(target, &tregion);
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14);
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater isc_region_consume(&sregion, name_length(&name));
return (ISC_R_SUCCESS);
int order;
if (order != 0)
return (order);
if (order != 0)
return (order);
static inline isc_result_t
static inline isc_result_t
return (ISC_R_SUCCESS);
static inline isc_result_t
return (ISC_R_SUCCESS);
static inline isc_result_t
isc_region_t r;
static inline isc_boolean_t
static inline isc_boolean_t
return (ISC_FALSE);
return (ISC_TRUE);