| 1 |
/* |
| 2 |
* Note: this file originally auto-generated by mib2c using |
| 3 |
* version : 1.48 $ of : mfd-top.m2c,v $ |
| 4 |
* |
| 5 |
* $Id$ |
| 6 |
*/ |
| 7 |
#ifndef IPADDRESSPREFIXTABLE_H |
| 8 |
#define IPADDRESSPREFIXTABLE_H |
| 9 |
|
| 10 |
#ifdef __cplusplus |
| 11 |
extern "C" { |
| 12 |
#endif |
| 13 |
|
| 14 |
|
| 15 |
/** @addtogroup misc misc: Miscellaneous routines |
| 16 |
* |
| 17 |
* @{ |
| 18 |
*/ |
| 19 |
#include <net-snmp/library/asn1.h> |
| 20 |
|
| 21 |
/* |
| 22 |
* other required module components |
| 23 |
*/ |
| 24 |
/* *INDENT-OFF* */ |
| 25 |
config_require(ip-mib/ipAddressTable/ipAddressTable); |
| 26 |
config_require(ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_interface); |
| 27 |
config_require(ip-mib/ipAddressPrefixTable/ipAddressPrefixTable_data_access); |
| 28 |
/* *INDENT-ON* */ |
| 29 |
|
| 30 |
/* |
| 31 |
* OID, column number and enum definions for ipAddressPrefixTable |
| 32 |
*/ |
| 33 |
#include "ipAddressPrefixTable_constants.h" |
| 34 |
|
| 35 |
/* |
| 36 |
********************************************************************* |
| 37 |
* function declarations |
| 38 |
*/ |
| 39 |
void init_ipAddressPrefixTable(void); |
| 40 |
void shutdown_ipAddressPrefixTable(void); |
| 41 |
|
| 42 |
/* |
| 43 |
********************************************************************* |
| 44 |
* Table declarations |
| 45 |
*/ |
| 46 |
/********************************************************************** |
| 47 |
********************************************************************** |
| 48 |
*** |
| 49 |
*** Table ipAddressPrefixTable |
| 50 |
*** |
| 51 |
********************************************************************** |
| 52 |
**********************************************************************/ |
| 53 |
/* |
| 54 |
* IP-MIB::ipAddressPrefixTable is subid 32 of ip. |
| 55 |
* Its status is Current. |
| 56 |
* OID: .1.3.6.1.2.1.4.32, length: 8 |
| 57 |
*/ |
| 58 |
/* |
| 59 |
********************************************************************* |
| 60 |
* When you register your mib, you get to provide a generic |
| 61 |
* pointer that will be passed back to you for most of the |
| 62 |
* functions calls. |
| 63 |
* |
| 64 |
* TODO:100:r: Review all context structures |
| 65 |
*/ |
| 66 |
/* |
| 67 |
* TODO:101:o: |-> Review ipAddressPrefixTable registration context. |
| 68 |
*/ |
| 69 |
typedef netsnmp_data_list ipAddressPrefixTable_registration; |
| 70 |
|
| 71 |
/**********************************************************************/ |
| 72 |
/* |
| 73 |
* TODO:110:r: |-> Review ipAddressPrefixTable data context structure. |
| 74 |
* This structure is used to represent the data for ipAddressPrefixTable. |
| 75 |
*/ |
| 76 |
/* |
| 77 |
* This structure contains storage for all the columns defined in the |
| 78 |
* ipAddressPrefixTable. |
| 79 |
*/ |
| 80 |
typedef struct ipAddressPrefixTable_data_s { |
| 81 |
|
| 82 |
/* |
| 83 |
* ipAddressPrefixOrigin(5)/IpAddressPrefixOriginTC/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h |
| 84 |
*/ |
| 85 |
u_long ipAddressPrefixOrigin; |
| 86 |
|
| 87 |
/* |
| 88 |
* ipAddressPrefixOnLinkFlag(6)/TruthValue/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h |
| 89 |
*/ |
| 90 |
u_long ipAddressPrefixOnLinkFlag; |
| 91 |
|
| 92 |
/* |
| 93 |
* ipAddressPrefixAutonomousFlag(7)/TruthValue/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h |
| 94 |
*/ |
| 95 |
u_long ipAddressPrefixAutonomousFlag; |
| 96 |
|
| 97 |
/* |
| 98 |
* ipAddressPrefixAdvPreferredLifetime(8)/UNSIGNED32/ASN_UNSIGNED/u_long(u_long)//l/A/w/e/r/d/h |
| 99 |
*/ |
| 100 |
u_long ipAddressPrefixAdvPreferredLifetime; |
| 101 |
|
| 102 |
/* |
| 103 |
* ipAddressPrefixAdvValidLifetime(9)/UNSIGNED32/ASN_UNSIGNED/u_long(u_long)//l/A/w/e/r/d/h |
| 104 |
*/ |
| 105 |
u_long ipAddressPrefixAdvValidLifetime; |
| 106 |
|
| 107 |
} ipAddressPrefixTable_data; |
| 108 |
|
| 109 |
|
| 110 |
/* |
| 111 |
* TODO:120:r: |-> Review ipAddressPrefixTable mib index. |
| 112 |
* This structure is used to represent the index for ipAddressPrefixTable. |
| 113 |
*/ |
| 114 |
typedef struct ipAddressPrefixTable_mib_index_s { |
| 115 |
|
| 116 |
/* |
| 117 |
* ipAddressPrefixIfIndex(1)/InterfaceIndex/ASN_INTEGER/long(long)//l/a/w/e/R/d/H |
| 118 |
*/ |
| 119 |
long ipAddressPrefixIfIndex; |
| 120 |
|
| 121 |
/* |
| 122 |
* ipAddressPrefixType(2)/InetAddressType/ASN_INTEGER/long(u_long)//l/a/w/E/r/d/h |
| 123 |
*/ |
| 124 |
u_long ipAddressPrefixType; |
| 125 |
|
| 126 |
/* |
| 127 |
* ipAddressPrefixPrefix(3)/InetAddress/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/h |
| 128 |
*/ |
| 129 |
/** 128 - 3(other indexes) - oid length(10) = 114 */ |
| 130 |
char ipAddressPrefixPrefix[114]; |
| 131 |
size_t ipAddressPrefixPrefix_len; |
| 132 |
|
| 133 |
/* |
| 134 |
* ipAddressPrefixLength(4)/InetAddressPrefixLength/ASN_UNSIGNED/u_long(u_long)//l/a/w/e/R/d/H |
| 135 |
*/ |
| 136 |
u_long ipAddressPrefixLength; |
| 137 |
|
| 138 |
|
| 139 |
} ipAddressPrefixTable_mib_index; |
| 140 |
|
| 141 |
/* |
| 142 |
* TODO:121:r: | |-> Review ipAddressPrefixTable max index length. |
| 143 |
* If you KNOW that your indexes will never exceed a certain |
| 144 |
* length, update this macro to that length. |
| 145 |
* |
| 146 |
* BE VERY CAREFUL TO TAKE INTO ACCOUNT THE MAXIMUM |
| 147 |
* POSSIBLE LENGHT FOR EVERY VARIABLE LENGTH INDEX! |
| 148 |
* Guessing 128 - col/entry(2) - oid len(8) |
| 149 |
*/ |
| 150 |
#define MAX_ipAddressPrefixTable_IDX_LEN 118 |
| 151 |
|
| 152 |
|
| 153 |
/* |
| 154 |
********************************************************************* |
| 155 |
* TODO:130:o: |-> Review ipAddressPrefixTable Row request (rowreq) context. |
| 156 |
* When your functions are called, you will be passed a |
| 157 |
* ipAddressPrefixTable_rowreq_ctx pointer. |
| 158 |
*/ |
| 159 |
typedef struct ipAddressPrefixTable_rowreq_ctx_s { |
| 160 |
|
| 161 |
/** this must be first for container compare to work */ |
| 162 |
netsnmp_index oid_idx; |
| 163 |
oid oid_tmp[MAX_ipAddressPrefixTable_IDX_LEN]; |
| 164 |
|
| 165 |
ipAddressPrefixTable_mib_index tbl_idx; |
| 166 |
|
| 167 |
ipAddressPrefixTable_data data; |
| 168 |
|
| 169 |
/* |
| 170 |
* flags per row. Currently, the first (lower) 8 bits are reserved |
| 171 |
* for the user. See mfd.h for other flags. |
| 172 |
*/ |
| 173 |
u_int rowreq_flags; |
| 174 |
|
| 175 |
/* |
| 176 |
* TODO:131:o: | |-> Add useful data to ipAddressPrefixTable rowreq context. |
| 177 |
*/ |
| 178 |
|
| 179 |
/* |
| 180 |
* storage for future expansion |
| 181 |
*/ |
| 182 |
netsnmp_data_list *ipAddressPrefixTable_data_list; |
| 183 |
|
| 184 |
} ipAddressPrefixTable_rowreq_ctx; |
| 185 |
|
| 186 |
typedef struct ipAddressPrefixTable_ref_rowreq_ctx_s { |
| 187 |
ipAddressPrefixTable_rowreq_ctx *rowreq_ctx; |
| 188 |
} ipAddressPrefixTable_ref_rowreq_ctx; |
| 189 |
|
| 190 |
/* |
| 191 |
********************************************************************* |
| 192 |
* function prototypes |
| 193 |
*/ |
| 194 |
int |
| 195 |
ipAddressPrefixTable_pre_request(ipAddressPrefixTable_registration |
| 196 |
* user_context); |
| 197 |
int |
| 198 |
ipAddressPrefixTable_post_request(ipAddressPrefixTable_registration |
| 199 |
* user_context, int rc); |
| 200 |
|
| 201 |
int |
| 202 |
ipAddressPrefixTable_rowreq_ctx_init |
| 203 |
(ipAddressPrefixTable_rowreq_ctx * rowreq_ctx, |
| 204 |
void *user_init_ctx); |
| 205 |
void |
| 206 |
ipAddressPrefixTable_rowreq_ctx_cleanup |
| 207 |
(ipAddressPrefixTable_rowreq_ctx * rowreq_ctx); |
| 208 |
|
| 209 |
|
| 210 |
ipAddressPrefixTable_rowreq_ctx |
| 211 |
* ipAddressPrefixTable_row_find_by_mib_index |
| 212 |
(ipAddressPrefixTable_mib_index * mib_idx); |
| 213 |
|
| 214 |
extern const oid ipAddressPrefixTable_oid[]; |
| 215 |
extern const int ipAddressPrefixTable_oid_size; |
| 216 |
|
| 217 |
|
| 218 |
#include "ipAddressPrefixTable_interface.h" |
| 219 |
#include "ipAddressPrefixTable_data_access.h" |
| 220 |
/* |
| 221 |
********************************************************************* |
| 222 |
* GET function declarations |
| 223 |
*/ |
| 224 |
|
| 225 |
/* |
| 226 |
********************************************************************* |
| 227 |
* GET Table declarations |
| 228 |
*/ |
| 229 |
/********************************************************************** |
| 230 |
********************************************************************** |
| 231 |
*** |
| 232 |
*** Table ipAddressPrefixTable |
| 233 |
*** |
| 234 |
********************************************************************** |
| 235 |
**********************************************************************/ |
| 236 |
/* |
| 237 |
* IP-MIB::ipAddressPrefixTable is subid 32 of ip. |
| 238 |
* Its status is Current. |
| 239 |
* OID: .1.3.6.1.2.1.4.32, length: 8 |
| 240 |
*/ |
| 241 |
/* |
| 242 |
* indexes |
| 243 |
*/ |
| 244 |
|
| 245 |
int |
| 246 |
ipAddressPrefixOrigin_get(ipAddressPrefixTable_rowreq_ctx * |
| 247 |
rowreq_ctx, |
| 248 |
u_long * ipAddressPrefixOrigin_val_ptr); |
| 249 |
int |
| 250 |
ipAddressPrefixOnLinkFlag_get(ipAddressPrefixTable_rowreq_ctx * |
| 251 |
rowreq_ctx, |
| 252 |
u_long * |
| 253 |
ipAddressPrefixOnLinkFlag_val_ptr); |
| 254 |
int |
| 255 |
ipAddressPrefixAutonomousFlag_get(ipAddressPrefixTable_rowreq_ctx * |
| 256 |
rowreq_ctx, |
| 257 |
u_long * |
| 258 |
ipAddressPrefixAutonomousFlag_val_ptr); |
| 259 |
int |
| 260 |
ipAddressPrefixAdvPreferredLifetime_get |
| 261 |
(ipAddressPrefixTable_rowreq_ctx * rowreq_ctx, |
| 262 |
u_long * ipAddressPrefixAdvPreferredLifetime_val_ptr); |
| 263 |
int |
| 264 |
ipAddressPrefixAdvValidLifetime_get(ipAddressPrefixTable_rowreq_ctx |
| 265 |
* rowreq_ctx, |
| 266 |
u_long * |
| 267 |
ipAddressPrefixAdvValidLifetime_val_ptr); |
| 268 |
|
| 269 |
|
| 270 |
int |
| 271 |
ipAddressPrefixTable_indexes_set_tbl_idx |
| 272 |
(ipAddressPrefixTable_mib_index * tbl_idx, |
| 273 |
long ipAddressPrefixIfIndex_val, u_long ipAddressPrefixType_val, |
| 274 |
u_char *ipAddressPrefixPrefix_val_ptr, |
| 275 |
size_t ipAddressPrefixPrefix_val_ptr_len, |
| 276 |
u_long ipAddressPrefixLength_val); |
| 277 |
int |
| 278 |
ipAddressPrefixTable_indexes_set(ipAddressPrefixTable_rowreq_ctx * |
| 279 |
rowreq_ctx, |
| 280 |
long ipAddressPrefixIfIndex_val, |
| 281 |
u_long ipAddressPrefixType_val, |
| 282 |
u_char |
| 283 |
*ipAddressPrefixPrefix_val_ptr, |
| 284 |
size_t |
| 285 |
ipAddressPrefixPrefix_val_ptr_len, |
| 286 |
u_long ipAddressPrefixLength_val); |
| 287 |
|
| 288 |
|
| 289 |
|
| 290 |
/* |
| 291 |
********************************************************************* |
| 292 |
* SET function declarations |
| 293 |
*/ |
| 294 |
|
| 295 |
/* |
| 296 |
********************************************************************* |
| 297 |
* SET Table declarations |
| 298 |
*/ |
| 299 |
|
| 300 |
|
| 301 |
/* |
| 302 |
* DUMMY markers, ignore |
| 303 |
* |
| 304 |
* TODO:099:x: ************************************************************* |
| 305 |
* TODO:199:x: ************************************************************* |
| 306 |
* TODO:299:x: ************************************************************* |
| 307 |
* TODO:399:x: ************************************************************* |
| 308 |
* TODO:499:x: ************************************************************* |
| 309 |
*/ |
| 310 |
|
| 311 |
#ifdef __cplusplus |
| 312 |
} |
| 313 |
#endif |
| 314 |
#endif /* IPADDRESSPREFIXTABLE_H */ |
| 315 |
/** @} */ |
| 316 |
|