summaryrefslogtreecommitdiff
path: root/agent/mibgroup/ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_constants.h
blob: 5ecade4a311a4d4d827eef84928a78f73b2b7f1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
/*
 * Note: this file originally auto-generated by mib2c using
 *  : generic-table-constants.m2c,v 1.5 2005/07/15 22:41:16 rstory Exp $
 *
 * $Id$
 */
#ifndef IPADDRESSPREFIXTABLE_CONSTANTS_H
#define IPADDRESSPREFIXTABLE_CONSTANTS_H

#ifdef __cplusplus
extern          "C" {
#endif


    /*
     * column number definitions for table ipAddressPrefixTable 
     */
#define IPADDRESSPREFIXTABLE_OID              1,3,6,1,2,1,4,32

#define COLUMN_IPADDRESSPREFIXIFINDEX         1

#define COLUMN_IPADDRESSPREFIXTYPE         2

#define COLUMN_IPADDRESSPREFIXPREFIX         3

#define COLUMN_IPADDRESSPREFIXLENGTH         4

#define COLUMN_IPADDRESSPREFIXORIGIN         5

#define COLUMN_IPADDRESSPREFIXONLINKFLAG         6

#define COLUMN_IPADDRESSPREFIXAUTONOMOUSFLAG         7

#define COLUMN_IPADDRESSPREFIXADVPREFERREDLIFETIME         8

#define COLUMN_IPADDRESSPREFIXADVVALIDLIFETIME         9


#define IPADDRESSPREFIXTABLE_MIN_COL   COLUMN_IPADDRESSPREFIXORIGIN
#define IPADDRESSPREFIXTABLE_MAX_COL   COLUMN_IPADDRESSPREFIXADVVALIDLIFETIME


    /*
     * NOTES on enums
     * ==============
     *
     * Value Mapping
     * -------------
     * If the values for your data type don't exactly match the
     * possible values defined by the mib, you should map them
     * below. For example, a boolean flag (1/0) is usually represented
     * as a TruthValue in a MIB, which maps to the values (1/2).
     *
     */
/*************************************************************************
 *************************************************************************
 *
 * enum definitions for table ipAddressPrefixTable
 *
 *************************************************************************
 *************************************************************************/

/*************************************************************
 * constants for enums for the MIB node
 * ipAddressPrefixType (InetAddressType / ASN_INTEGER)
 *
 * since a Textual Convention may be referenced more than once in a
 * MIB, protect againt redefinitions of the enum values.
 */
#ifndef INETADDRESSTYPE_ENUMS
#define INETADDRESSTYPE_ENUMS

#define INETADDRESSTYPE_UNKNOWN  0
#define INETADDRESSTYPE_IPV4  1
#define INETADDRESSTYPE_IPV6  2
#define INETADDRESSTYPE_IPV4Z  3
#define INETADDRESSTYPE_IPV6Z  4
#define INETADDRESSTYPE_DNS  16

#endif                          /* INETADDRESSTYPE_ENUMS */


/*************************************************************
 * constants for enums for the MIB node
 * ipAddressPrefixOrigin (IpAddressPrefixOriginTC / ASN_INTEGER)
 *
 * since a Textual Convention may be referenced more than once in a
 * MIB, protect againt redefinitions of the enum values.
 */
#ifndef IPADDRESSPREFIXORIGINTC_ENUMS
#define IPADDRESSPREFIXORIGINTC_ENUMS

#define IPADDRESSPREFIXORIGINTC_OTHER  1
#define IPADDRESSPREFIXORIGINTC_MANUAL  2
#define IPADDRESSPREFIXORIGINTC_WELLKNOWN  3
#define IPADDRESSPREFIXORIGINTC_DHCP  4
#define IPADDRESSPREFIXORIGINTC_ROUTERADV  5

#endif                          /* IPADDRESSPREFIXORIGINTC_ENUMS */


/*************************************************************
 * constants for enums for the MIB node
 * ipAddressPrefixOnLinkFlag (TruthValue / ASN_INTEGER)
 *
 * since a Textual Convention may be referenced more than once in a
 * MIB, protect againt redefinitions of the enum values.
 */
#ifndef TRUTHVALUE_ENUMS
#define TRUTHVALUE_ENUMS

#define TRUTHVALUE_TRUE  1
#define TRUTHVALUE_FALSE  2

#endif                          /* TRUTHVALUE_ENUMS */


/*************************************************************
 * constants for enums for the MIB node
 * ipAddressPrefixAutonomousFlag (TruthValue / ASN_INTEGER)
 *
 * since a Textual Convention may be referenced more than once in a
 * MIB, protect againt redefinitions of the enum values.
 */
#ifndef TRUTHVALUE_ENUMS
#define TRUTHVALUE_ENUMS

#define TRUTHVALUE_TRUE  1
#define TRUTHVALUE_FALSE  2

#endif                          /* TRUTHVALUE_ENUMS */




#ifdef __cplusplus
}
#endif
#endif                          /* IPADDRESSPREFIXTABLE_OIDS_H */
/****************************************************************
* Additional constants and definitions for common implementation
*/
#define INFINITY_LIFE_TIME      0xFFFFFFFFU
#define NIP6(addr) \
        ntohs((addr).s6_addr16[0]), \
        ntohs((addr).s6_addr16[1]), \
        ntohs((addr).s6_addr16[2]), \
        ntohs((addr).s6_addr16[3]), \
        ntohs((addr).s6_addr16[4]), \
        ntohs((addr).s6_addr16[5]), \
        ntohs((addr).s6_addr16[6]), \
        ntohs((addr).s6_addr16[7])