| 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 UDPENDPOINTTABLE_H |
| 8 |
#define UDPENDPOINTTABLE_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(udp-mib/data_access/udp_endpoint); |
| 26 |
config_require(udp-mib/udpEndpointTable/udpEndpointTable_interface); |
| 27 |
config_require(udp-mib/udpEndpointTable/udpEndpointTable_data_access); |
| 28 |
/* *INDENT-ON* */ |
| 29 |
|
| 30 |
/* |
| 31 |
* OID, column number and enum definions for udpEndpointTable |
| 32 |
*/ |
| 33 |
#include "udpEndpointTable_constants.h" |
| 34 |
|
| 35 |
/* |
| 36 |
********************************************************************* |
| 37 |
* function declarations |
| 38 |
*/ |
| 39 |
void init_udpEndpointTable(void); |
| 40 |
void shutdown_udpEndpointTable(void); |
| 41 |
|
| 42 |
/* |
| 43 |
********************************************************************* |
| 44 |
* Table declarations |
| 45 |
*/ |
| 46 |
/********************************************************************** |
| 47 |
********************************************************************** |
| 48 |
*** |
| 49 |
*** Table udpEndpointTable |
| 50 |
*** |
| 51 |
********************************************************************** |
| 52 |
**********************************************************************/ |
| 53 |
/* |
| 54 |
* UDP-MIB::udpEndpointTable is subid 7 of udp. |
| 55 |
* Its status is Current. |
| 56 |
* OID: .1.3.6.1.2.1.7.7, 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 udpEndpointTable registration context. |
| 68 |
*/ |
| 69 |
typedef netsnmp_data_list udpEndpointTable_registration; |
| 70 |
|
| 71 |
/**********************************************************************/ |
| 72 |
/* |
| 73 |
* TODO:110:r: |-> Review udpEndpointTable data context structure. |
| 74 |
* This structure is used to represent the data for udpEndpointTable. |
| 75 |
*/ |
| 76 |
/* |
| 77 |
* This structure contains storage for all the columns defined in the |
| 78 |
* udpEndpointTable. |
| 79 |
*/ |
| 80 |
typedef struct udpEndpointTable_data_s { |
| 81 |
|
| 82 |
/* |
| 83 |
* udpEndpointProcess(8)/UNSIGNED32/ASN_UNSIGNED/u_long(u_long)//l/A/w/e/r/d/h |
| 84 |
*/ |
| 85 |
u_long udpEndpointProcess; |
| 86 |
|
| 87 |
} udpEndpointTable_data; |
| 88 |
|
| 89 |
|
| 90 |
/* |
| 91 |
* TODO:120:r: |-> Review udpEndpointTable mib index. |
| 92 |
* This structure is used to represent the index for udpEndpointTable. |
| 93 |
*/ |
| 94 |
typedef struct udpEndpointTable_mib_index_s { |
| 95 |
|
| 96 |
/* |
| 97 |
* udpEndpointLocalAddressType(1)/InetAddressType/ASN_INTEGER/long(u_long)//l/a/w/E/r/d/h |
| 98 |
*/ |
| 99 |
u_long udpEndpointLocalAddressType; |
| 100 |
|
| 101 |
/* |
| 102 |
* udpEndpointLocalAddress(2)/InetAddress/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/h |
| 103 |
*/ |
| 104 |
/** 128 - 6(other indexes) - oid length(10) = 111 */ |
| 105 |
char udpEndpointLocalAddress[111]; |
| 106 |
size_t udpEndpointLocalAddress_len; |
| 107 |
|
| 108 |
/* |
| 109 |
* udpEndpointLocalPort(3)/InetPortNumber/ASN_UNSIGNED/u_long(u_long)//l/a/w/e/R/d/H |
| 110 |
*/ |
| 111 |
u_long udpEndpointLocalPort; |
| 112 |
|
| 113 |
/* |
| 114 |
* udpEndpointRemoteAddressType(4)/InetAddressType/ASN_INTEGER/long(u_long)//l/a/w/E/r/d/h |
| 115 |
*/ |
| 116 |
u_long udpEndpointRemoteAddressType; |
| 117 |
|
| 118 |
/* |
| 119 |
* udpEndpointRemoteAddress(5)/InetAddress/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/h |
| 120 |
*/ |
| 121 |
/** 128 - 6(other indexes) - oid length(10) = 111 */ |
| 122 |
char udpEndpointRemoteAddress[111]; |
| 123 |
size_t udpEndpointRemoteAddress_len; |
| 124 |
|
| 125 |
/* |
| 126 |
* udpEndpointRemotePort(6)/InetPortNumber/ASN_UNSIGNED/u_long(u_long)//l/a/w/e/R/d/H |
| 127 |
*/ |
| 128 |
u_long udpEndpointRemotePort; |
| 129 |
|
| 130 |
/* |
| 131 |
* udpEndpointInstance(7)/UNSIGNED32/ASN_UNSIGNED/u_long(u_long)//l/a/w/e/R/d/h |
| 132 |
*/ |
| 133 |
u_long udpEndpointInstance; |
| 134 |
|
| 135 |
/* |
| 136 |
* udpEndpointProcess(8)/UNSIGNED32/ASN_UNSIGNED/u_long(u_long)//l/a/w/e/R/d/h |
| 137 |
*/ |
| 138 |
u_long udpEndpointProcess; |
| 139 |
|
| 140 |
|
| 141 |
} udpEndpointTable_mib_index; |
| 142 |
|
| 143 |
/* |
| 144 |
* TODO:121:r: | |-> Review udpEndpointTable max index length. |
| 145 |
* If you KNOW that your indexes will never exceed a certain |
| 146 |
* length, update this macro to that length. |
| 147 |
* |
| 148 |
* BE VERY CAREFUL TO TAKE INTO ACCOUNT THE MAXIMUM |
| 149 |
* POSSIBLE LENGHT FOR EVERY VARIABLE LENGTH INDEX! |
| 150 |
* Guessing 128 - col/entry(2) - oid len(8) |
| 151 |
*/ |
| 152 |
#define MAX_udpEndpointTable_IDX_LEN 118 |
| 153 |
|
| 154 |
|
| 155 |
/* |
| 156 |
********************************************************************* |
| 157 |
* TODO:130:o: |-> Review udpEndpointTable Row request (rowreq) context. |
| 158 |
* When your functions are called, you will be passed a |
| 159 |
* udpEndpointTable_rowreq_ctx pointer. |
| 160 |
*/ |
| 161 |
typedef struct udpEndpointTable_rowreq_ctx_s { |
| 162 |
|
| 163 |
/** this must be first for container compare to work */ |
| 164 |
netsnmp_index oid_idx; |
| 165 |
oid oid_tmp[MAX_udpEndpointTable_IDX_LEN]; |
| 166 |
|
| 167 |
udpEndpointTable_mib_index tbl_idx; |
| 168 |
|
| 169 |
udpEndpointTable_data data; |
| 170 |
|
| 171 |
/* |
| 172 |
* flags per row. Currently, the first (lower) 8 bits are reserved |
| 173 |
* for the user. See mfd.h for other flags. |
| 174 |
*/ |
| 175 |
u_int rowreq_flags; |
| 176 |
|
| 177 |
/* |
| 178 |
* TODO:131:o: | |-> Add useful data to udpEndpointTable rowreq context. |
| 179 |
*/ |
| 180 |
|
| 181 |
/* |
| 182 |
* storage for future expansion |
| 183 |
*/ |
| 184 |
netsnmp_data_list *udpEndpointTable_data_list; |
| 185 |
|
| 186 |
} udpEndpointTable_rowreq_ctx; |
| 187 |
|
| 188 |
typedef struct udpEndpointTable_ref_rowreq_ctx_s { |
| 189 |
udpEndpointTable_rowreq_ctx *rowreq_ctx; |
| 190 |
} udpEndpointTable_ref_rowreq_ctx; |
| 191 |
|
| 192 |
/* |
| 193 |
********************************************************************* |
| 194 |
* function prototypes |
| 195 |
*/ |
| 196 |
int |
| 197 |
udpEndpointTable_pre_request(udpEndpointTable_registration * |
| 198 |
user_context); |
| 199 |
int |
| 200 |
udpEndpointTable_post_request(udpEndpointTable_registration * |
| 201 |
user_context, int rc); |
| 202 |
|
| 203 |
|
| 204 |
udpEndpointTable_rowreq_ctx |
| 205 |
* udpEndpointTable_row_find_by_mib_index(udpEndpointTable_mib_index |
| 206 |
* mib_idx); |
| 207 |
|
| 208 |
extern const oid udpEndpointTable_oid[]; |
| 209 |
extern const int udpEndpointTable_oid_size; |
| 210 |
|
| 211 |
|
| 212 |
#include "udpEndpointTable_interface.h" |
| 213 |
#include "udpEndpointTable_data_access.h" |
| 214 |
/* |
| 215 |
********************************************************************* |
| 216 |
* GET function declarations |
| 217 |
*/ |
| 218 |
|
| 219 |
/* |
| 220 |
********************************************************************* |
| 221 |
* GET Table declarations |
| 222 |
*/ |
| 223 |
/********************************************************************** |
| 224 |
********************************************************************** |
| 225 |
*** |
| 226 |
*** Table udpEndpointTable |
| 227 |
*** |
| 228 |
********************************************************************** |
| 229 |
**********************************************************************/ |
| 230 |
/* |
| 231 |
* UDP-MIB::udpEndpointTable is subid 7 of udp. |
| 232 |
* Its status is Current. |
| 233 |
* OID: .1.3.6.1.2.1.7.7, length: 8 |
| 234 |
*/ |
| 235 |
/* |
| 236 |
* indexes |
| 237 |
*/ |
| 238 |
|
| 239 |
int udpEndpointProcess_get(udpEndpointTable_rowreq_ctx * |
| 240 |
rowreq_ctx, |
| 241 |
u_long * |
| 242 |
udpEndpointProcess_val_ptr); |
| 243 |
|
| 244 |
|
| 245 |
int |
| 246 |
udpEndpointTable_indexes_set_tbl_idx(udpEndpointTable_mib_index * |
| 247 |
tbl_idx, |
| 248 |
u_long |
| 249 |
udpEndpointLocalAddressType_val, |
| 250 |
char |
| 251 |
*udpEndpointLocalAddress_val_ptr, |
| 252 |
size_t |
| 253 |
udpEndpointLocalAddress_val_ptr_len, |
| 254 |
u_long |
| 255 |
udpEndpointLocalPort_val, |
| 256 |
u_long |
| 257 |
udpEndpointRemoteAddressType_val, |
| 258 |
char |
| 259 |
*udpEndpointRemoteAddress_val_ptr, |
| 260 |
size_t |
| 261 |
udpEndpointRemoteAddress_val_ptr_len, |
| 262 |
u_long |
| 263 |
udpEndpointRemotePort_val, |
| 264 |
u_long |
| 265 |
udpEndpointInstance_val, |
| 266 |
u_long |
| 267 |
udpEndpointProcess_val); |
| 268 |
int |
| 269 |
udpEndpointTable_indexes_set(udpEndpointTable_rowreq_ctx * |
| 270 |
rowreq_ctx, |
| 271 |
u_long |
| 272 |
udpEndpointLocalAddressType_val, |
| 273 |
char *udpEndpointLocalAddress_val_ptr, |
| 274 |
size_t |
| 275 |
udpEndpointLocalAddress_val_ptr_len, |
| 276 |
u_long udpEndpointLocalPort_val, |
| 277 |
u_long |
| 278 |
udpEndpointRemoteAddressType_val, char |
| 279 |
*udpEndpointRemoteAddress_val_ptr, |
| 280 |
size_t |
| 281 |
udpEndpointRemoteAddress_val_ptr_len, |
| 282 |
u_long udpEndpointRemotePort_val, |
| 283 |
u_long udpEndpointInstance_val, |
| 284 |
u_long udpEndpointProcess_val); |
| 285 |
|
| 286 |
|
| 287 |
|
| 288 |
/* |
| 289 |
********************************************************************* |
| 290 |
* SET function declarations |
| 291 |
*/ |
| 292 |
|
| 293 |
/* |
| 294 |
********************************************************************* |
| 295 |
* SET Table declarations |
| 296 |
*/ |
| 297 |
|
| 298 |
|
| 299 |
/* |
| 300 |
* DUMMY markers, ignore |
| 301 |
* |
| 302 |
* TODO:099:x: ************************************************************* |
| 303 |
* TODO:199:x: ************************************************************* |
| 304 |
* TODO:299:x: ************************************************************* |
| 305 |
* TODO:399:x: ************************************************************* |
| 306 |
* TODO:499:x: ************************************************************* |
| 307 |
*/ |
| 308 |
|
| 309 |
#ifdef __cplusplus |
| 310 |
} |
| 311 |
#endif |
| 312 |
#endif /* UDPENDPOINTTABLE_H */ |
| 313 |
/** @} */ |
| 314 |
|