a_1.c revision 330705066b03f6ce0bc08a4bbfc5d2418038c68d
499b34cea04a46823d003d4c0520c8b03e8513cbBrian Wellington * Copyright (C) 1999-2001 Internet Software Consortium.
db725ebe2b5d913949246b02573df01bd29f5412Mark Andrews * Permission to use, copy, modify, and distribute this software for any
db725ebe2b5d913949246b02573df01bd29f5412Mark Andrews * purpose with or without fee is hereby granted, provided that the above
db725ebe2b5d913949246b02573df01bd29f5412Mark Andrews * copyright notice and this permission notice appear in all copies.
15a44745412679c30a6d022733925af70a38b715David Lawrence * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
15a44745412679c30a6d022733925af70a38b715David Lawrence * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
15a44745412679c30a6d022733925af70a38b715David Lawrence * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
15a44745412679c30a6d022733925af70a38b715David Lawrence * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
15a44745412679c30a6d022733925af70a38b715David Lawrence * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
15a44745412679c30a6d022733925af70a38b715David Lawrence * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
15a44745412679c30a6d022733925af70a38b715David Lawrence * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
15a44745412679c30a6d022733925af70a38b715David Lawrence * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
330705066b03f6ce0bc08a4bbfc5d2418038c68dBrian Wellington/* $Id: a_1.c,v 1.22 2001/01/25 20:14:38 bwelling Exp $ */
cd30495b0ca83a04d4d8f56728e38f93769aee98James Brister/* reviewed: Thu Mar 16 15:58:36 PST 2000 by brister */
add4043305ca411202ed9cf1929a4179016515ceBrian Wellington RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
db725ebe2b5d913949246b02573df01bd29f5412Mark Andrews if (inet_aton(token.value.as_pointer, &addr) != 1)
330705066b03f6ce0bc08a4bbfc5d2418038c68dBrian Wellington return (inet_totext(AF_INET, ®ion, target));
6e49e91bd08778d7eae45a2229dcf41ed97cc636David Lawrence isc_buffer_availableregion(target, &tregion);
db725ebe2b5d913949246b02573df01bd29f5412Mark Andrews memcpy(region.base, rdata->data, rdata->length);
db725ebe2b5d913949246b02573df01bd29f5412Mark Andrewsstatic inline int
37a8fbab3a1fe6d513b767118cba7515152c2b9bBrian Wellington REQUIRE(rdata1->rdclass == rdata2->rdclass);
41aad56b6cc458cbf7b8483576d990a77ae9bac2Andreas Gustafsson order = memcmp(rdata1->data, rdata2->data, 4);
db725ebe2b5d913949246b02573df01bd29f5412Mark Andrewsstatic inline void
db725ebe2b5d913949246b02573df01bd29f5412Mark Andrews#endif /* RDATA_HS_4_A_1_C */