a_1.c revision db725ebe2b5d913949246b02573df01bd29f5412
7d32c065c7bb56f281651ae3dd2888f32ce4f1d9Bob Halley * Copyright (C) 1999 Internet Software Consortium.
44a966dff66061ac3f266c6b451a70733eb78e82Mark Andrews * Permission to use, copy, modify, and distribute this software for any
44a966dff66061ac3f266c6b451a70733eb78e82Mark Andrews * purpose with or without fee is hereby granted, provided that the above
44a966dff66061ac3f266c6b451a70733eb78e82Mark Andrews * copyright notice and this permission notice appear in all copies.
44a966dff66061ac3f266c6b451a70733eb78e82Mark Andrews * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
44a966dff66061ac3f266c6b451a70733eb78e82Mark Andrews * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
44a966dff66061ac3f266c6b451a70733eb78e82Mark Andrews * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
44a966dff66061ac3f266c6b451a70733eb78e82Mark Andrews * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
44a966dff66061ac3f266c6b451a70733eb78e82Mark Andrews * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
44a966dff66061ac3f266c6b451a70733eb78e82Mark Andrews * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
44a966dff66061ac3f266c6b451a70733eb78e82Mark Andrews * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
82ca33427bdd4f3bc4ed3431e86bd810fe751674Andreas Gustafsson /* $Id: a_1.c,v 1.1 1999/10/13 01:24:46 marka Exp $ */
44a966dff66061ac3f266c6b451a70733eb78e82Mark Andrewsfromtext_hs_a(dns_rdataclass_t rdclass, dns_rdatatype_t type,
44a966dff66061ac3f266c6b451a70733eb78e82Mark Andrews RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
44a966dff66061ac3f266c6b451a70733eb78e82Mark Andrews if (inet_aton(token.value.as_pointer, &addr) != 1)
44a966dff66061ac3f266c6b451a70733eb78e82Mark Andrewstotext_hs_a(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
44a966dff66061ac3f266c6b451a70733eb78e82Mark Andrews isc_buffer_add(target, strlen((char *)region.base));
44a966dff66061ac3f266c6b451a70733eb78e82Mark Andrewsfromwire_hs_a(dns_rdataclass_t rdclass, dns_rdatatype_t type,
44a966dff66061ac3f266c6b451a70733eb78e82Mark Andrewstowire_hs_a(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target) {
44a966dff66061ac3f266c6b451a70733eb78e82Mark Andrews memcpy(region.base, rdata->data, rdata->length);
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssonstatic inline int
44a966dff66061ac3f266c6b451a70733eb78e82Mark Andrewscompare_hs_a(dns_rdata_t *rdata1, dns_rdata_t *rdata2) {
44a966dff66061ac3f266c6b451a70733eb78e82Mark Andrews result = memcmp(rdata1->data, rdata2->data, 4);
44a966dff66061ac3f266c6b451a70733eb78e82Mark Andrewsfromstruct_hs_a(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
deaaf94332abbfdb3aff53675546acfed16e5eb6Mark Andrewstostruct_hs_a(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
d981ca645597116d227a48bf37cc5edc061c854dBob Halleystatic inline void
44a966dff66061ac3f266c6b451a70733eb78e82Mark Andrewsadditionaldata_hs_a(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
f31f0b63cbe841720f154c570bcdede9d79e64b8Michael Graffdigest_hs_a(dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg) {
44a966dff66061ac3f266c6b451a70733eb78e82Mark Andrews#endif /* RDATA_HS_4_A_1_C */