| 1 |
/* |
| 2 |
* Note: this file originally auto-generated by mib2c using |
| 3 |
* version : 14170 $ of $ |
| 4 |
* |
| 5 |
* $Id:$ |
| 6 |
*/ |
| 7 |
#ifndef IPDEFAULTROUTERTABLE_H |
| 8 |
#define IPDEFAULTROUTERTABLE_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 |
#include <net-snmp/data_access/defaultrouter.h> |
| 21 |
|
| 22 |
/* |
| 23 |
* other required module components |
| 24 |
*/ |
| 25 |
/* *INDENT-OFF* */ |
| 26 |
config_require(ip-mib/data_access/defaultrouter); |
| 27 |
config_require(ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_interface); |
| 28 |
config_require(ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_access); |
| 29 |
config_require(ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_data_get); |
| 30 |
/* *INDENT-ON* */ |
| 31 |
|
| 32 |
/* |
| 33 |
* OID and column number definitions for ipDefaultRouterTable |
| 34 |
*/ |
| 35 |
#include "ipDefaultRouterTable_oids.h" |
| 36 |
|
| 37 |
/* |
| 38 |
* enum definions |
| 39 |
*/ |
| 40 |
#include "ipDefaultRouterTable_enums.h" |
| 41 |
|
| 42 |
/* |
| 43 |
********************************************************************* |
| 44 |
* function declarations |
| 45 |
*/ |
| 46 |
void init_ipDefaultRouterTable(void); |
| 47 |
void shutdown_ipDefaultRouterTable(void); |
| 48 |
|
| 49 |
/* |
| 50 |
********************************************************************* |
| 51 |
* Table declarations |
| 52 |
*/ |
| 53 |
/********************************************************************** |
| 54 |
********************************************************************** |
| 55 |
*** |
| 56 |
*** Table ipDefaultRouterTable |
| 57 |
*** |
| 58 |
********************************************************************** |
| 59 |
**********************************************************************/ |
| 60 |
/* |
| 61 |
* IP-MIB::ipDefaultRouterTable is subid 37 of ip. |
| 62 |
* Its status is Current. |
| 63 |
* OID: .1.3.6.1.2.1.4.37, length: 8 |
| 64 |
*/ |
| 65 |
/* |
| 66 |
********************************************************************* |
| 67 |
* When you register your mib, you get to provide a generic |
| 68 |
* pointer that will be passed back to you for most of the |
| 69 |
* functions calls. |
| 70 |
* |
| 71 |
* TODO:100:r: Review all context structures |
| 72 |
*/ |
| 73 |
/* |
| 74 |
* TODO:101:o: |-> Review ipDefaultRouterTable registration context. |
| 75 |
*/ |
| 76 |
typedef netsnmp_data_list ipDefaultRouterTable_registration; |
| 77 |
|
| 78 |
/**********************************************************************/ |
| 79 |
/* |
| 80 |
* TODO:110:r: |-> Review ipDefaultRouterTable data context structure. |
| 81 |
* This structure is used to represent the data for ipDefaultRouterTable. |
| 82 |
*/ |
| 83 |
typedef netsnmp_defaultrouter_entry ipDefaultRouterTable_data; |
| 84 |
|
| 85 |
|
| 86 |
/* |
| 87 |
* TODO:120:r: |-> Review ipDefaultRouterTable mib index. |
| 88 |
* This structure is used to represent the index for ipDefaultRouterTable. |
| 89 |
*/ |
| 90 |
typedef struct ipDefaultRouterTable_mib_index_s { |
| 91 |
|
| 92 |
/* |
| 93 |
* ipDefaultRouterAddressType(1)/InetAddressType/ASN_INTEGER/long(u_long)//l/a/w/E/r/d/h |
| 94 |
*/ |
| 95 |
u_long ipDefaultRouterAddressType; |
| 96 |
|
| 97 |
/* |
| 98 |
* ipDefaultRouterAddress(2)/InetAddress/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/h |
| 99 |
*/ |
| 100 |
/** 128 - 2(other indexes) - oid length(10) = 115 */ |
| 101 |
char ipDefaultRouterAddress[115]; |
| 102 |
size_t ipDefaultRouterAddress_len; |
| 103 |
|
| 104 |
/* |
| 105 |
* ipDefaultRouterIfIndex(3)/InterfaceIndex/ASN_INTEGER/long(long)//l/a/w/e/R/d/H |
| 106 |
*/ |
| 107 |
long ipDefaultRouterIfIndex; |
| 108 |
|
| 109 |
|
| 110 |
} ipDefaultRouterTable_mib_index; |
| 111 |
|
| 112 |
/* |
| 113 |
* TODO:121:r: | |-> Review ipDefaultRouterTable max index length. |
| 114 |
* If you KNOW that your indexes will never exceed a certain |
| 115 |
* length, update this macro to that length. |
| 116 |
* |
| 117 |
* BE VERY CAREFUL TO TAKE INTO ACCOUNT THE MAXIMUM |
| 118 |
* POSSIBLE LENGHT FOR EVERY VARIABLE LENGTH INDEX! |
| 119 |
* Guessing 128 - col/entry(2) - oid len(8) |
| 120 |
*/ |
| 121 |
#define MAX_ipDefaultRouterTable_IDX_LEN 118 |
| 122 |
|
| 123 |
|
| 124 |
/* |
| 125 |
********************************************************************* |
| 126 |
* TODO:130:o: |-> Review ipDefaultRouterTable Row request (rowreq) context. |
| 127 |
* When your functions are called, you will be passed a |
| 128 |
* ipDefaultRouterTable_rowreq_ctx pointer. |
| 129 |
*/ |
| 130 |
typedef struct ipDefaultRouterTable_rowreq_ctx_s { |
| 131 |
|
| 132 |
/** this must be first for container compare to work */ |
| 133 |
netsnmp_index oid_idx; |
| 134 |
oid oid_tmp[MAX_ipDefaultRouterTable_IDX_LEN]; |
| 135 |
|
| 136 |
ipDefaultRouterTable_mib_index tbl_idx; |
| 137 |
|
| 138 |
ipDefaultRouterTable_data *data; |
| 139 |
|
| 140 |
/* |
| 141 |
* flags per row. Currently, the first (lower) 8 bits are reserved |
| 142 |
* for the user. See mfd.h for other flags. |
| 143 |
*/ |
| 144 |
u_int rowreq_flags; |
| 145 |
|
| 146 |
/* |
| 147 |
* TODO:131:o: | |-> Add useful data to ipDefaultRouterTable rowreq context. |
| 148 |
*/ |
| 149 |
|
| 150 |
/* |
| 151 |
* storage for future expansion |
| 152 |
*/ |
| 153 |
netsnmp_data_list *ipDefaultRouterTable_data_list; |
| 154 |
|
| 155 |
} ipDefaultRouterTable_rowreq_ctx; |
| 156 |
|
| 157 |
typedef struct ipDefaultRouterTable_ref_rowreq_ctx_s { |
| 158 |
ipDefaultRouterTable_rowreq_ctx *rowreq_ctx; |
| 159 |
} ipDefaultRouterTable_ref_rowreq_ctx; |
| 160 |
|
| 161 |
/* |
| 162 |
********************************************************************* |
| 163 |
* function prototypes |
| 164 |
*/ |
| 165 |
int |
| 166 |
ipDefaultRouterTable_pre_request(ipDefaultRouterTable_registration |
| 167 |
* user_context); |
| 168 |
int |
| 169 |
ipDefaultRouterTable_post_request(ipDefaultRouterTable_registration |
| 170 |
* user_context, int rc); |
| 171 |
|
| 172 |
int |
| 173 |
ipDefaultRouterTable_rowreq_ctx_init |
| 174 |
(ipDefaultRouterTable_rowreq_ctx * rowreq_ctx, |
| 175 |
void *user_init_ctx); |
| 176 |
void |
| 177 |
ipDefaultRouterTable_rowreq_ctx_cleanup |
| 178 |
(ipDefaultRouterTable_rowreq_ctx * rowreq_ctx); |
| 179 |
|
| 180 |
ipDefaultRouterTable_data *ipDefaultRouterTable_allocate_data(void); |
| 181 |
void |
| 182 |
ipDefaultRouterTable_release_data(ipDefaultRouterTable_data * |
| 183 |
data); |
| 184 |
|
| 185 |
|
| 186 |
ipDefaultRouterTable_rowreq_ctx |
| 187 |
*ipDefaultRouterTable_row_find_by_mib_index |
| 188 |
(ipDefaultRouterTable_mib_index * mib_idx); |
| 189 |
|
| 190 |
extern const oid ipDefaultRouterTable_oid[]; |
| 191 |
extern const int ipDefaultRouterTable_oid_size; |
| 192 |
|
| 193 |
|
| 194 |
#include "ipDefaultRouterTable_interface.h" |
| 195 |
#include "ipDefaultRouterTable_data_access.h" |
| 196 |
#include "ipDefaultRouterTable_data_get.h" |
| 197 |
|
| 198 |
/* |
| 199 |
* DUMMY markers, ignore |
| 200 |
* |
| 201 |
* TODO:099:x: ************************************************************* |
| 202 |
* TODO:199:x: ************************************************************* |
| 203 |
* TODO:299:x: ************************************************************* |
| 204 |
* TODO:399:x: ************************************************************* |
| 205 |
* TODO:499:x: ************************************************************* |
| 206 |
*/ |
| 207 |
|
| 208 |
#ifdef __cplusplus |
| 209 |
} |
| 210 |
#endif |
| 211 |
#endif /* IPDEFAULTROUTERTABLE_H */ |
| 212 |
/** @} */ |