⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iftable.h

📁 snmp的源代码,已经在我的ubuntu下编译通过
💻 H
📖 第 1 页 / 共 2 页
字号:
/* * Note: this file originally auto-generated by mib2c using *       version : 1.32 $ of : mfd-top.m2c,v $ * * $Id: ifTable.h,v 1.16 2004/10/15 23:34:50 rstory Exp $ */#ifndef IFTABLE_H#define IFTABLE_H#ifdef __cplusplusextern          "C" {#endif/** @defgroup misc misc: Miscelaneous routines * * @{ */#include <net-snmp/library/asn1.h>#include <net-snmp/data_access/interface.h>    /*     * OID, column number and enum definions for       */#include "ifTable_constants.h"    /*     *********************************************************************     * function declarations     */    void            init_ifTable(void);    /*     *********************************************************************     * Table declarations     *//********************************************************************** ********************************************************************** *** *** Table ifTable *** ********************************************************************** **********************************************************************/    /*     * ifTable is subid 2 of interfaces.     * Its status is Current.     * OID: .1.3.6.1.2.1.2.2, 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 ifTable registration context.     */    typedef netsnmp_data_list *ifTable_registration_ptr;/**********************************************************************/    /*     * TODO:110:r: |-> Review ifTable data context structure.     * This structure is used to represent the data for ifTable.     */    /*     * This structure contains storage for all the columns defined in the     * ifTable.     */    typedef struct ifTable_data_s {        /*         * ifDescr(2)/DisplayString/ASN_OCTET_STR/char(char)//L/A/w/e/R/d/h         */#define ifDescr ifentry->descr        /*         * ifType(3)/INTEGER/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h         */#define ifType ifentry->type        /*         * ifMtu(4)/INTEGER/ASN_INTEGER/long(long)//l/A/w/e/r/d/h         */#define ifMtu ifentry->mtu        /*         * ifSpeed(5)/GAUGE/ASN_GAUGE/u_long(u_long)//l/A/w/e/r/d/h         */#define ifSpeed ifentry->speed        /*         * ifPhysAddress(6)/PhysAddress/ASN_OCTET_STR/char(char)//L/A/w/e/r/d/h         */#define ifPhysAddress ifentry->paddr#define ifPhysAddress_len ifentry->paddr_len    /* # of char elements, not bytes */        /*         * ifAdminStatus(7)/INTEGER/ASN_INTEGER/long(u_long)//l/A/W/E/r/d/h         */#define ifAdminStatus ifentry->admin_status        /*         * ifOperStatus(8)/INTEGER/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h         */#define ifOperStatus ifentry->oper_status        /*         * ifLastChange(9)/TICKS/ASN_TIMETICKS/u_long(u_long)//l/A/w/e/r/d/h         */        u_long          ifLastChange;        /*         * ifInOctets(10)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h         */#define ifInOctets ifentry->stats.ibytes.low        /*         * ifInUcastPkts(11)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h         */#define ifInUcastPkts ifentry->stats.iucast.low        /*         * ifInNUcastPkts(12)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h         */        u_long          ifInNUcastPkts;        /*         * ifInDiscards(13)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h         */#define ifInDiscards ifentry->stats.idiscards        /*         * ifInErrors(14)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h         */#define ifInErrors ifentry->stats.ierrors        /*         * ifInUnknownProtos(15)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h         */#define ifInUnknownProtos ifentry->stats.iunknown_protos        /*         * ifOutOctets(16)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h         */#define ifOutOctets ifentry->stats.obytes.low        /*         * ifOutUcastPkts(17)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h         */#define ifOutUcastPkts ifentry->stats.oucast.low        /*         * ifOutNUcastPkts(18)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h         */        u_long          ifOutNUcastPkts;        /*         * ifOutDiscards(19)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h         */#define ifOutDiscards ifentry->stats.odiscards        /*         * ifOutErrors(20)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h         */#define ifOutErrors ifentry->stats.oerrors        /*         * ifOutQLen(21)/GAUGE/ASN_GAUGE/u_long(u_long)//l/A/w/e/r/d/h         */#define ifOutQLen ifentry->stats.oqlen        /*         * ifSpecific(22)/OBJECTID/ASN_OBJECT_ID/oid(oid)//L/A/w/e/r/d/h         */#ifdef IFTABLE_HAS_IFSPECIFIC        oid             ifSpecific[128];        size_t          ifSpecific_len; /* # of oid elements, not bytes */#endif#ifdef USING_IF_MIB_IFXTABLE_IFXTABLE_MODULE        /*         * ifXTable stuff         */        /*         * ifName(1)/DisplayString/ASN_OCTET_STR/char(char)//L/A/w/e/R/d/H         */#define ifName ifentry->name        /*         * ifInMulticastPkts(2)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h         */        u_long          ifInMulticastPkts;        /*         * ifInBroadcastPkts(3)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h         */        u_long          ifInBroadcastPkts;        /*         * ifOutMulticastPkts(4)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h         */        u_long          ifOutMulticastPkts;        /*         * ifOutBroadcastPkts(5)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h         */        u_long          ifOutBroadcastPkts;        /*         * ifHCInOctets(6)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h         */#define ifHCInOctets ifentry->stats.ibytes        /*         * ifHCInUcastPkts(7)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h         */#define ifHCInUcastPkts ifentry->stats.iucast        /*         * ifHCInMulticastPkts(8)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h         */#define ifHCInMulticastPkts ifentry->stats.imcast        /*         * ifHCInBroadcastPkts(9)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h         */#define ifHCInBroadcastPkts ifentry->stats.ibcast        /*         * ifHCOutOctets(10)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h         */#define ifHCOutOctets ifentry->stats.obytes        /*         * ifHCOutUcastPkts(11)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h         */#define ifHCOutUcastPkts ifentry->stats.oucast        /*         * ifHCOutMulticastPkts(12)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h         */#define ifHCOutMulticastPkts ifentry->stats.omcast        /*         * ifHCOutBroadcastPkts(13)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h         */#define ifHCOutBroadcastPkts ifentry->stats.obcast        /*         * ifLinkUpDownTrapEnable(14)/INTEGER/ASN_INTEGER/long(u_long)//l/A/W/E/r/d/h         */        u_long          ifLinkUpDownTrapEnable;        /*         * ifHighSpeed(15)/GAUGE/ASN_GAUGE/u_long(u_long)//l/A/w/e/r/d/h         */        u_long          ifHighSpeed;        /*         * ifPromiscuousMode(16)/TruthValue/ASN_INTEGER/long(u_long)//l/A/W/E/r/d/h         */        u_long          ifPromiscuousMode;        /*         * ifConnectorPresent(17)/TruthValue/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h         */        u_long          ifConnectorPresent;        /*         * ifAlias(18)/DisplayString/ASN_OCTET_STR/char(char)//L/A/W/e/R/d/H         */        char            ifAlias[64];        size_t          ifAlias_len;    /* # of char elements, not bytes */        /*         * ifCounterDiscontinuityTime(19)/TimeStamp/ASN_TIMETICKS/u_long(u_long)//l/A/w/e/r/d/h         */        u_long          ifCounterDiscontinuityTime;#endif                          /* USING_IF_MIB_IFXTABLE_IFXTABLE_MODULE */        /*         * some data kept externally          */        netsnmp_interface_entry *ifentry;    } ifTable_data;    /*     *********************************************************************     * TODO:115:o: |-> Review ifTable 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 ifTable_data ifTable_undo_data;    /*     * TODO:120:r: |-> Review ifTable mib index.     * This structure is used to represent the index for ifTable.     */    typedef struct ifTable_mib_index_s {        /*         * ifIndex(1)/InterfaceIndex/ASN_INTEGER/long(long)//l/A/w/e/R/d/H         */        long            ifIndex;    } ifTable_mib_index;    /*     * TODO:121:r: |   |-> Review ifTable max index length.     * If you KNOW that your indexes will never exceed a certain     * length, update this macro to that length.     */#define MAX_ifTable_IDX_LEN     1    /*     *********************************************************************     * TODO:130:o: |-> Review ifTable Row request (rowreq) context.     * When your functions are called, you will be passed a     * ifTable_rowreq_ctx pointer.     */    typedef struct ifTable_rowreq_ctx_s {    /** this must be first for container compare to work */        netsnmp_index   oid_idx;        oid             oid_tmp[MAX_ifTable_IDX_LEN];        ifTable_mib_index tbl_idx;        ifTable_data    data;        ifTable_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)         */        ifTable_registration_ptr ifTable_reg;        /*

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -