X-Git-Url: https://git.distorted.org.uk/~mdw/adns/blobdiff_plain/401c256aeefcfa8b23668bee45b3174792df4f62..50e2b0c3e23c15b58d834a753f074dd232aff30f:/client/adh-main.c diff --git a/client/adh-main.c b/client/adh-main.c index 7065d58..dc9c46d 100644 --- a/client/adh-main.c +++ b/client/adh-main.c @@ -4,12 +4,11 @@ * main program and useful subroutines */ /* - * This file is - * Copyright (C) 1997-2000 Ian Jackson - * - * It is part of adns, which is - * Copyright (C) 1997-2000 Ian Jackson - * Copyright (C) 1999-2000 Tony Finch + * 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 @@ -100,6 +99,7 @@ void of_type(const struct optioninfo *oi, const char *arg, const char *arg2) { /* raw versions */ { adns_r_a, "a" }, + { adns_r_aaaa, "aaaa" }, { adns_r_ns_raw, "ns-" }, { adns_r_soa_raw, "soa-" }, { adns_r_ptr_raw, "ptr-" }, @@ -111,6 +111,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);