1 | #ifndef READ_WHICH_KEYTYPES 2 | #define READ_WHICH_KEYTYPES 3 | 4 | /*************************************** 5 | $Revision: 1.13 $ 6 | 7 | Which Keytypes module (wk) 8 | 9 | Status: NOT REVUED, NOT TESTED 10 | 11 | ******************/ /****************** 12 | Copyright (c) 1999,2000,2001,2002 RIPE NCC 13 | 14 | All Rights Reserved 15 | 16 | Permission to use, copy, modify, and distribute this software and its 17 | documentation for any purpose and without fee is hereby granted, 18 | provided that the above copyright notice appear in all copies and that 19 | both that copyright notice and this permission notice appear in 20 | supporting documentation, and that the name of the author not be 21 | used in advertising or publicity pertaining to distribution of the 22 | software without specific, written prior permission. 23 | 24 | THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 25 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL 26 | AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY 27 | DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN 28 | AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 29 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 30 | ***************************************/ 31 | #include "bitmask.h" 32 | 33 | /*+ Enumeration of which keytypes: +*/ 34 | typedef enum WK_Type_t { 35 | WK_NAME=0, /*+ A name +*/ 36 | WK_NIC_HDL, /*+ NIC_HDL +*/ 37 | WK_EMAIL, /*+ RFC822 e-mail address +*/ 38 | WK_MNTNER, /*+ Maintainer name +*/ 39 | WK_KEY_CERT, /*+ PGPKEY +*/ 40 | WK_IPADDRESS, /*+ IP address +*/ 41 | WK_IPRANGE, /*+ IP range +*/ 42 | WK_IPPREFIX, /*+ IP prefix +*/ 43 | WK_IP6PREFIX, /*+ IPv6 prefix +*/ 44 | WK_NETNAME, /*+ Network name +*/ 45 | WK_NET6NAME, /*+ IPv6 Network name +*/ 46 | WK_AUTNUM, /*+ AS number +*/ 47 | WK_ASSETNAME, /*+ AS set name +*/ 48 | WK_ROUTESETNAME, /*+ Route set name +*/ 49 | WK_DOMAIN, /*+ Domain name +*/ 50 | WK_HOSTNAME, /*+ Host name +*/ 51 | WK_LIMERICK, /*+ Limerick name +*/ 52 | WK_ASRANGE, /*+ AS range (possibly only beginning) +*/ 53 | WK_FILTERSET, /*+ filter-set name +*/ 54 | WK_PEERINGSET, /*+ peering-set name +*/ 55 | WK_RTRSET, /*+ router-set name +*/ 56 | WK_IRT, /*+ irt name +*/ 57 | WK_END 58 | } WK_Type; 59 | 60 | /* for easy maintenance, the tables that depend on the enums are defined here. 61 | They must be kept in sync with each other. Also, the WK_new function must 62 | be kept in sync!!! 63 | 64 | Guarded with WK_IMPL so that they are compiled only once, inside wk.c 65 | */ 66 | #ifdef WK_IMPL 67 | char * const Keytypes[] = { 68 | "name", 69 | "nic_hdl", 70 | "email", 71 | "mntner", 72 | "key_cert", 73 | "ipaddress", 74 | "iprange", 75 | "ipprefix", 76 | "ip6prefix", 77 | "netname", 78 | "net6name", 79 | "autnum", 80 | "assetname", 81 | "routesetname", 82 | "domain", 83 | "hostname", 84 | "limerick", 85 | "asrange", 86 | "filter_set", 87 | "peering_set", 88 | "rtr_set", 89 | "irt", 90 | NULL 91 | }; /* Keytypes[] */ 92 | 93 | #endif 94 | 95 | char *WK_to_string(mask_t wk); 96 | mask_t WK_new(char *key); 97 | 98 | #endif /* READ_WHICH_KEYTYPES */