chiark / gitweb /
Rearrangement more or less sorted, back to trying to get it to compile.
[adns.git] / src / types.c
index b2b140d64195d2842a1d8960f8dd8d3384a9d705..45741fa36cee820080a584cfa1bac145194738fa 100644 (file)
@@ -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
 };