📄 ipaddresstable.h
字号:
/* * Note: this file originally auto-generated by mib2c using * version : 1.32 $ of : mfd-top.m2c,v $ * * $Id: ipAddressTable.h,v 1.12 2004/10/16 00:25:45 rstory Exp $ */#ifndef IPADDRESSTABLE_H#define IPADDRESSTABLE_H#ifdef __cplusplusextern "C" {#endif/** @defgroup misc misc: Miscelaneous routines * * @{ */#include <net-snmp/library/asn1.h>#include <net-snmp/data_access/ipaddress.h> /* * OID, column number and enum definions for */#include "ipAddressTable_constants.h" /* ********************************************************************* * function declarations */ void init_ipAddressTable(void); /* ********************************************************************* * Table declarations *//********************************************************************** ********************************************************************** *** *** Table ipAddressTable *** ********************************************************************** **********************************************************************/ /* * ipAddressTable is subid 34 of ip. * Its status is Current. * OID: .1.3.6.1.2.1.4.34, length: 8 */ /* ********************************************************************* * When you register your mib, you get to provide a generic * pointer that will be passed back to you for most of the * functions calls. * * TODO:100:r: Review all context structures */ /* * TODO:101:o: |-> Review ipAddressTable registration context. */ typedef netsnmp_data_list *ipAddressTable_registration_ptr;/**********************************************************************/ /* * TODO:110:r: |-> Review ipAddressTable data context structure. * This structure is used to represent the data for ipAddressTable. */ typedef netsnmp_ipaddress_entry ipAddressTable_data; /* ********************************************************************* * TODO:115:o: |-> Review ipAddressTable undo context. * We're just going to use the same data structure for our * undo_context. If you want to do something more efficent, * define your typedef here. */ typedef ipAddressTable_data ipAddressTable_undo_data; /* * TODO:120:r: |-> Review ipAddressTable mib index. * This structure is used to represent the index for ipAddressTable. */ typedef struct ipAddressTable_mib_index_s { /* * ipAddressAddrType(1)/InetAddressType/ASN_INTEGER/long(u_long)//l/a/w/E/r/d/h */ u_long ipAddressAddrType; /* * ipAddressAddr(2)/InetAddress/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/h */ /** 128 - 1(other indexes) - oid length(10) = 116 */ char ipAddressAddr[116]; size_t ipAddressAddr_len; } ipAddressTable_mib_index; /* * TODO:121:r: | |-> Review ipAddressTable max index length. * If you KNOW that your indexes will never exceed a certain * length, update this macro to that length. * * BE VERY CAREFUL TO TAKE INTO ACCOUNT THE MAXIMUM * POSSIBLE LENGHT FOR EVERY VARIABLE LENGTH INDEX! * Guessing 128 - col/entry(2) - oid len(8) */#define MAX_ipAddressTable_IDX_LEN 118 /* ********************************************************************* * TODO:130:o: |-> Review ipAddressTable Row request (rowreq) context. * When your functions are called, you will be passed a * ipAddressTable_rowreq_ctx pointer. */ typedef struct ipAddressTable_rowreq_ctx_s { /** this must be first for container compare to work */ netsnmp_index oid_idx; oid oid_tmp[MAX_ipAddressTable_IDX_LEN]; ipAddressTable_mib_index tbl_idx; ipAddressTable_data *data; ipAddressTable_undo_data *undo; unsigned int column_set_flags; /* flags for set columns */ /* * flags per row. Currently, the first 8 bits are reserverd * for the user. See mfd.h for other flags. */ u_int rowreq_flags; /* * implementor's context pointer (provided during registration) */ ipAddressTable_registration_ptr ipAddressTable_reg; /* * TODO:131:o: | |-> Add useful data to ipAddressTable rowreq context. */ /* * not available from net-snmp ipaddress data_access */ uint32_t ipAddressCreated; /* sysUpTime */ uint32_t ipAddressLastChanged, ipAddressLastChanged_undo; /* sysUpTime */ int ipAddressRowStatus, ipAddressRowStatus_undo; /* * storage for future expansion */ netsnmp_data_list *ipAddressTable_data_list; } ipAddressTable_rowreq_ctx; typedef struct ipAddressTable_ref_rowreq_ctx_s { ipAddressTable_rowreq_ctx *rowreq_ctx; } ipAddressTable_ref_rowreq_ctx; /* ********************************************************************* * function prototypes */ int ipAddressTable_pre_request(ipAddressTable_registration_ptr user_context); int ipAddressTable_post_request(ipAddressTable_registration_ptr user_context); ipAddressTable_data *ipAddressTable_allocate_data(void); void ipAddressTable_release_data(ipAddressTable_data * data); int ipAddressTable_check_dependencies(ipAddressTable_rowreq_ctx * rowreq_ctx); int ipAddressTable_commit(ipAddressTable_rowreq_ctx * rowreq_ctx); extern oid ipAddressTable_oid[]; extern int ipAddressTable_oid_size;#include "ipAddressTable_interface.h"#include "ipAddressTable_data_access.h" /* ********************************************************************* * GET function declarations */ /* ********************************************************************* * GET Table declarations *//********************************************************************** ********************************************************************** *** *** Table ipAddressTable *** ********************************************************************** **********************************************************************/ /* * ipAddressTable is subid 34 of ip. * Its status is Current. * OID: .1.3.6.1.2.1.4.34, length: 8 */ /* * indexes */ int ipAddressAddrType_map(u_long * mib_ipAddressAddrType_val_ptr, u_long raw_ipAddressAddrType_val); int ipAddressIfIndex_get(ipAddressTable_rowreq_ctx * rowreq_ctx, long *ipAddressIfIndex_val_ptr); int ipAddressType_get(ipAddressTable_rowreq_ctx *
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -