chiark / gitweb /
src/types.c, regress/: Use checklabel hook to parse PTR query domains.
[adns.git] / client / adh-main.c
index 7065d58ecd53bd2afd82a7497d52cb2ad95296a4..b6f3bd4d0d2ada0b3658b7b41a0b51f893467b34 100644 (file)
@@ -4,12 +4,11 @@
  *   main program and useful subroutines
  */
 /*
- *  This file is
- *    Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
- *
- *  It is part of adns, which is
- *    Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
- *    Copyright (C) 1999-2000 Tony Finch <dot@dotat.at>
+ *  This file is part of adns, which is
+ *    Copyright (C) 1997-2000,2003,2006  Ian Jackson
+ *    Copyright (C) 1999-2000,2003,2006  Tony Finch
+ *    Copyright (C) 1991 Massachusetts Institute of Technology
+ *  (See the file INSTALL for full details.)
  *  
  *  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
@@ -111,6 +110,14 @@ void of_type(const struct optioninfo *oi, const char *arg, const char *arg2) {
   };
 
   const struct typename *tnp;
+  unsigned long unknowntype;
+  char *ep;
+
+  if (strlen(arg) > 4 && !memcmp(arg,"type",4) &&
+      (unknowntype= strtoul(arg+4, &ep, 10), !*ep) && unknowntype < 65536) {
+    ov_type= unknowntype | adns_r_unknown;
+    return;
+  }
 
   for (tnp=typenames;
        tnp->type && strcmp(arg,tnp->desc);