/* *=========================================================================== * ipnet_if_mib_init *=========================================================================== * Description: Initializes IF-MIB * Parameters: None * Returns: IPCOM_SUCCESS or IPCOM_ERR_FAILED * */ IP_PUBLIC Ip_err ipnet_if_mib_init(void) { struct Ipsnmp_node_object nodeobj; Ip_s32 ret; /* Assign lock function */ nodeobj.lock = ipnet_if_mib_lock; /* Add node "ifMIB" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_NOACCESS; nodeobj.datatype = IPSNMP_DATA_TYPE_UNSPECIFIED; nodeobj.handler = IP_NULL; nodeobj.id = "1.3.6.1.2.1.31"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifMIB"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_OTHER; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "interfaces" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_NOACCESS; nodeobj.datatype = IPSNMP_DATA_TYPE_UNSPECIFIED; nodeobj.handler = IP_NULL; nodeobj.id = "1.3.6.1.2.1.2"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "interfaces"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_OTHER; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifMIBObjects" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_NOACCESS; nodeobj.datatype = IPSNMP_DATA_TYPE_UNSPECIFIED; nodeobj.handler = IP_NULL; nodeobj.id = "1.3.6.1.2.1.31.1"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifMIBObjects"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_OTHER; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifNumber" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_INTEGER; nodeobj.handler = ipnet_if_mib_handler_ifNumber; nodeobj.id = "1.3.6.1.2.1.2.1"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifNumber"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_SCALAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifTable" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_NOACCESS; nodeobj.datatype = IPSNMP_DATA_TYPE_UNSPECIFIED; nodeobj.handler = IP_NULL; nodeobj.id = "1.3.6.1.2.1.2.2"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifTable"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_AGGREGATE; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifEntry" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_NOACCESS; nodeobj.datatype = IPSNMP_DATA_TYPE_UNSPECIFIED; nodeobj.handler = IP_NULL; nodeobj.id = "1.3.6.1.2.1.2.2.1"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifEntry"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_AGGREGATE; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifIndex" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_INTEGER; nodeobj.handler = ipnet_if_mib_handler_ifTable; nodeobj.id = "1.3.6.1.2.1.2.2.1.1"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifIndex"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifDescr" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_OCTETSTRING; nodeobj.handler = ipnet_if_mib_handler_ifTable; nodeobj.id = "1.3.6.1.2.1.2.2.1.2"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifDescr"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifType" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_INTEGER; nodeobj.handler = ipnet_if_mib_handler_ifTable; nodeobj.id = "1.3.6.1.2.1.2.2.1.3"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifType"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifMtu" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_INTEGER; nodeobj.handler = ipnet_if_mib_handler_ifTable; nodeobj.id = "1.3.6.1.2.1.2.2.1.4"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifMtu"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifSpeed" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_GAUGE32; nodeobj.handler = ipnet_if_mib_handler_ifTable; nodeobj.id = "1.3.6.1.2.1.2.2.1.5"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifSpeed"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifPhysAddress" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_OCTETSTRING; nodeobj.handler = ipnet_if_mib_handler_ifTable; nodeobj.id = "1.3.6.1.2.1.2.2.1.6"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifPhysAddress"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifAdminStatus" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READWRITE; nodeobj.datatype = IPSNMP_DATA_TYPE_INTEGER; nodeobj.handler = ipnet_if_mib_handler_ifTable; nodeobj.id = "1.3.6.1.2.1.2.2.1.7"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifAdminStatus"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifOperStatus" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_INTEGER; nodeobj.handler = ipnet_if_mib_handler_ifTable; nodeobj.id = "1.3.6.1.2.1.2.2.1.8"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifOperStatus"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifLastChange" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_TIMETICKS; nodeobj.handler = ipnet_if_mib_handler_ifTable; nodeobj.id = "1.3.6.1.2.1.2.2.1.9"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifLastChange"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifInOctets" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_COUNTER32; nodeobj.handler = ipnet_if_mib_handler_ifTable; nodeobj.id = "1.3.6.1.2.1.2.2.1.10"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifInOctets"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifInUcastPkts" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_COUNTER32; nodeobj.handler = ipnet_if_mib_handler_ifTable; nodeobj.id = "1.3.6.1.2.1.2.2.1.11"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifInUcastPkts"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifInDiscards" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_COUNTER32; nodeobj.handler = ipnet_if_mib_handler_ifTable; nodeobj.id = "1.3.6.1.2.1.2.2.1.13"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifInDiscards"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifInErrors" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_COUNTER32; nodeobj.handler = ipnet_if_mib_handler_ifTable; nodeobj.id = "1.3.6.1.2.1.2.2.1.14"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifInErrors"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifInUnknownProtos" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_COUNTER32; nodeobj.handler = ipnet_if_mib_handler_ifTable; nodeobj.id = "1.3.6.1.2.1.2.2.1.15"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifInUnknownProtos"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifOutOctets" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_COUNTER32; nodeobj.handler = ipnet_if_mib_handler_ifTable; nodeobj.id = "1.3.6.1.2.1.2.2.1.16"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifOutOctets"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifOutUcastPkts" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_COUNTER32; nodeobj.handler = ipnet_if_mib_handler_ifTable; nodeobj.id = "1.3.6.1.2.1.2.2.1.17"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifOutUcastPkts"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifOutDiscards" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_COUNTER32; nodeobj.handler = ipnet_if_mib_handler_ifTable; nodeobj.id = "1.3.6.1.2.1.2.2.1.19"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifOutDiscards"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifOutErrors" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_COUNTER32; nodeobj.handler = ipnet_if_mib_handler_ifTable; nodeobj.id = "1.3.6.1.2.1.2.2.1.20"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifOutErrors"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifXTable" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_NOACCESS; nodeobj.datatype = IPSNMP_DATA_TYPE_UNSPECIFIED; nodeobj.handler = IP_NULL; nodeobj.id = "1.3.6.1.2.1.31.1.1"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifXTable"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_AGGREGATE; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifXEntry" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_NOACCESS; nodeobj.datatype = IPSNMP_DATA_TYPE_UNSPECIFIED; nodeobj.handler = IP_NULL; nodeobj.id = "1.3.6.1.2.1.31.1.1.1"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifXEntry"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_AGGREGATE; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifName" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_OCTETSTRING; nodeobj.handler = ipnet_if_mib_handler_ifXTable; nodeobj.id = "1.3.6.1.2.1.31.1.1.1.1"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifName"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifInMulticastPkts" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_COUNTER32; nodeobj.handler = ipnet_if_mib_handler_ifXTable; nodeobj.id = "1.3.6.1.2.1.31.1.1.1.2"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifInMulticastPkts"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifInBroadcastPkts" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_COUNTER32; nodeobj.handler = ipnet_if_mib_handler_ifXTable; nodeobj.id = "1.3.6.1.2.1.31.1.1.1.3"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifInBroadcastPkts"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifOutMulticastPkts" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_COUNTER32; nodeobj.handler = ipnet_if_mib_handler_ifXTable; nodeobj.id = "1.3.6.1.2.1.31.1.1.1.4"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifOutMulticastPkts"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifOutBroadcastPkts" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_COUNTER32; nodeobj.handler = ipnet_if_mib_handler_ifXTable; nodeobj.id = "1.3.6.1.2.1.31.1.1.1.5"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifOutBroadcastPkts"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifLinkUpDownTrapEnable" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READWRITE; nodeobj.datatype = IPSNMP_DATA_TYPE_INTEGER; nodeobj.handler = ipnet_if_mib_handler_ifXTable; nodeobj.id = "1.3.6.1.2.1.31.1.1.1.14"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifLinkUpDownTrapEnable"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifHighSpeed" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_GAUGE32; nodeobj.handler = ipnet_if_mib_handler_ifXTable; nodeobj.id = "1.3.6.1.2.1.31.1.1.1.15"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifHighSpeed"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifPromiscuousMode" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READWRITE; nodeobj.datatype = IPSNMP_DATA_TYPE_INTEGER; nodeobj.handler = ipnet_if_mib_handler_ifXTable; nodeobj.id = "1.3.6.1.2.1.31.1.1.1.16"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifPromiscuousMode"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifConnectorPresent" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_INTEGER; nodeobj.id = "1.3.6.1.2.1.31.1.1.1.17"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifConnectorPresent"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifAlias" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READWRITE; nodeobj.datatype = IPSNMP_DATA_TYPE_OCTETSTRING; nodeobj.id = "1.3.6.1.2.1.31.1.1.1.18"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifAlias"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifCounterDiscontinuityTime" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_TIMETICKS; nodeobj.handler = ipnet_if_mib_handler_ifXTable; nodeobj.id = "1.3.6.1.2.1.31.1.1.1.19"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ifCounterDiscontinuityTime"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ifTableLastChange" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_TIMETICKS; nodeobj.handler = ipsnmp_mib_standard_handler; nodeobj.id = "1.3.6.1.2.1.31.1.5"; nodeobj.instance = &ipnet->mib2.ifTableLastChange; #ifdef IP_DEBUG nodeobj.name = "ifTableLastChange"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_SCALAR; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "linkDown" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_NOACCESS; nodeobj.datatype = IPSNMP_DATA_TYPE_UNSPECIFIED; nodeobj.handler = IP_NULL; nodeobj.id = "1.3.6.1.6.3.1.1.5.3"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "linkDown"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_TRAP; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "linkUp" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_NOACCESS; nodeobj.datatype = IPSNMP_DATA_TYPE_UNSPECIFIED; nodeobj.handler = IP_NULL; nodeobj.id = "1.3.6.1.6.3.1.1.5.4"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "linkUp"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_TRAP; ret = ipsnmp_add_node(&nodeobj); if (ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } return IPCOM_SUCCESS; }
/* *=========================================================================== * ipnet_ip_forward_mib_init *=========================================================================== * Description: Initializes IP-FORWARD-MIB * Parameters: None * Returns: IPCOM_SUCCESS or IPCOM_ERR_FAILED * */ IP_PUBLIC Ip_err ipnet_ip_forward_mib_init(void) { struct Ipsnmp_node_object nodeobj; Ip_s32 ret; /* Assign lock function */ nodeobj.lock = ipnet_ip_forward_mib_lock; /* Add node "ipForward" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_NOACCESS; nodeobj.datatype = IPSNMP_DATA_TYPE_UNSPECIFIED; nodeobj.handler = IP_NULL; nodeobj.id = "1.3.6.1.2.1.4.24"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ipForward"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_OTHER; ret = ipsnmp_add_node(&nodeobj); if(ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ipForwardConformance" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_NOACCESS; nodeobj.datatype = IPSNMP_DATA_TYPE_UNSPECIFIED; nodeobj.handler = IP_NULL; nodeobj.id = "1.3.6.1.2.1.4.24.5"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ipForwardConformance"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_OTHER; ret = ipsnmp_add_node(&nodeobj); if(ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ipForwardGroups" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_NOACCESS; nodeobj.datatype = IPSNMP_DATA_TYPE_UNSPECIFIED; nodeobj.handler = IP_NULL; nodeobj.id = "1.3.6.1.2.1.4.24.5.1"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ipForwardGroups"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_OTHER; ret = ipsnmp_add_node(&nodeobj); if(ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ipForwardCompliances" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_NOACCESS; nodeobj.datatype = IPSNMP_DATA_TYPE_UNSPECIFIED; nodeobj.handler = IP_NULL; nodeobj.id = "1.3.6.1.2.1.4.24.5.2"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ipForwardCompliances"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_OTHER; ret = ipsnmp_add_node(&nodeobj); if(ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ipCidrRouteNumber" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_GAUGE32; nodeobj.handler = ipnet_ip_forward_mib_handler_ipCidrRouteNumber; nodeobj.id = "1.3.6.1.2.1.4.24.3"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ipCidrRouteNumber"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_SCALAR; ret = ipsnmp_add_node(&nodeobj); if(ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ipCidrRouteTable" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_NOACCESS; nodeobj.datatype = IPSNMP_DATA_TYPE_UNSPECIFIED; nodeobj.handler = IP_NULL; nodeobj.id = "1.3.6.1.2.1.4.24.4"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ipCidrRouteTable"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_AGGREGATE; ret = ipsnmp_add_node(&nodeobj); if(ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ipCidrRouteEntry" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_NOACCESS; nodeobj.datatype = IPSNMP_DATA_TYPE_UNSPECIFIED; nodeobj.handler = IP_NULL; nodeobj.id = "1.3.6.1.2.1.4.24.4.1"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ipCidrRouteEntry"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_AGGREGATE; ret = ipsnmp_add_node(&nodeobj); if(ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ipCidrRouteDest" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_IPADDRESS; nodeobj.handler = IP_NULL; nodeobj.id = "1.3.6.1.2.1.4.24.4.1.1"; /* nodeobj.instance = IP_NULL; */ nodeobj.handler = ipnet_ip_forward_mib_handler_ipCidrRouteTable; #ifdef IP_DEBUG nodeobj.name = "ipCidrRouteDest"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if(ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ipCidrRouteMask" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_IPADDRESS; nodeobj.handler = IP_NULL; nodeobj.id = "1.3.6.1.2.1.4.24.4.1.2"; /* nodeobj.instance = IP_NULL; */ nodeobj.handler = ipnet_ip_forward_mib_handler_ipCidrRouteTable; #ifdef IP_DEBUG nodeobj.name = "ipCidrRouteMask"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if(ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ipCidrRouteTos" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_INTEGER; nodeobj.handler = ipnet_ip_forward_mib_handler_ipCidrRouteTable; nodeobj.id = "1.3.6.1.2.1.4.24.4.1.3"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ipCidrRouteTos"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if(ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ipCidrRouteNextHop" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_IPADDRESS; nodeobj.handler = ipnet_ip_forward_mib_handler_ipCidrRouteTable; nodeobj.id = "1.3.6.1.2.1.4.24.4.1.4"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ipCidrRouteNextHop"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if(ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ipCidrRouteIfIndex" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READCREATE; nodeobj.datatype = IPSNMP_DATA_TYPE_INTEGER; nodeobj.handler = ipnet_ip_forward_mib_handler_ipCidrRouteTable; nodeobj.id = "1.3.6.1.2.1.4.24.4.1.5"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ipCidrRouteIfIndex"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if(ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ipCidrRouteType" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READCREATE; nodeobj.datatype = IPSNMP_DATA_TYPE_INTEGER; nodeobj.handler = ipnet_ip_forward_mib_handler_ipCidrRouteTable; nodeobj.id = "1.3.6.1.2.1.4.24.4.1.6"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ipCidrRouteType"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if(ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ipCidrRouteProto" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_INTEGER; nodeobj.handler = ipnet_ip_forward_mib_handler_ipCidrRouteTable; nodeobj.id = "1.3.6.1.2.1.4.24.4.1.7"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ipCidrRouteProto"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if(ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ipCidrRouteAge" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READONLY; nodeobj.datatype = IPSNMP_DATA_TYPE_INTEGER; nodeobj.handler = ipnet_ip_forward_mib_handler_ipCidrRouteTable; nodeobj.id = "1.3.6.1.2.1.4.24.4.1.8"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ipCidrRouteAge"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if(ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ipCidrRouteInfo" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READCREATE; nodeobj.datatype = IPSNMP_DATA_TYPE_OID; nodeobj.handler = ipnet_ip_forward_mib_handler_ipCidrRouteTable; nodeobj.id = "1.3.6.1.2.1.4.24.4.1.9"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ipCidrRouteInfo"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if(ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ipCidrRouteNextHopAS" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READCREATE; nodeobj.datatype = IPSNMP_DATA_TYPE_INTEGER; nodeobj.handler = ipnet_ip_forward_mib_handler_ipCidrRouteTable; nodeobj.id = "1.3.6.1.2.1.4.24.4.1.10"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ipCidrRouteNextHopAS"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if(ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ipCidrRouteMetric1" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READCREATE; nodeobj.datatype = IPSNMP_DATA_TYPE_INTEGER; nodeobj.handler = ipnet_ip_forward_mib_handler_ipCidrRouteTable; nodeobj.id = "1.3.6.1.2.1.4.24.4.1.11"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ipCidrRouteMetric1"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if(ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ipCidrRouteMetric2" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READCREATE; nodeobj.datatype = IPSNMP_DATA_TYPE_INTEGER; nodeobj.handler = ipnet_ip_forward_mib_handler_ipCidrRouteTable; nodeobj.id = "1.3.6.1.2.1.4.24.4.1.12"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ipCidrRouteMetric2"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if(ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ipCidrRouteMetric3" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READCREATE; nodeobj.datatype = IPSNMP_DATA_TYPE_INTEGER; nodeobj.handler = ipnet_ip_forward_mib_handler_ipCidrRouteTable; nodeobj.id = "1.3.6.1.2.1.4.24.4.1.13"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ipCidrRouteMetric3"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if(ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ipCidrRouteMetric4" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READCREATE; nodeobj.datatype = IPSNMP_DATA_TYPE_INTEGER; nodeobj.handler = ipnet_ip_forward_mib_handler_ipCidrRouteTable; nodeobj.id = "1.3.6.1.2.1.4.24.4.1.14"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ipCidrRouteMetric4"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if(ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ipCidrRouteMetric5" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READCREATE; nodeobj.datatype = IPSNMP_DATA_TYPE_INTEGER; nodeobj.handler = ipnet_ip_forward_mib_handler_ipCidrRouteTable; nodeobj.id = "1.3.6.1.2.1.4.24.4.1.15"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ipCidrRouteMetric5"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if(ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ipCidrRouteStatus" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_READCREATE; nodeobj.datatype = IPSNMP_DATA_TYPE_INTEGER; nodeobj.handler = ipnet_ip_forward_mib_handler_ipCidrRouteTable; nodeobj.id = "1.3.6.1.2.1.4.24.4.1.16"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ipCidrRouteStatus"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_COLUMNAR; ret = ipsnmp_add_node(&nodeobj); if(ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ipForwardMultiPathGroup" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_NOACCESS; nodeobj.datatype = IPSNMP_DATA_TYPE_UNSPECIFIED; nodeobj.handler = IP_NULL; nodeobj.id = "1.3.6.1.2.1.4.24.5.1.2"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ipForwardMultiPathGroup"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_OTHER; ret = ipsnmp_add_node(&nodeobj); if(ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ipForwardCidrRouteGroup" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_NOACCESS; nodeobj.datatype = IPSNMP_DATA_TYPE_UNSPECIFIED; nodeobj.handler = IP_NULL; nodeobj.id = "1.3.6.1.2.1.4.24.5.1.3"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ipForwardCidrRouteGroup"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_OTHER; ret = ipsnmp_add_node(&nodeobj); if(ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ipForwardCompliance" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_NOACCESS; nodeobj.datatype = IPSNMP_DATA_TYPE_UNSPECIFIED; nodeobj.handler = IP_NULL; nodeobj.id = "1.3.6.1.2.1.4.24.5.2.1"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ipForwardCompliance"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_OTHER; ret = ipsnmp_add_node(&nodeobj); if(ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } /* Add node "ipForwardOldCompliance" to the MIB tree */ nodeobj.access = IPSNMP_NODE_ACCESS_NOACCESS; nodeobj.datatype = IPSNMP_DATA_TYPE_UNSPECIFIED; nodeobj.handler = IP_NULL; nodeobj.id = "1.3.6.1.2.1.4.24.5.2.2"; nodeobj.instance = IP_NULL; #ifdef IP_DEBUG nodeobj.name = "ipForwardOldCompliance"; #endif nodeobj.nodetype = IPSNMP_NODE_TYPE_OTHER; ret = ipsnmp_add_node(&nodeobj); if(ret != 0) { IPCOM_LOG2(ERR, "ipsnmp_add_node() :: failed to add %s (%d)", nodeobj.id, ret); return IPCOM_ERR_FAILED; } return IPCOM_SUCCESS; }