Debian Codegraph @

agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_constants.h

raw
1 /*
2 * Note: this file originally auto-generated by mib2c using
3 * : generic-table-constants.m2c,v 1.5 2005/07/15 22:41:16 rstory Exp $
4 *
5 * $Id$
6 */
7 #ifndef IPADDRESSPREFIXTABLE_CONSTANTS_H
8 #define IPADDRESSPREFIXTABLE_CONSTANTS_H
9
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13
14
15 /*
16 * column number definitions for table ipAddressPrefixTable
17 */
18 #define IPADDRESSPREFIXTABLE_OID 1,3,6,1,2,1,4,32
19
20 #define COLUMN_IPADDRESSPREFIXIFINDEX 1
21
22 #define COLUMN_IPADDRESSPREFIXTYPE 2
23
24 #define COLUMN_IPADDRESSPREFIXPREFIX 3
25
26 #define COLUMN_IPADDRESSPREFIXLENGTH 4
27
28 #define COLUMN_IPADDRESSPREFIXORIGIN 5
29
30 #define COLUMN_IPADDRESSPREFIXONLINKFLAG 6
31
32 #define COLUMN_IPADDRESSPREFIXAUTONOMOUSFLAG 7
33
34 #define COLUMN_IPADDRESSPREFIXADVPREFERREDLIFETIME 8
35
36 #define COLUMN_IPADDRESSPREFIXADVVALIDLIFETIME 9
37
38
39 #define IPADDRESSPREFIXTABLE_MIN_COL COLUMN_IPADDRESSPREFIXORIGIN
40 #define IPADDRESSPREFIXTABLE_MAX_COL COLUMN_IPADDRESSPREFIXADVVALIDLIFETIME
41
42
43 /*
44 * NOTES on enums
45 * ==============
46 *
47 * Value Mapping
48 * -------------
49 * If the values for your data type don't exactly match the
50 * possible values defined by the mib, you should map them
51 * below. For example, a boolean flag (1/0) is usually represented
52 * as a TruthValue in a MIB, which maps to the values (1/2).
53 *
54 */
55 /*************************************************************************
56 *************************************************************************
57 *
58 * enum definitions for table ipAddressPrefixTable
59 *
60 *************************************************************************
61 *************************************************************************/
62
63 /*************************************************************
64 * constants for enums for the MIB node
65 * ipAddressPrefixType (InetAddressType / ASN_INTEGER)
66 *
67 * since a Textual Convention may be referenced more than once in a
68 * MIB, protect againt redefinitions of the enum values.
69 */
70 #ifndef INETADDRESSTYPE_ENUMS
71 #define INETADDRESSTYPE_ENUMS
72
73 #define INETADDRESSTYPE_UNKNOWN 0
74 #define INETADDRESSTYPE_IPV4 1
75 #define INETADDRESSTYPE_IPV6 2
76 #define INETADDRESSTYPE_IPV4Z 3
77 #define INETADDRESSTYPE_IPV6Z 4
78 #define INETADDRESSTYPE_DNS 16
79
80 #endif /* INETADDRESSTYPE_ENUMS */
81
82
83 /*************************************************************
84 * constants for enums for the MIB node
85 * ipAddressPrefixOrigin (IpAddressPrefixOriginTC / ASN_INTEGER)
86 *
87 * since a Textual Convention may be referenced more than once in a
88 * MIB, protect againt redefinitions of the enum values.
89 */
90 #ifndef IPADDRESSPREFIXORIGINTC_ENUMS
91 #define IPADDRESSPREFIXORIGINTC_ENUMS
92
93 #define IPADDRESSPREFIXORIGINTC_OTHER 1
94 #define IPADDRESSPREFIXORIGINTC_MANUAL 2
95 #define IPADDRESSPREFIXORIGINTC_WELLKNOWN 3
96 #define IPADDRESSPREFIXORIGINTC_DHCP 4
97 #define IPADDRESSPREFIXORIGINTC_ROUTERADV 5
98
99 #endif /* IPADDRESSPREFIXORIGINTC_ENUMS */
100
101
102 /*************************************************************
103 * constants for enums for the MIB node
104 * ipAddressPrefixOnLinkFlag (TruthValue / ASN_INTEGER)
105 *
106 * since a Textual Convention may be referenced more than once in a
107 * MIB, protect againt redefinitions of the enum values.
108 */
109 #ifndef TRUTHVALUE_ENUMS
110 #define TRUTHVALUE_ENUMS
111
112 #define TRUTHVALUE_TRUE 1
113 #define TRUTHVALUE_FALSE 2
114
115 #endif /* TRUTHVALUE_ENUMS */
116
117
118 /*************************************************************
119 * constants for enums for the MIB node
120 * ipAddressPrefixAutonomousFlag (TruthValue / ASN_INTEGER)
121 *
122 * since a Textual Convention may be referenced more than once in a
123 * MIB, protect againt redefinitions of the enum values.
124 */
125 #ifndef TRUTHVALUE_ENUMS
126 #define TRUTHVALUE_ENUMS
127
128 #define TRUTHVALUE_TRUE 1
129 #define TRUTHVALUE_FALSE 2
130
131 #endif /* TRUTHVALUE_ENUMS */
132
133
134
135
136 #ifdef __cplusplus
137 }
138 #endif
139 #endif /* IPADDRESSPREFIXTABLE_OIDS_H */
140 /****************************************************************
141 * Additional constants and definitions for common implementation
142 */
143 #define INFINITY_LIFE_TIME 0xFFFFFFFFU
144 #define NIP6(addr) \
145 ntohs((addr).s6_addr16[0]), \
146 ntohs((addr).s6_addr16[1]), \
147 ntohs((addr).s6_addr16[2]), \
148 ntohs((addr).s6_addr16[3]), \
149 ntohs((addr).s6_addr16[4]), \
150 ntohs((addr).s6_addr16[5]), \
151 ntohs((addr).s6_addr16[6]), \
152 ntohs((addr).s6_addr16[7])
153