1 | #ifndef READ_ATTRIBUTES
2 | #define READ_ATTRIBUTES
3 |
4 | /***************************************
5 | $Revision: 1.5 $
6 |
7 | Attributes module (at) - this _should_ eventually get merged in with the
8 | config module.
9 |
10 | Status: NOT REVUED, NOT TESTED
11 |
12 | ******************/ /******************
13 | Copyright (c) 1999 RIPE NCC
14 |
15 | All Rights Reserved
16 |
17 | Permission to use, copy, modify, and distribute this software and its
18 | documentation for any purpose and without fee is hereby granted,
19 | provided that the above copyright notice appear in all copies and that
20 | both that copyright notice and this permission notice appear in
21 | supporting documentation, and that the name of the author not be
22 | used in advertising or publicity pertaining to distribution of the
23 | software without specific, written prior permission.
24 |
25 | THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
26 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL
27 | AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
28 | DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
29 | AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
30 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
31 | ***************************************/
32 | #include <glib.h>
33 | #include "bitmask.h"
34 |
35 | /*+ Number of duplicate tokens in the Attributes[] array +*/
36 | #define DUP_TOKENS 2
37 |
38 | /*+
39 | All the attributes.
40 | Note: this _should_ match exactly with the Attributes[] array - but
41 | unfortunately they _could_ differ. This may need re-designing.
42 | +*/
43 | typedef enum AT_Type_t {
44 | A_AC=0, /*+ admin-c +*/
45 | A_AA, /*+ as-name +*/
46 | A_AD, /*+ address +*/
47 | A_AG, /*+ aggr-mtd +*/
48 | A_AB, /*+ aggr-bndry +*/
49 | A_AH, /*+ author +*/
50 | A_AN, /*+ aut-num +*/
51 | A_AS, /*+ as-set +*/
52 | A_AT, /*+ auth +*/
53 | A_AZ, /*+ alias +*/
54 | A_CE, /*+ certif +*/
55 | A_CH, /*+ changed +*/
56 | A_CY, /*+ country +*/
57 | A_CN, /*+ cross-nfy +*/
58 | A_CO, /*+ components +*/
59 | A_CT, /*+ cross-mnt +*/
60 | A_DA, /*+ dom-name +*/
61 | A_DE, /*+ descr +*/
62 | A_DF, /*+ default +*/
63 | A_DC, /*+ dictionary +*/
64 | A_DI, /*+ dom-net +*/
65 | A_DN, /*+ domain +*/
66 | A_DT, /*+ upd-to +*/
67 | A_EC, /*+ export-comps +*/
68 | A_EN, /*+ encapsulatio n+*/
69 | A_EM, /*+ e-mail +*/
70 | A_EX, /*+ export +*/
71 | A_FI, /*+ filter +*/
72 | A_FP, /*+ fingerpr +*/
73 | A_FS, /*+ filter-set +*/
74 | A_FX, /*+ fax-no +*/
75 | A_HO, /*+ holes +*/
76 | A_IF, /*+ ifaddr +*/
77 | A_IJ, /*+ inject +*/
78 | A_IN, /*+ inetnum +*/
79 | A_I6, /*+ inet6num +*/
80 | A_IP, /*+ import +*/
81 | A_IR, /*+ inet-rtr +*/
82 | A_IS, /*+ rtr-set +*/
83 | A_KC, /*+ key-cert +*/
84 | A_LA, /*+ local-as +*/
85 | A_LI, /*+ limerick +*/
86 | A_MH, /*+ method +*/
87 | A_MB, /*+ mnt-by +*/
88 | A_ML, /*+ mnt-lower +*/
89 | A_MO, /*+ member-of +*/
90 | A_MR, /*+ mbrs-by-ref +*/
91 | A_MS, /*+ members +*/
92 | A_MT, /*+ mntner +*/
93 | A_MN, /*+ mnt-nfy +*/
94 | A_NA, /*+ netname +*/
95 | A_NH, /*+ nic-hdl +*/
96 | A_NS, /*+ nserver +*/
97 | A_NY, /*+ notify +*/
98 | A_OR, /*+ origin +*/
99 | A_OW, /*+ owner +*/
100 | A_PE, /*+ peer +*/
101 | A_PG, /*+ peering +*/
102 | A_PH, /*+ phone +*/
103 | A_PL, /*+ protocol +*/
104 | A_PN, /*+ person +*/
105 | A_PS, /*+ peering-set +*/
106 | A_RF, /*+ refer +*/
107 | A_RM, /*+ remarks +*/
108 | A_RO, /*+ role +*/
109 | A_RP, /*+ rp-attribute +*/
110 | A_RS, /*+ route-set +*/
111 | A_RT, /*+ route +*/
112 | A_RZ, /*+ rev-srv +*/
113 | A_SD, /*+ sub-dom +*/
114 | A_SO, /*+ source +*/
115 | A_ST, /*+ status +*/
116 | A_TB, /*+ trouble +*/
117 | A_TD, /*+ typedef +*/
118 | A_TC, /*+ tech-c +*/
119 | A_TX, /*+ text +*/
120 | A_WD, /*+ withdrawn +*/
121 | A_ZC, /*+ zone-c +*/
122 | A_END
123 | } AT_Type;
124 |
125 | char * const *AT_get_sources(void);
126 | const char *AT_get_source(int index);
127 | char * AT_sources_to_string(void);
128 | char * AT_sources_list_to_string(GList *sources);
129 | char * const *AT_get_attributes(void);
130 | const char *AT_get_attribute(AT_Type attr_index, int offset);
131 | const char *AT_get_attribute_desc(AT_Type attr_index);
132 | const char *AT_get_attribute_frmt(AT_Type attr_index);
133 | char *AT_attributes_to_string(int offset);
134 |
135 | #endif /* READ_ATTRIBUTES */