X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=adns.git;a=blobdiff_plain;f=src%2Ftypes.c;h=45741fa36cee820080a584cfa1bac145194738fa;hp=b2b140d64195d2842a1d8960f8dd8d3384a9d705;hb=e576be5096ae358bebe2e9b6ad07c49f74aef616;hpb=e7a9ca479c1d663ba74e44f17579a4918cfa5997 diff --git a/src/types.c b/src/types.c index b2b140d..45741fa 100644 --- a/src/types.c +++ b/src/types.c @@ -1,4 +1,24 @@ -/**/ +/* + * types.c + * - RR-type-specific code, and the machinery to call it + */ +/* + * This file is part of adns, which is Copyright (C) 1997, 1998 Ian Jackson + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ #include "internal.h" @@ -29,26 +49,26 @@ static adns_status rmf_null(adns_state ads, adns_query qu, void *data) { } static const typeinfo typeinfos[] = { /* Must be in ascending order of rrtype ! */ - /* rr type code style member size parser */ + /* rr type code name style member size parser */ - { adns_r_a, TYPE_MN( inaddr, inaddr ) }, -#if 0 /*fixme*/ - { adns_r_ns_raw, TYPE_MF( str, domain_raw ) }, - { adns_r_cname, TYPE_MF( str, domain_raw ) }, - { adns_r_soa_raw, TYPE_MF( soa, soa ) }, - { adns_r_null, TYPE_SN( 0, null ) }, - { adns_r_ptr_raw, TYPE_MF( str, domain_raw ) }, - { adns_r_hinfo, TYPE_MF( strpair, hinfo ) }, - { adns_r_mx_raw, TYPE_MF( intstr, mx_raw ) }, - { adns_r_txt, TYPE_MF( str, txt ) }, - { adns_r_rp_raw, TYPE_MF( strpair, rp ) }, - - { adns_r_ns, TYPE_MF( dmaddr, dmaddr ) }, - { adns_r_ptr, TYPE_MF( str, ptr ) }, - { adns_r_mx, TYPE_MF( intdmaddr, mx ) }, - - { adns_r_soa, TYPE_MF( soa, soa ) }, - { adns_r_rp, TYPE_MF( strpair, rp ) }, + { adns_r_a, "A", TYPE_MN( inaddr, inaddr ) }, +#if 0 /*fixme*/ + { adns_r_ns_raw, "NS(raw)", TYPE_MF( str, domain_raw ) }, + { adns_r_cname, "CNAME", TYPE_MF( str, domain_raw ) }, + { adns_r_soa_raw, "SOA(raw)", TYPE_MF( soa, soa ) }, + { adns_r_null, "NULL", TYPE_SN( 0, null ) }, + { adns_r_ptr_raw, "PTR(raw)", TYPE_MF( str, domain_raw ) }, + { adns_r_hinfo, "HINFO", TYPE_MF( strpair, hinfo ) }, + { adns_r_mx_raw, "MX(raw)", TYPE_MF( intstr, mx_raw ) }, + { adns_r_txt, "TXT", TYPE_MF( str, txt ) }, + { adns_r_rp_raw, "RP(raw)", TYPE_MF( strpair, rp ) }, + + { adns_r_ns, "NS(+addr)", TYPE_MF( dmaddr, dmaddr ) }, + { adns_r_ptr, "PTR(checked)", TYPE_MF( str, ptr ) }, + { adns_r_mx, "MX(+addr)", TYPE_MF( intdmaddr, mx ) }, + + { adns_r_soa, "SOA(822)", TYPE_MF( soa, soa ) }, + { adns_r_rp, "RP(822)", TYPE_MF( strpair, rp ) }, #endif };