ipseckey_45.c revision 431a83fb29482c5170b3e4026e59bb14849a6707
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff * Copyright (C) 2005, 2007, 2009, 2011, 2012, 2014 Internet Systems Consortium, Inc. ("ISC")
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff * Permission to use, copy, modify, and/or distribute this software for any
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff * purpose with or without fee is hereby granted, provided that the above
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff * copyright notice and this permission notice appear in all copies.
15a44745412679c30a6d022733925af70a38b715David Lawrence * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
15a44745412679c30a6d022733925af70a38b715David Lawrence * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15a44745412679c30a6d022733925af70a38b715David Lawrence * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
15a44745412679c30a6d022733925af70a38b715David Lawrence * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15a44745412679c30a6d022733925af70a38b715David Lawrence * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
15a44745412679c30a6d022733925af70a38b715David Lawrence * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15a44745412679c30a6d022733925af70a38b715David Lawrence * PERFORMANCE OF THIS SOFTWARE.
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff unsigned int gateway;
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Graff * Precedence.
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff RETERR(uint8_tobuffer(token.value.as_ulong, target));
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff * Gateway type.
658db10162f779c8a5ed4e40c77111a7e18492beMichael Graff RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
658db10162f779c8a5ed4e40c77111a7e18492beMichael Graff RETERR(uint8_tobuffer(token.value.as_ulong, target));
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff RETERR(uint8_tobuffer(token.value.as_ulong, target));
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
b81306ccd14066cb7378f7f74bbf3843b5a88985Michael Graff if (getquad(DNS_AS_STR(token), &addr, lexer, callbacks) != 1)
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff if (inet_pton(AF_INET6, DNS_AS_STR(token), addr6) != 1)
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff buffer_fromregion(&buffer, &token.value.as_region);
658db10162f779c8a5ed4e40c77111a7e18492beMichael Graff origin = (origin != NULL) ? origin : dns_rootname;
658db10162f779c8a5ed4e40c77111a7e18492beMichael Graff RETTOK(dns_name_fromtext(&name, &buffer, origin,
658db10162f779c8a5ed4e40c77111a7e18492beMichael Graff * Public key.
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff return (isc_base64_tobuffer(lexer, target, -1));
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff unsigned short num;
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff unsigned short gateway;
b81306ccd14066cb7378f7f74bbf3843b5a88985Michael Graff if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0)
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff * Precedence.
8cd870e3f5e3db9808a4a0d6f98db3d1a5348e40Michael Graff * Gateway type.
658db10162f779c8a5ed4e40c77111a7e18492beMichael Graff RETERR(inet_totext(AF_INET, ®ion, target));
658db10162f779c8a5ed4e40c77111a7e18492beMichael Graff RETERR(inet_totext(AF_INET6, ®ion, target));
658db10162f779c8a5ed4e40c77111a7e18492beMichael Graff RETERR(dns_name_totext(&name, ISC_FALSE, target));
658db10162f779c8a5ed4e40c77111a7e18492beMichael Graff isc_region_consume(®ion, name_length(&name));
58ff88cca7c169f7fbebc9b6e93bbba1fb345157Michael Graff RETERR(isc_base64_totext(®ion, 60, "", target));
658db10162f779c8a5ed4e40c77111a7e18492beMichael Graff RETERR(isc_base64_totext(®ion, tctx->width - 2,
658db10162f779c8a5ed4e40c77111a7e18492beMichael Graff if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0)
031ce3bc62d273c5bd99596e01aa95c7ed33bbd7Brian Wellington dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
658db10162f779c8a5ed4e40c77111a7e18492beMichael Graff return (mem_tobuffer(target, region.base, region.length));
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff return (mem_tobuffer(target, region.base, region.length));
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff return (mem_tobuffer(target, region.base, region.length));
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff RETERR(dns_name_fromwire(&name, source, dctx, options, target));
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff return(mem_tobuffer(target, region.base, region.length));
static inline isc_result_t
isc_uint32_t n;
return (ISC_R_NOTIMPLEMENTED);
static inline isc_result_t
isc_uint32_t n;
return (ISC_R_NOTIMPLEMENTED);
return (ISC_R_NOMEMORY);
return (ISC_R_SUCCESS);
static inline isc_result_t
return (ISC_R_SUCCESS);
static inline isc_result_t
static inline isc_boolean_t
return (ISC_TRUE);
static inline isc_boolean_t
return (ISC_TRUE);
int order;
if (order != 0)
return (order);