net-snmp/Improve-IP-Statistics-tables.patch

7454 lines
274 KiB
Diff

From 32c13f8502b9520a49fb88a6737801d705fcbb9f Mon Sep 17 00:00:00 2001
From: Mitsuru Chinen <mitch@linux.vnet.ibm.com>
Date: Mon, 20 Oct 2008 17:57:27 +0900
Subject: [PATCH] Improve IP Statistics tables
This patch fixes the ipSystemStatsTable and adds ipIfStatsTable for IPv6.
From net-snmp patch tracker:
[ 1797111 ] Better support for ipIfStatsTable
http://sourceforge.net/tracker/index.php?func=detail&aid=1797111&group_id=12694&atid=312694
Signed-off-by: Mitsuru Chinen <mitch@linux.vnet.ibm.com>
---
README.agent-mibs | 2 +-
.../ip-mib/data_access/systemstats_common.c | 119 +-
.../ip-mib/data_access/systemstats_linux.c | 389 +++-
agent/mibgroup/ip-mib/ipIfStatsTable.h | 8 +
.../ip-mib/ipIfStatsTable/ipIfStatsTable.c | 216 ++
.../ip-mib/ipIfStatsTable/ipIfStatsTable.h | 200 ++
.../ipIfStatsTable/ipIfStatsTable_data_access.c | 408 +++
.../ipIfStatsTable/ipIfStatsTable_data_access.h | 70 +
.../ipIfStatsTable/ipIfStatsTable_data_get.c | 3015 ++++++++++++++++++++
.../ipIfStatsTable/ipIfStatsTable_data_get.h | 246 ++
.../ip-mib/ipIfStatsTable/ipIfStatsTable_enums.h | 56 +
.../ipIfStatsTable/ipIfStatsTable_interface.c | 1395 +++++++++
.../ipIfStatsTable/ipIfStatsTable_interface.h | 99 +
.../ip-mib/ipIfStatsTable/ipIfStatsTable_oids.h | 122 +
.../ip-mib/ipSystemStatsTable/ipSystemStatsTable.c | 154 +-
.../ipSystemStatsTable_data_access.c | 60 +-
include/net-snmp/data_access/ipstats.h | 66 +-
include/net-snmp/data_access/systemstats.h | 14 +-
18 files changed, 6494 insertions(+), 145 deletions(-)
create mode 100644 agent/mibgroup/ip-mib/ipIfStatsTable.h
create mode 100644 agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable.c
create mode 100644 agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable.h
create mode 100644 agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_access.c
create mode 100644 agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_access.h
create mode 100644 agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.c
create mode 100644 agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.h
create mode 100644 agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_enums.h
create mode 100644 agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_interface.c
create mode 100644 agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_interface.h
create mode 100644 agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_oids.h
diff --git a/README.agent-mibs b/README.agent-mibs
index 8716f8d..ff5ce6a 100644
--- a/README.agent-mibs
+++ b/README.agent-mibs
@@ -152,7 +152,7 @@ IP-MIB
ipSystemStatsTable L 5.2 M ip-mib/=/*
ipIfStatsTableLastChange.0 ---
- ipIfStatsTable ---
+ ipIfStatsTable L-- 5.5 M ip-mib/=/*
ipAddrTable (D) U $2 4.2 O mibII/ipAddr.c
ipAddressSpinLock.0 ---
diff --git a/agent/mibgroup/ip-mib/data_access/systemstats_common.c b/agent/mibgroup/ip-mib/data_access/systemstats_common.c
index 83e1867..a09cacf 100644
--- a/agent/mibgroup/ip-mib/data_access/systemstats_common.c
+++ b/agent/mibgroup/ip-mib/data_access/systemstats_common.c
@@ -1,5 +1,5 @@
/*
- * Systemstats MIB architecture support
+ * ipSystemStatsTable and ipIfStatsTable MIB architecture support
*
* $Id: systemstats_common.c 11913 2005-02-08 21:58:36Z nba $
*/
@@ -163,7 +163,7 @@ netsnmp_access_systemstats_entry_get_by_index(netsnmp_container *container, oid
/**
*/
netsnmp_systemstats_entry *
-netsnmp_access_systemstats_entry_create(int version)
+netsnmp_access_systemstats_entry_create(int version, int if_index)
{
netsnmp_systemstats_entry *entry =
SNMP_MALLOC_TYPEDEF(netsnmp_systemstats_entry);
@@ -173,10 +173,10 @@ netsnmp_access_systemstats_entry_create(int version)
if(NULL == entry)
return NULL;
- entry->ns_ip_version = version;
-
- entry->oid_index.len = 1;
- entry->oid_index.oids = (oid *) & entry->ns_ip_version;
+ entry->oid_index.len = 2;
+ entry->oid_index.oids = entry->index;
+ entry->index[0] = version;
+ entry->index[1] = if_index;
return entry;
}
@@ -217,6 +217,64 @@ _entry_release(netsnmp_systemstats_entry * entry, void *context)
netsnmp_access_systemstats_entry_free(entry);
}
+/*
+ * Calculates the entries, which are not provided by OS, but can be
+ * computed from the others.
+ */
+static void
+_calculate_entries(netsnmp_systemstats_entry * entry)
+{
+ U64 calc_val;
+
+ /*
+ * HCInForwDatagrams = HCInNoRoutes + HCOutForwDatagrams
+ */
+ if (!entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINFORWDATAGRAMS]
+ && entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFORWDATAGRAMS]
+ && entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINNOROUTES]) {
+
+ entry->stats.HCInForwDatagrams = entry->stats.HCInNoRoutes;
+ u64Incr(&entry->stats.HCInForwDatagrams, &entry->stats.HCOutForwDatagrams);
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINFORWDATAGRAMS] = 1;
+ }
+
+ /*
+ * HCOutFragReqds = HCOutFragOKs + HCOutFragFails
+ */
+ if (!entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGREQDS]
+ && entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGOKS]
+ && entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGFAILS]) {
+
+ entry->stats.HCOutFragReqds = entry->stats.HCOutFragOKs;
+ u64Incr(&entry->stats.HCOutFragReqds, &entry->stats.HCOutFragFails);
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGREQDS] = 1;
+ }
+
+ /*
+ * HCOutTransmits = HCOutRequests + HCOutForwDatagrams + HCOutFragCreates
+ * - HCOutFragReqds - HCOutNoRoutes - HCOutDiscards
+ */
+ if (!entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTTRANSMITS]
+ && entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTREQUESTS]
+ && entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFORWDATAGRAMS]
+ && entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGREQDS]
+ && entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTNOROUTES]
+ && entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGCREATES]
+ && entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTDISCARDS]) {
+
+ U64 tmp, tmp2, tmp3;
+ tmp = entry->stats.HCOutRequests;
+ u64Incr(&tmp, &entry->stats.HCOutForwDatagrams);
+ u64Incr(&tmp, &entry->stats.HCOutFragCreates);
+
+ u64Subtract(&tmp, &entry->stats.HCOutFragReqds, &tmp2);
+ u64Subtract(&tmp2, &entry->stats.HCOutNoRoutes, &tmp3);
+ u64Subtract(&tmp3, &entry->stats.HCOutDiscards, &entry->stats.HCOutTransmits);
+
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTTRANSMITS] = 1;
+ }
+}
+
/**
* update entry stats (checking for counter wrap)
*
@@ -233,7 +291,8 @@ netsnmp_access_systemstats_entry_update_stats(netsnmp_systemstats_entry * prev_v
* sanity checks
*/
if ((NULL == prev_vals) || (NULL == new_vals) ||
- (prev_vals->ns_ip_version != new_vals->ns_ip_version))
+ (prev_vals->index[0] != new_vals->index[0])
+ || (prev_vals->index[1] != new_vals->index[1]))
return -1;
/*
@@ -241,6 +300,7 @@ netsnmp_access_systemstats_entry_update_stats(netsnmp_systemstats_entry * prev_v
*/
if (0 == need_wrap_check) {
memcpy(&prev_vals->stats, &new_vals->stats, sizeof(new_vals->stats));
+ _calculate_entries(prev_vals);
return 0;
}
@@ -257,8 +317,8 @@ netsnmp_access_systemstats_entry_update_stats(netsnmp_systemstats_entry * prev_v
/*
* update straight 32 bit counters
*/
+ memcpy(&prev_vals->stats.columnAvail[0], &new_vals->stats.columnAvail[0], sizeof(new_vals->stats.columnAvail));
prev_vals->stats.InHdrErrors = new_vals->stats.InHdrErrors;
- prev_vals->stats.InNoRoutes = new_vals->stats.InNoRoutes;
prev_vals->stats.InAddrErrors = new_vals->stats.InAddrErrors;
prev_vals->stats.InUnknownProtos = new_vals->stats.InUnknownProtos;
prev_vals->stats.InTruncatedPkts = new_vals->stats.InTruncatedPkts;
@@ -266,16 +326,38 @@ netsnmp_access_systemstats_entry_update_stats(netsnmp_systemstats_entry * prev_v
prev_vals->stats.ReasmOKs = new_vals->stats.ReasmOKs;
prev_vals->stats.ReasmFails = new_vals->stats.ReasmFails;
prev_vals->stats.InDiscards = new_vals->stats.InDiscards;
- prev_vals->stats.OutNoRoutes = new_vals->stats.OutNoRoutes;
- prev_vals->stats.OutDiscards = new_vals->stats.OutDiscards;
- prev_vals->stats.OutFragReqds = new_vals->stats.OutFragReqds;
- prev_vals->stats.OutFragOKs = new_vals->stats.OutFragOKs;
- prev_vals->stats.OutFragFails = new_vals->stats.OutFragFails;
- prev_vals->stats.OutFragCreates = new_vals->stats.OutFragCreates;
/*
* update 64bit counters
*/
+ netsnmp_c64_check32_and_update(&prev_vals->stats.HCInNoRoutes,
+ &new_vals->stats.HCInNoRoutes,
+ &prev_vals->old_stats->HCInNoRoutes,
+ &need_wrap_check);
+ netsnmp_c64_check32_and_update(&prev_vals->stats.HCOutNoRoutes,
+ &new_vals->stats.HCOutNoRoutes,
+ &prev_vals->old_stats->HCOutNoRoutes,
+ &need_wrap_check);
+ netsnmp_c64_check32_and_update(&prev_vals->stats.HCOutDiscards,
+ &new_vals->stats.HCOutDiscards,
+ &prev_vals->old_stats->HCOutDiscards,
+ &need_wrap_check);
+ netsnmp_c64_check32_and_update(&prev_vals->stats.HCOutFragReqds,
+ &new_vals->stats.HCOutFragReqds,
+ &prev_vals->old_stats->HCOutFragReqds,
+ &need_wrap_check);
+ netsnmp_c64_check32_and_update(&prev_vals->stats.HCOutFragOKs,
+ &new_vals->stats.HCOutFragOKs,
+ &prev_vals->old_stats->HCOutFragOKs,
+ &need_wrap_check);
+ netsnmp_c64_check32_and_update(&prev_vals->stats.HCOutFragFails,
+ &new_vals->stats.HCOutFragFails,
+ &prev_vals->old_stats->HCOutFragFails,
+ &need_wrap_check);
+ netsnmp_c64_check32_and_update(&prev_vals->stats.HCOutFragCreates,
+ &new_vals->stats.HCOutFragCreates,
+ &prev_vals->old_stats->HCOutFragCreates,
+ &need_wrap_check);
netsnmp_c64_check32_and_update(&prev_vals->stats.HCInReceives,
&new_vals->stats.HCInReceives,
&prev_vals->old_stats->HCInReceives,
@@ -333,7 +415,7 @@ netsnmp_access_systemstats_entry_update_stats(netsnmp_systemstats_entry * prev_v
&prev_vals->old_stats->HCOutBcastPkts,
&need_wrap_check);
}
-
+
/*
* if we've decided we no longer need to check wraps, free old stats
*/
@@ -346,7 +428,9 @@ netsnmp_access_systemstats_entry_update_stats(netsnmp_systemstats_entry * prev_v
* careful - old_stats is a pointer to stats...
*/
memcpy(prev_vals->old_stats, &new_vals->stats, sizeof(new_vals->stats));
-
+
+ _calculate_entries(prev_vals);
+
return 0;
}
@@ -367,7 +451,8 @@ netsnmp_access_systemstats_entry_update(netsnmp_systemstats_entry * lhs,
DEBUGMSGTL(("access:systemstats", "copy\n"));
if ((NULL == lhs) || (NULL == rhs) ||
- (lhs->ns_ip_version != rhs->ns_ip_version))
+ (lhs->index[0] != rhs->index[0])
+ || (lhs->index[1] != rhs->index[1]))
return -1;
/*
diff --git a/agent/mibgroup/ip-mib/data_access/systemstats_linux.c b/agent/mibgroup/ip-mib/data_access/systemstats_linux.c
index 947afe8..552a745 100644
--- a/agent/mibgroup/ip-mib/data_access/systemstats_linux.c
+++ b/agent/mibgroup/ip-mib/data_access/systemstats_linux.c
@@ -1,5 +1,5 @@
/*
- * Interface MIB architecture support
+ * ipSystemStatsTable and ipIfStatsTable interface MIB architecture support
*
* $Id: systemstats_linux.c 15220 2006-09-15 00:48:50Z tanders $
*/
@@ -10,11 +10,22 @@
#include <net-snmp/data_access/ipstats.h>
#include <net-snmp/data_access/systemstats.h>
+#include "../ipSystemStatsTable/ipSystemStatsTable.h"
+
+#include <sys/types.h>
+#include <dirent.h>
+#include <ctype.h>
+
static int _systemstats_v4(netsnmp_container* container, u_int load_flags);
+static int _additional_systemstats_v4(netsnmp_systemstats_entry* entry,
+ u_int load_flags);
+
#if defined (NETSNMP_ENABLE_IPV6)
static int _systemstats_v6(netsnmp_container* container, u_int load_flags);
#endif
+static netsnmp_column_info valid_columns;
+static unsigned int my_columns[IPSYSTEMSTATSTABLE_MAX_COL];
void
netsnmp_access_systemstats_arch_init(void)
@@ -62,7 +73,7 @@ netsnmp_access_systemstats_container_arch_load(netsnmp_container* container,
snmp_log(LOG_ERR, "no container specified/found for access_systemstats_\n");
return -1;
}
-
+
/*
* load v4 and v6 stats. Even if one fails, try the other.
* If they have the same rc, return it. if the differ, return
@@ -81,6 +92,9 @@ netsnmp_access_systemstats_container_arch_load(netsnmp_container* container,
#endif
}
+/*
+ * Based on load_flags, load ipSystemStatsTable or ipIfStatsTable for ipv4 entries.
+ */
static int
_systemstats_v4(netsnmp_container* container, u_int load_flags)
{
@@ -97,6 +111,11 @@ _systemstats_v4(netsnmp_container* container, u_int load_flags)
netsnmp_assert(container != NULL); /* load function shoulda checked this */
+ if (load_flags & NETSNMP_ACCESS_SYSTEMSTATS_LOAD_IFTABLE) {
+ /* we do not support ipIfStatsTable for ipv4 */
+ return 0;
+ }
+
if (!(devin = fopen("/proc/net/snmp", "r"))) {
DEBUGMSGTL(("access:systemstats",
"Failed to load Systemstats Table (linux1)\n"));
@@ -144,7 +163,7 @@ _systemstats_v4(netsnmp_container* container, u_int load_flags)
while (*stats == ' ') /* skip spaces before stats */
stats++;
- entry = netsnmp_access_systemstats_entry_create(1);
+ entry = netsnmp_access_systemstats_entry_create(1, 0);
if(NULL == entry) {
netsnmp_access_systemstats_container_free(container,
NETSNMP_ACCESS_SYSTEMSTATS_FREE_NOFLAGS);
@@ -185,23 +204,54 @@ _systemstats_v4(netsnmp_container* container, u_int load_flags)
entry->stats.HCInReceives.high = scan_vals[2] >> 32;
entry->stats.InHdrErrors = scan_vals[3];
entry->stats.InAddrErrors = scan_vals[4];
- entry->stats.HCInForwDatagrams.low = scan_vals[5] & 0xffffffff;
- entry->stats.HCInForwDatagrams.high = scan_vals[5] >> 32;
+ entry->stats.HCOutForwDatagrams.low = scan_vals[5] & 0xffffffff;
+ entry->stats.HCOutForwDatagrams.high = scan_vals[5] >> 32;
entry->stats.InUnknownProtos = scan_vals[6];
entry->stats.InDiscards = scan_vals[7];
entry->stats.HCInDelivers.low = scan_vals[8] & 0xffffffff;
entry->stats.HCInDelivers.high = scan_vals[8] >> 32;
entry->stats.HCOutRequests.low = scan_vals[9] & 0xffffffff;
entry->stats.HCOutRequests.high = scan_vals[9] >> 32;
- entry->stats.OutDiscards = scan_vals[10];
- entry->stats.OutNoRoutes = scan_vals[11];
+ entry->stats.HCOutDiscards.low = scan_vals[10] & 0xffffffff;;
+ entry->stats.HCOutDiscards.high = scan_vals[10] >> 32;
+ entry->stats.HCOutNoRoutes.low = scan_vals[11] & 0xffffffff;;
+ entry->stats.HCOutNoRoutes.high = scan_vals[11] >> 32;
/* entry->stats. = scan_vals[12]; / * ReasmTimeout */
entry->stats.ReasmReqds = scan_vals[13];
entry->stats.ReasmOKs = scan_vals[14];
entry->stats.ReasmFails = scan_vals[15];
- entry->stats.OutFragOKs = scan_vals[16];
- entry->stats.OutFragFails = scan_vals[17];
- entry->stats.OutFragCreates = scan_vals[18];
+ entry->stats.HCOutFragOKs.low = scan_vals[16] & 0xffffffff;;
+ entry->stats.HCOutFragOKs.high = scan_vals[16] >> 32;
+ entry->stats.HCOutFragFails.low = scan_vals[17] & 0xffffffff;;
+ entry->stats.HCOutFragFails.high = scan_vals[17] >> 32;
+ entry->stats.HCOutFragCreates.low = scan_vals[18] & 0xffffffff;;
+ entry->stats.HCOutFragCreates.high = scan_vals[18] >> 32;
+
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINRECEIVES] = 1;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INHDRERRORS] = 1;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INADDRERRORS] = 1;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFORWDATAGRAMS] = 1;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INUNKNOWNPROTOS] = 1;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INDISCARDS] = 1;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINDELIVERS] = 1;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTREQUESTS] = 1;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTDISCARDS] = 1;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTNOROUTES] = 1;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_REASMREQDS] = 1;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_REASMOKS] = 1;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_REASMFAILS] = 1;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGOKS] = 1;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGFAILS] = 1;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGCREATES] = 1;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_DISCONTINUITYTIME] = 1;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_REFRESHRATE] = 1;
+
+ /*
+ * load addtional statistics defined by RFC 4293
+ * As these are supported linux 2.6.22 or later, it is no problem
+ * if loading them are failed.
+ */
+ _additional_systemstats_v4(entry, load_flags);
/*
* add to container
@@ -211,49 +261,106 @@ _systemstats_v4(netsnmp_container* container, u_int load_flags)
return 0;
}
-#if defined (NETSNMP_ENABLE_IPV6)
+#define IP_EXT_HEAD "IpExt:"
static int
-_systemstats_v6(netsnmp_container* container, u_int load_flags)
+_additional_systemstats_v4(netsnmp_systemstats_entry* entry,
+ u_int load_flags)
{
FILE *devin;
char line[1024];
- netsnmp_systemstats_entry *entry = NULL;
- int scan_count = 0;
- char *stats, *start = line;
- int len, rc;
- uintmax_t scan_val;
- const char *filename = "/proc/net/snmp6";
- static int warned_open = 0;
+ int scan_count;
+ uintmax_t scan_vals[6];
+ int retval = 0;
- DEBUGMSGTL(("access:systemstats:container:arch", "load v6 (flags %p)\n",
- load_flags));
+ DEBUGMSGTL(("access:systemstats:container:arch",
+ "load addtional v4 (flags %p)\n", load_flags));
- netsnmp_assert(container != NULL); /* load function shoulda checked this */
+ if (!(devin = fopen("/proc/net/netstat", "r"))) {
+ DEBUGMSGTL(("access:systemstats",
+ "cannot open /proc/net/netstat\n"));
+ return -2;
+ }
- entry = netsnmp_access_systemstats_entry_create(2);
- if(NULL == entry)
- return -3;
-
/*
- * try to open file. If we can't, that's ok - maybe the module hasn't
- * been loaded yet.
+ * Get header and stat lines
*/
- if (!(devin = fopen(filename, "r"))) {
- DEBUGMSGTL(("access:systemstats",
- "Failed to load Systemstats Table (linux1)\n"));
- if(!warned_open) {
- ++warned_open;
- snmp_log(LOG_ERR, "cannot open %s ...\n", filename);
- }
- free(entry);
- return 0;
+ while (fgets(line, sizeof(line), devin)) {
+ if (strncmp(IP_EXT_HEAD, line, sizeof(IP_EXT_HEAD) - 1) == 0) {
+ /* next line should includes IPv4 addtional statistics */
+ if ((fgets(line, sizeof(line), devin)) == NULL) {
+ retval = -4;
+ break;
+ }
+ if (strncmp(IP_EXT_HEAD, line, sizeof(IP_EXT_HEAD) - 1) != 0) {
+ retval = -4;
+ break;
+ }
+
+ memset(scan_vals, 0x0, sizeof(scan_vals));
+ scan_count = sscanf(line,
+ "%*s" /* ignore `IpExt:' */
+ "%llu %llu %llu %llu %llu %llu",
+ &scan_vals[0], &scan_vals[1], &scan_vals[2],
+ &scan_vals[3], &scan_vals[4], &scan_vals[5]);
+ if (scan_count < 6) {
+ snmp_log(LOG_ERR,
+ "error scanning addtional systemstats data"
+ "(minimum expected %d, got %d)\n",
+ 6, scan_count);
+ retval = -4;
+ break;
+ }
+
+ entry->stats.HCInNoRoutes.low = scan_vals[0] & 0xffffffff;
+ entry->stats.HCInNoRoutes.high = scan_vals[0] >> 32;
+ entry->stats.InTruncatedPkts = scan_vals[1];
+ entry->stats.HCInMcastPkts.low = scan_vals[2] & 0xffffffff;
+ entry->stats.HCInMcastPkts.high = scan_vals[2] >> 32;
+ entry->stats.HCOutMcastPkts.low = scan_vals[3] & 0xffffffff;
+ entry->stats.HCOutMcastPkts.high = scan_vals[3] >> 32;
+ entry->stats.HCInBcastPkts.low = scan_vals[4] & 0xffffffff;
+ entry->stats.HCInBcastPkts.high = scan_vals[4] >> 32;
+ entry->stats.HCOutBcastPkts.low = scan_vals[5] & 0xffffffff;
+ entry->stats.HCOutBcastPkts.high = scan_vals[5] >> 32;
+
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINNOROUTES] = 1;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INTRUNCATEDPKTS] = 1;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINMCASTPKTS] = 1;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTMCASTPKTS] = 1;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINBCASTPKTS] = 1;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTBCASTPKTS] = 1;
+ }
}
+ fclose(devin);
+
+ if (retval < 0)
+ DEBUGMSGTL(("access:systemstats",
+ "/proc/net/netstat does not include addtional stats\n"));
+
+ return retval;
+}
+
+#if defined (NETSNMP_ENABLE_IPV6)
+
+/*
+ * Load one /proc/net/snmp6 - like file (e.g. /proc/net/dev_snmp6/*)
+ */
+ static int
+_systemstats_v6_load_file(netsnmp_systemstats_entry *entry, FILE *devin)
+{
+ char line[1024];
+ char *stats, *start = line;
+ int len, rc;
+ int scan_count;
+ uintmax_t scan_val;
+
/*
* This file provides the statistics for each systemstats.
* Read in each line in turn, isolate the systemstats name
* and retrieve (or create) the corresponding data structure.
*/
+ rc = 0;
while (1) {
start = fgets(line, sizeof(line), devin);
if (NULL == start)
@@ -283,77 +390,101 @@ _systemstats_v6(netsnmp_container* container, u_int load_flags)
* data structure accordingly.
*/
scan_val = atoll(stats);
- if (0 == scan_val)
- continue;
rc = 0;
if ('I' == line[3]) { /* In */
if ('A' == line[5]) {
entry->stats.InAddrErrors = scan_val;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INADDRERRORS] = 1;
} else if ('D' == line[5]) {
if ('e' == line[6]) {
entry->stats.HCInDelivers.low = scan_val & 0xffffffff;
entry->stats.HCInDelivers.high = scan_val >> 32;
- } else if ('i' == line[6])
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINDELIVERS] = 1;
+ } else if ('i' == line[6]) {
entry->stats.InDiscards = scan_val;
- else
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INDISCARDS] = 1;
+ } else
rc = 1;
} else if ('H' == line[5]) {
entry->stats.InHdrErrors = scan_val;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INHDRERRORS] = 1;
} else if ('M' == line[5]) {
entry->stats.HCInMcastPkts.low = scan_val & 0xffffffff;
entry->stats.HCInMcastPkts.high = scan_val >> 32;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINMCASTPKTS] = 1;
} else if ('N' == line[5]) {
- entry->stats.InNoRoutes = scan_val;
+ entry->stats.HCInNoRoutes.low = scan_val & 0xffffffff;
+ entry->stats.HCInNoRoutes.high = scan_val >> 32;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINNOROUTES] = 1;
} else if ('R' == line[5]) {
entry->stats.HCInReceives.low = scan_val & 0xffffffff;
entry->stats.HCInReceives.high = scan_val >> 32;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINRECEIVES] = 1;
} else if ('T' == line[5]) {
if ('r' == line[6]) {
entry->stats.InTruncatedPkts = scan_val & 0xffffffff;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INTRUNCATEDPKTS] = 1;
} else if ('o' == line[6])
; /* TooBig isn't in the MIB, so ignore it */
else
rc = 1;
} else if ('U' == line[5]) {
entry->stats.InUnknownProtos = scan_val;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INUNKNOWNPROTOS] = 1;
} else
rc = 1;
} else if ('O' == line[3]) { /* Out */
if ('D' == line[6]) {
- entry->stats.OutDiscards = scan_val;
+ entry->stats.HCOutDiscards.low = scan_val & 0xffffffff;
+ entry->stats.HCOutDiscards.high = scan_val >> 32;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTDISCARDS] = 1;
} else if ('F' == line[6]) {
entry->stats.HCOutForwDatagrams.low = scan_val & 0xffffffff;
entry->stats.HCOutForwDatagrams.high = scan_val >> 32;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFORWDATAGRAMS] = 1;
} else if ('M' == line[6]) {
entry->stats.HCOutMcastPkts.low = scan_val & 0xffffffff;
entry->stats.HCOutMcastPkts.high = scan_val >> 32;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTMCASTPKTS] = 1;
} else if ('N' == line[6]) {
- entry->stats.OutNoRoutes = scan_val;
+ entry->stats.HCOutNoRoutes.low = scan_val & 0xffffffff;
+ entry->stats.HCOutNoRoutes.high = scan_val >> 32;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTNOROUTES] = 1;
} else if ('R' == line[6]) {
entry->stats.HCOutRequests.low = scan_val & 0xffffffff;
entry->stats.HCOutRequests.high = scan_val >> 32;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTREQUESTS] = 1;
} else
rc = 1;
} else if ('R' == line[3]) { /* Reasm */
if ('F' == line[8]) {
entry->stats.ReasmFails = scan_val;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_REASMFAILS] = 1;
} else if ('O' == line[8]) {
entry->stats.ReasmOKs = scan_val;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_REASMOKS] = 1;
} else if ('R' == line[8]) {
entry->stats.ReasmReqds = scan_val;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_REASMREQDS] = 1;
} else if ('T' == line[8]) {
; /* no mib entry for reasm timeout */
} else
rc = 1;
} else if ('F' == line[3]) { /* Frag */
- if ('C' == line[7])
- entry->stats.OutFragCreates = scan_val;
- else if ('O' == line[7])
- entry->stats.OutFragOKs = scan_val;
- else if ('F' == line[7])
- entry->stats.OutFragFails = scan_val;
- else
+ if ('C' == line[7]) {
+ entry->stats.HCOutFragCreates.low = scan_val & 0xffffffff;
+ entry->stats.HCOutFragCreates.high = scan_val >> 32;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGCREATES] = 1;
+ } else if ('O' == line[7]) {
+ entry->stats.HCOutFragOKs.low = scan_val & 0xffffffff;
+ entry->stats.HCOutFragOKs.high = scan_val >> 32;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGOKS] = 1;
+ } else if ('F' == line[7]) {
+ entry->stats.HCOutFragFails.low = scan_val & 0xffffffff;
+ entry->stats.HCOutFragFails.high = scan_val >> 32;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGFAILS] = 1;
+ } else
rc = 1;
} else
rc = 1;
@@ -363,6 +494,47 @@ _systemstats_v6(netsnmp_container* container, u_int load_flags)
else
++scan_count;
}
+ /*
+ * Let DiscontinuityTime and RefreshRate active
+ */
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_DISCONTINUITYTIME] = 1;
+ entry->stats.columnAvail[IPSYSTEMSTATSTABLE_REFRESHRATE] = 1;
+
+ return rc;
+}
+
+/*
+ * load ipSystemStatsTable for ipv6 entries
+ */
+static int
+_systemstats_v6_load_systemstats(netsnmp_container* container, u_int load_flags)
+{
+ FILE *devin;
+ netsnmp_systemstats_entry *entry = NULL;
+ const char *filename = "/proc/net/snmp6";
+ static int warned_open = 0;
+ int rc = 0;
+
+ entry = netsnmp_access_systemstats_entry_create(2, 0);
+ if(NULL == entry)
+ return -3;
+
+ /*
+ * try to open file. If we can't, that's ok - maybe the module hasn't
+ * been loaded yet.
+ */
+ if (!(devin = fopen(filename, "r"))) {
+ DEBUGMSGTL(("access:systemstats",
+ "Failed to load Systemstats Table (linux1)\n"));
+ if(!warned_open) {
+ ++warned_open;
+ snmp_log(LOG_ERR, "cannot open %s ...\n", filename);
+ }
+ free(entry);
+ return 0;
+ }
+
+ rc = _systemstats_v6_load_file(entry, devin);
fclose(devin);
@@ -373,4 +545,119 @@ _systemstats_v6(netsnmp_container* container, u_int load_flags)
return rc;
}
+
+#define DEV_SNMP6_DIRNAME "/proc/net/dev_snmp6"
+#define IFINDEX_LINE "ifIndex"
+#define DEV_FILENAME_LEN 64
+
+/*
+ * load ipIfStatsTable for ipv6 entries
+ */
+static int
+_systemstats_v6_load_ifstats(netsnmp_container* container, u_int load_flags)
+{
+ DIR *dev_snmp6_dir;
+ struct dirent *dev_snmp6_entry;
+ char dev_filename[DEV_FILENAME_LEN];
+ FILE *devin;
+ char line[1024];
+ char *stats, *start = line;
+ int rc;
+ char *scan_str;
+ uintmax_t scan_val;
+ netsnmp_systemstats_entry *entry = NULL;
+
+ /*
+ * try to open /proc/net/dev_snmp6 directory. If we can't, that' ok -
+ * maybe it is not supported by the current running kernel.
+ */
+ if ((dev_snmp6_dir = opendir(DEV_SNMP6_DIRNAME)) == NULL) {
+ DEBUGMSGTL(("access:ifstats",
+ "Failed to load IPv6 IfStats Table (linux)\n"));
+ return 0;
+ }
+
+ /*
+ * Read each per interface statistics proc file
+ */
+ rc = 0;
+ while ((dev_snmp6_entry = readdir(dev_snmp6_dir)) != NULL) {
+ if (dev_snmp6_entry->d_name[0] == '.')
+ continue;
+
+ if (snprintf(dev_filename, DEV_FILENAME_LEN, "%s/%s", DEV_SNMP6_DIRNAME,
+ dev_snmp6_entry->d_name) > DEV_FILENAME_LEN) {
+ snmp_log(LOG_ERR, "Interface name %s is too long\n",
+ dev_snmp6_entry->d_name);
+ continue;
+ }
+ if (NULL == (devin = fopen(dev_filename, "r"))) {
+ snmp_log(LOG_ERR, "Failed to open %s\n", dev_filename);
+ continue;
+ }
+
+ /*
+ * If a stat file name is made of digits, the name is interface index.
+ * If it is an interface name, the file includes a line labeled ifIndex.
+ */
+ if (isdigit(dev_snmp6_entry->d_name[0])) {
+ scan_val = strtoull(dev_snmp6_entry->d_name, NULL, 0);
+ } else {
+ if (NULL == (start = fgets(line, sizeof(line), devin))) {
+ snmp_log(LOG_ERR, "%s doesn't include any lines\n",
+ dev_filename);
+ fclose(devin);
+ continue;
+ }
+
+ if (0 != strncmp(start, IFINDEX_LINE, 7)) {
+ snmp_log(LOG_ERR, "%s doesn't include ifIndex line",
+ dev_filename);
+ fclose(devin);
+ continue;
+ }
+
+ scan_str = strrchr(line, ' ');
+ if (NULL == scan_str) {
+ snmp_log(LOG_ERR, "%s is wrong format", dev_filename);
+ fclose(devin);
+ continue;
+ }
+ scan_val = strtoull(scan_str, NULL, 0);
+ }
+
+ entry = netsnmp_access_systemstats_entry_create(2, scan_val);
+ if(NULL == entry) {
+ fclose(devin);
+ closedir(dev_snmp6_dir);
+ return -3;
+ }
+
+ _systemstats_v6_load_file(entry, devin);
+ CONTAINER_INSERT(container, entry);
+ fclose(devin);
+ }
+ closedir(dev_snmp6_dir);
+ return 0;
+}
+
+/*
+ * Based on load_flags, load ipSystemStatsTable or ipIfStatsTable for ipv6 entries.
+ */
+static int
+_systemstats_v6(netsnmp_container* container, u_int load_flags)
+{
+ DEBUGMSGTL(("access:systemstats:container:arch", "load v6 (flags %p)\n",
+ load_flags));
+
+ netsnmp_assert(container != NULL); /* load function shoulda checked this */
+
+ if (load_flags & NETSNMP_ACCESS_SYSTEMSTATS_LOAD_IFTABLE) {
+ /* load ipIfStatsTable */
+ return _systemstats_v6_load_ifstats(container, load_flags);
+ } else {
+ /* load ipSystemStatsTable */
+ return _systemstats_v6_load_systemstats(container, load_flags);
+ }
+}
#endif /* NETSNMP_ENABLE_IPV6 */
diff --git a/agent/mibgroup/ip-mib/ipIfStatsTable.h b/agent/mibgroup/ip-mib/ipIfStatsTable.h
new file mode 100644
index 0000000..da1d85c
--- /dev/null
+++ b/agent/mibgroup/ip-mib/ipIfStatsTable.h
@@ -0,0 +1,8 @@
+/*
+ * module to include the modules
+ */
+
+config_require(ip-mib/data_access/systemstats)
+config_require(ip-mib/ipIfStatsTable/ipIfStatsTable)
+config_require(ip-mib/ipIfStatsTable/ipIfStatsTable_interface)
+config_require(ip-mib/ipIfStatsTable/ipIfStatsTable_data_access)
diff --git a/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable.c b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable.c
new file mode 100644
index 0000000..6af3529
--- /dev/null
+++ b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable.c
@@ -0,0 +1,216 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 14170 $ of $
+ *
+ * $Id:$
+ */
+/** \page MFD helper for ipIfStatsTable
+ *
+ * \section intro Introduction
+ * Introductory text.
+ *
+ */
+/*
+ * standard Net-SNMP includes
+ */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+
+/*
+ * include our parent header
+ */
+#include "ipIfStatsTable.h"
+
+#include <net-snmp/agent/mib_modules.h>
+
+#include "ipIfStatsTable_interface.h"
+
+oid ipIfStatsTable_oid[] = { IPIFSTATSTABLE_OID };
+int ipIfStatsTable_oid_size = OID_LENGTH(ipIfStatsTable_oid);
+
+ipIfStatsTable_registration ipIfStatsTable_user_context;
+
+void initialize_table_ipIfStatsTable(void);
+void shutdown_table_ipIfStatsTable(void);
+
+
+/**
+ * Initializes the ipIfStatsTable module
+ */
+void
+init_ipIfStatsTable(void)
+{
+ DEBUGMSGTL(("verbose:ipIfStatsTable:init_ipIfStatsTable", "called\n"));
+
+ /*
+ * TODO:300:o: Perform ipIfStatsTable one-time module initialization.
+ */
+
+ /*
+ * here we initialize all the tables we're planning on supporting
+ */
+ if (should_init("ipIfStatsTable"))
+ initialize_table_ipIfStatsTable();
+
+ /*
+ * last changed should be 0 at startup
+ */
+ ipIfStatsTable_lastChange_set(0);
+} /* init_ipIfStatsTable */
+
+/**
+ * Shut-down the ipIfStatsTable module (agent is exiting)
+ */
+void
+shutdown_ipIfStatsTable(void)
+{
+ if (should_init("ipIfStatsTable"))
+ shutdown_table_ipIfStatsTable();
+
+}
+
+/**
+ * Initialize the table ipIfStatsTable
+ * (Define its contents and how it's structured)
+ */
+void
+initialize_table_ipIfStatsTable(void)
+{
+ ipIfStatsTable_registration *user_context;
+ u_long flags;
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:initialize_table_ipIfStatsTable",
+ "called\n"));
+
+ /*
+ * TODO:301:o: Perform ipIfStatsTable one-time table initialization.
+ */
+
+ /*
+ * TODO:302:o: |->Initialize ipIfStatsTable user context
+ * if you'd like to pass in a pointer to some data for this
+ * table, allocate or set it up here.
+ */
+ /*
+ * a netsnmp_data_list is a simple way to store void pointers. A simple
+ * string token is used to add, find or remove pointers.
+ */
+ user_context = netsnmp_create_data_list("ipIfStatsTable", NULL, NULL);
+
+ /*
+ * No support for any flags yet, but in the future you would
+ * set any flags here.
+ */
+ flags = 0;
+
+ /*
+ * call interface initialization code
+ */
+ _ipIfStatsTable_initialize_interface(user_context, flags);
+} /* initialize_table_ipIfStatsTable */
+
+/**
+ * Shutdown the table ipIfStatsTable
+ */
+void
+shutdown_table_ipIfStatsTable(void)
+{
+ /*
+ * call interface shutdown code
+ */
+ _ipIfStatsTable_shutdown_interface(&ipIfStatsTable_user_context);
+}
+
+/**
+ * extra context initialization (eg default values)
+ *
+ * @param rowreq_ctx : row request context
+ * @param user_init_ctx : void pointer for user (parameter to rowreq_ctx_allocate)
+ *
+ * @retval MFD_SUCCESS : no errors
+ * @retval MFD_ERROR : error (context allocate will fail)
+ */
+int
+ipIfStatsTable_rowreq_ctx_init(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ void *user_init_ctx)
+{
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsTable_rowreq_ctx_init",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:210:o: |-> Perform extra ipIfStatsTable rowreq initialization. (eg DEFVALS)
+ */
+
+ return MFD_SUCCESS;
+} /* ipIfStatsTable_rowreq_ctx_init */
+
+/**
+ * extra context cleanup
+ *
+ */
+void
+ipIfStatsTable_rowreq_ctx_cleanup(ipIfStatsTable_rowreq_ctx * rowreq_ctx)
+{
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsTable_rowreq_ctx_cleanup",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:211:o: |-> Perform extra ipIfStatsTable rowreq cleanup.
+ */
+} /* ipIfStatsTable_rowreq_ctx_cleanup */
+
+/**
+ * pre-request callback
+ *
+ *
+ * @retval MFD_SUCCESS : success.
+ * @retval MFD_ERROR : other error
+ */
+int
+ipIfStatsTable_pre_request(ipIfStatsTable_registration * user_context)
+{
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsTable_pre_request",
+ "called\n"));
+
+ /*
+ * TODO:510:o: Perform ipIfStatsTable pre-request actions.
+ */
+
+ return MFD_SUCCESS;
+} /* ipIfStatsTable_pre_request */
+
+/**
+ * post-request callback
+ *
+ * Note:
+ * New rows have been inserted into the container, and
+ * deleted rows have been removed from the container and
+ * released.
+ *
+ * @param user_context
+ * @param rc : MFD_SUCCESS if all requests succeeded
+ *
+ * @retval MFD_SUCCESS : success.
+ * @retval MFD_ERROR : other error (ignored)
+ */
+int
+ipIfStatsTable_post_request(ipIfStatsTable_registration * user_context,
+ int rc)
+{
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsTable_post_request",
+ "called\n"));
+
+ /*
+ * TODO:511:o: Perform ipIfStatsTable post-request actions.
+ */
+
+ return MFD_SUCCESS;
+} /* ipIfStatsTable_post_request */
+
+
+/** @{ */
diff --git a/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable.h b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable.h
new file mode 100644
index 0000000..8bf0a7a
--- /dev/null
+++ b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable.h
@@ -0,0 +1,200 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 14170 $ of $
+ *
+ * $Id:$
+ */
+#ifndef IPIFSTATSTABLE_H
+#define IPIFSTATSTABLE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/** @addtogroup misc misc: Miscellaneous routines
+ *
+ * @{
+ */
+#include <net-snmp/library/asn1.h>
+#include <net-snmp/data_access/ipstats.h>
+#include <net-snmp/data_access/systemstats.h>
+
+ /*
+ * other required module components
+ */
+ /* *INDENT-OFF* */
+config_require(ip-mib/ipIfStatsTable/ipIfStatsTable_interface)
+config_require(ip-mib/ipIfStatsTable/ipIfStatsTable_data_access)
+config_require(ip-mib/ipIfStatsTable/ipIfStatsTable_data_get)
+ /* *INDENT-ON* */
+
+ /*
+ * OID and column number definitions for ipIfStatsTable
+ */
+#include "ipIfStatsTable_oids.h"
+
+ /*
+ * enum definions
+ */
+#include "ipIfStatsTable_enums.h"
+
+ /*
+ *********************************************************************
+ * function declarations
+ */
+ void init_ipIfStatsTable(void);
+ void shutdown_ipIfStatsTable(void);
+
+ /*
+ *********************************************************************
+ * Table declarations
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table ipIfStatsTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+ /*
+ * IP-MIB::ipIfStatsTable is subid 3 of ipTrafficStats.
+ * Its status is Current.
+ * OID: .1.3.6.1.2.1.4.31.3, length: 9
+ */
+ /*
+ *********************************************************************
+ * 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 ipIfStatsTable registration context.
+ */
+ typedef netsnmp_data_list ipIfStatsTable_registration;
+
+/**********************************************************************/
+ /*
+ * TODO:110:r: |-> Review ipIfStatsTable data context structure.
+ * This structure is used to represent the data for ipIfStatsTable.
+ */
+ typedef netsnmp_systemstats_entry ipIfStatsTable_data;
+
+
+ /*
+ * TODO:120:r: |-> Review ipIfStatsTable mib index.
+ * This structure is used to represent the index for ipIfStatsTable.
+ */
+ typedef struct ipIfStatsTable_mib_index_s {
+
+ /*
+ * ipIfStatsIPVersion(1)/InetVersion/ASN_INTEGER/long(u_long)//l/a/w/E/r/d/h
+ */
+ u_long ipIfStatsIPVersion;
+
+ /*
+ * ipIfStatsIfIndex(2)/InterfaceIndex/ASN_INTEGER/long(long)//l/a/w/e/R/d/H
+ */
+ long ipIfStatsIfIndex;
+
+
+ } ipIfStatsTable_mib_index;
+
+ /*
+ * TODO:121:r: | |-> Review ipIfStatsTable max index length.
+ * If you KNOW that your indexes will never exceed a certain
+ * length, update this macro to that length.
+ */
+#define MAX_ipIfStatsTable_IDX_LEN 2
+
+
+ /*
+ *********************************************************************
+ * TODO:130:o: |-> Review ipIfStatsTable Row request (rowreq) context.
+ * When your functions are called, you will be passed a
+ * ipIfStatsTable_rowreq_ctx pointer.
+ */
+ typedef struct ipIfStatsTable_rowreq_ctx_s {
+
+ /** this must be first for container compare to work */
+ netsnmp_index oid_idx;
+ oid oid_tmp[MAX_ipIfStatsTable_IDX_LEN];
+
+ ipIfStatsTable_mib_index tbl_idx;
+
+ ipIfStatsTable_data *data;
+
+ /*
+ * flags per row. Currently, the first (lower) 8 bits are reserved
+ * for the user. See mfd.h for other flags.
+ */
+ u_int rowreq_flags;
+
+ /*
+ * TODO:131:o: | |-> Add useful data to ipIfStatsTable rowreq context.
+ */
+ char known_missing;
+ uint32_t ipIfStatsDiscontinuityTime;
+ uint32_t ipIfStatsRefreshRate;
+
+ /*
+ * storage for future expansion
+ */
+ netsnmp_data_list *ipIfStatsTable_data_list;
+
+ } ipIfStatsTable_rowreq_ctx;
+
+ typedef struct ipIfStatsTable_ref_rowreq_ctx_s {
+ ipIfStatsTable_rowreq_ctx *rowreq_ctx;
+ } ipIfStatsTable_ref_rowreq_ctx;
+
+ /*
+ *********************************************************************
+ * function prototypes
+ */
+ int ipIfStatsTable_pre_request(ipIfStatsTable_registration
+ * user_context);
+ int ipIfStatsTable_post_request(ipIfStatsTable_registration
+ * user_context, int rc);
+
+ int
+ ipIfStatsTable_rowreq_ctx_init(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx, void *user_init_ctx);
+ void
+ ipIfStatsTable_rowreq_ctx_cleanup(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx);
+
+ ipIfStatsTable_data *ipIfStatsTable_allocate_data(void);
+ void ipIfStatsTable_release_data(ipIfStatsTable_data *
+ data);
+
+
+ ipIfStatsTable_rowreq_ctx
+ *ipIfStatsTable_row_find_by_mib_index(ipIfStatsTable_mib_index *
+ mib_idx);
+
+ extern oid ipIfStatsTable_oid[];
+ extern int ipIfStatsTable_oid_size;
+
+
+#include "ipIfStatsTable_interface.h"
+#include "ipIfStatsTable_data_access.h"
+#include "ipIfStatsTable_data_get.h"
+
+ /*
+ * DUMMY markers, ignore
+ *
+ * TODO:099:x: *************************************************************
+ * TODO:199:x: *************************************************************
+ * TODO:299:x: *************************************************************
+ * TODO:399:x: *************************************************************
+ * TODO:499:x: *************************************************************
+ */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* IPIFSTATSTABLE_H */
+/** @} */
diff --git a/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_access.c b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_access.c
new file mode 100644
index 0000000..f2ec1a1
--- /dev/null
+++ b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_access.c
@@ -0,0 +1,408 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 14170 $ of $
+ *
+ * $Id:$
+ */
+/*
+ * standard Net-SNMP includes
+ */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+
+/*
+ * include our parent header
+ */
+#include "ipIfStatsTable.h"
+
+
+#include "ipIfStatsTable_data_access.h"
+
+static int ipis_cache_refresh = IPIFSTATSTABLE_CACHE_TIMEOUT;
+
+/** @ingroup interface
+ * @addtogroup data_access data_access: Routines to access data
+ *
+ * These routines are used to locate the data used to satisfy
+ * requests.
+ *
+ * @{
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table ipIfStatsTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * IP-MIB::ipIfStatsTable is subid 3 of ipTrafficStats.
+ * Its status is Current.
+ * OID: .1.3.6.1.2.1.4.31.3, length: 9
+ */
+
+/**
+ * initialization for ipIfStatsTable data access
+ *
+ * This function is called during startup to allow you to
+ * allocate any resources you need for the data table.
+ *
+ * @param ipIfStatsTable_reg
+ * Pointer to ipIfStatsTable_registration
+ *
+ * @retval MFD_SUCCESS : success.
+ * @retval MFD_ERROR : unrecoverable error.
+ */
+int
+ipIfStatsTable_init_data(ipIfStatsTable_registration * ipIfStatsTable_reg)
+{
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsTable_init_data",
+ "called\n"));
+
+ /*
+ * TODO:303:o: Initialize ipIfStatsTable data.
+ */
+ netsnmp_access_systemstats_init();
+
+ return MFD_SUCCESS;
+} /* ipIfStatsTable_init_data */
+
+/**
+ * container overview
+ *
+ */
+
+/**
+ * container initialization
+ *
+ * @param container_ptr_ptr A pointer to a container pointer. If you
+ * create a custom container, use this parameter to return it
+ * to the MFD helper. If set to NULL, the MFD helper will
+ * allocate a container for you.
+ * @param cache A pointer to a cache structure. You can set the timeout
+ * and other cache flags using this pointer.
+ *
+ * This function is called at startup to allow you to customize certain
+ * aspects of the access method. For the most part, it is for advanced
+ * users. The default code should suffice for most cases. If no custom
+ * container is allocated, the MFD code will create one for your.
+ *
+ * This is also the place to set up cache behavior. The default, to
+ * simply set the cache timeout, will work well with the default
+ * container. If you are using a custom container, you may want to
+ * look at the cache helper documentation to see if there are any
+ * flags you want to set.
+ *
+ * @remark
+ * This would also be a good place to do any initialization needed
+ * for you data source. For example, opening a connection to another
+ * process that will supply the data, opening a database, etc.
+ */
+void
+ipIfStatsTable_container_init(netsnmp_container ** container_ptr_ptr,
+ netsnmp_cache * cache)
+{
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsTable_container_init",
+ "called\n"));
+
+ if (NULL == container_ptr_ptr) {
+ snmp_log(LOG_ERR,
+ "bad container param to ipIfStatsTable_container_init\n");
+ return;
+ }
+
+ /*
+ * For advanced users, you can use a custom container. If you
+ * do not create one, one will be created for you.
+ */
+ /*
+ * We create a custom container here so we can pre-load it, which
+ * will result in all new entries with last changed values. we need
+ * to clear those... We also need to make sure ifIndexes have been
+ * assigned...
+ */
+ *container_ptr_ptr =
+ netsnmp_container_find("ipIfStatsTable:table_container");
+ if (NULL != *container_ptr_ptr)
+ ipIfStatsTable_container_load(*container_ptr_ptr);
+ if (NULL == cache) {
+ snmp_log(LOG_ERR,
+ "bad cache param to ipIfStatsTable_container_init\n");
+ return;
+ }
+
+ /*
+ * TODO:345:A: Set up ipIfStatsTable cache properties.
+ *
+ * Also for advanced users, you can set parameters for the
+ * cache. Do not change the magic pointer, as it is used
+ * by the MFD helper. To completely disable caching, set
+ * cache->enabled to 0.
+ */
+ cache->timeout = IPIFSTATSTABLE_CACHE_TIMEOUT; /* seconds */
+
+ cache->flags |=
+ (NETSNMP_CACHE_DONT_AUTO_RELEASE | NETSNMP_CACHE_DONT_FREE_EXPIRED
+ | NETSNMP_CACHE_DONT_FREE_BEFORE_LOAD |
+ NETSNMP_CACHE_AUTO_RELOAD);
+} /* ipIfStatsTable_container_init */
+
+/**
+ * check entry for update
+ */
+static void
+_check_for_updates(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ netsnmp_container *stats)
+{
+ netsnmp_systemstats_entry *ifstats_entry;
+
+ /*
+ * check for matching entry. works because indexes are the same.
+ */
+ ifstats_entry = CONTAINER_FIND(stats, rowreq_ctx->data);
+ if (NULL == ifstats_entry) {
+ DEBUGMSGTL(("ipIfStatsTable:access",
+ "updating missing entry\n"));
+
+ /*
+ * mark row as missing, so we can set discontinuity
+ * when it comes back.
+ *
+ * what else should we do? set refresh to 0? that's not quite right...
+ */
+ rowreq_ctx->known_missing = 1;
+ } else {
+ DEBUGMSGTL(("ipIfStatsTable:access",
+ "updating existing entry\n"));
+
+ /*
+ * Check for changes & update
+ */
+ netsnmp_access_systemstats_entry_update(rowreq_ctx->data,
+ ifstats_entry);
+
+ /*
+ * set discontinuity if previously missing.
+ */
+ if (1 == rowreq_ctx->known_missing) {
+ rowreq_ctx->known_missing = 0;
+ rowreq_ctx->ipIfStatsDiscontinuityTime =
+ netsnmp_get_agent_uptime();
+ ipIfStatsTable_lastChange_set(netsnmp_get_agent_uptime());
+ }
+
+ /*
+ * remove entry from container
+ */
+ CONTAINER_REMOVE(stats, ifstats_entry);
+ netsnmp_access_systemstats_entry_free(ifstats_entry);
+ }
+}
+
+/**
+ * add new entry
+ */
+static void
+_add_new(netsnmp_systemstats_entry *ifstats_entry,
+ netsnmp_container *container)
+{
+ ipIfStatsTable_rowreq_ctx *rowreq_ctx;
+
+ DEBUGMSGTL(("ipIfStatsTable:access", "creating new entry\n"));
+
+ netsnmp_assert(NULL != ifstats_entry);
+ netsnmp_assert(NULL != container);
+
+ /*
+ * allocate an row context and set the index(es)
+ */
+ rowreq_ctx =
+ ipIfStatsTable_allocate_rowreq_ctx(ifstats_entry, NULL);
+ if ((NULL != rowreq_ctx)
+ && (MFD_SUCCESS ==
+ ipIfStatsTable_indexes_set(rowreq_ctx,
+ ifstats_entry->index[0],
+ ifstats_entry->index[1]))) {
+ rowreq_ctx->ipIfStatsRefreshRate = ipis_cache_refresh * 1000; /* milli-seconds */
+ CONTAINER_INSERT(container, rowreq_ctx);
+ ipIfStatsTable_lastChange_set(netsnmp_get_agent_uptime());
+ } else {
+ if (NULL != rowreq_ctx) {
+ snmp_log(LOG_ERR, "error setting index while loading "
+ "ipIfStatsTable cache.\n");
+ ipIfStatsTable_release_rowreq_ctx(rowreq_ctx);
+ } else {
+ snmp_log(LOG_ERR, "memory allocation failed while loading "
+ "ipIfStatsTable cache.\n");
+ netsnmp_access_systemstats_entry_free(ifstats_entry);
+ }
+ }
+}
+
+/**
+ * container shutdown
+ *
+ * @param container_ptr A pointer to the container.
+ *
+ * This function is called at shutdown to allow you to customize certain
+ * aspects of the access method. For the most part, it is for advanced
+ * users. The default code should suffice for most cases.
+ *
+ * This function is called before ipIfStatsTable_container_free().
+ *
+ * @remark
+ * This would also be a good place to do any cleanup needed
+ * for you data source. For example, closing a connection to another
+ * process that supplied the data, closing a database, etc.
+ */
+void
+ipIfStatsTable_container_shutdown(netsnmp_container * container_ptr)
+{
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsTable_container_shutdown",
+ "called\n"));
+
+ if (NULL == container_ptr) {
+ snmp_log(LOG_ERR,
+ "bad params to ipIfStatsTable_container_shutdown\n");
+ return;
+ }
+
+} /* ipIfStatsTable_container_shutdown */
+
+/**
+ * load initial data
+ *
+ * TODO:350:M: Implement ipIfStatsTable data load
+ * This function will also be called by the cache helper to load
+ * the container again (after the container free function has been
+ * called to free the previous contents).
+ *
+ * @param container container to which items should be inserted
+ *
+ * @retval MFD_SUCCESS : success.
+ * @retval MFD_RESOURCE_UNAVAILABLE : Can't access data source
+ * @retval MFD_ERROR : other error.
+ *
+ * This function is called to load the index(es) (and data, optionally)
+ * for the every row in the data set.
+ *
+ * @remark
+ * While loading the data, the only important thing is the indexes.
+ * If access to your data is cheap/fast (e.g. you have a pointer to a
+ * structure in memory), it would make sense to update the data here.
+ * If, however, the accessing the data invovles more work (e.g. parsing
+ * some other existing data, or peforming calculations to derive the data),
+ * then you can limit yourself to setting the indexes and saving any
+ * information you will need later. Then use the saved information in
+ * ipIfStatsTable_row_prep() for populating data.
+ *
+ * @note
+ * If you need consistency between rows (like you want statistics
+ * for each row to be from the same time frame), you should set all
+ * data here.
+ *
+ */
+int
+ipIfStatsTable_container_load(netsnmp_container * container)
+{
+ netsnmp_container *stats;
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsTable_container_load",
+ "called\n"));
+
+ netsnmp_assert(NULL != container);
+
+ stats = netsnmp_access_systemstats_container_load(NULL, NETSNMP_ACCESS_SYSTEMSTATS_LOAD_IFTABLE);
+ if (NULL == stats)
+ return MFD_RESOURCE_UNAVAILABLE; /* msg already logged */
+
+ /*
+ * TODO:351:M: |-> Load/update data in the ipIfStatsTable container.
+ * loop over your ipIfStatsTable data, allocate a rowreq context,
+ * set the index(es) [and data, optionally] and insert into
+ * the container.
+ */
+
+ /*
+ * we just got a fresh copy of data. compare it to
+ * what we've already got, and make any adjustements...
+ */
+ CONTAINER_FOR_EACH(container, (netsnmp_container_obj_func *)
+ _check_for_updates, stats);
+
+ /*
+ * now add any new entries
+ */
+ CONTAINER_FOR_EACH(stats, (netsnmp_container_obj_func *)
+ _add_new, container);
+
+
+ /*
+ * free the container. we've either claimed each ifentry, or released it,
+ * so the dal function doesn't need to clear the container.
+ */
+ netsnmp_access_systemstats_container_free(stats,
+ NETSNMP_ACCESS_SYSTEMSTATS_FREE_DONT_CLEAR);
+
+ DEBUGMSGT(("verbose:ipIfStatsTable:ipIfStatsTable_container_load",
+ "%d records\n", CONTAINER_SIZE(container)));
+
+ return MFD_SUCCESS;
+} /* ipIfStatsTable_container_load */
+
+/**
+ * container clean up
+ *
+ * @param container container with all current items
+ *
+ * This optional callback is called prior to all
+ * item's being removed from the container. If you
+ * need to do any processing before that, do it here.
+ *
+ * @note
+ * The MFD helper will take care of releasing all the row contexts.
+ *
+ */
+void
+ipIfStatsTable_container_free(netsnmp_container * container)
+{
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsTable_container_free",
+ "called\n"));
+
+ /*
+ * TODO:380:M: Free ipIfStatsTable container data.
+ */
+} /* ipIfStatsTable_container_free */
+
+/**
+ * prepare row for processing.
+ *
+ * When the agent has located the row for a request, this function is
+ * called to prepare the row for processing. If you fully populated
+ * the data context during the index setup phase, you may not need to
+ * do anything.
+ *
+ * @param rowreq_ctx pointer to a context.
+ *
+ * @retval MFD_SUCCESS : success.
+ * @retval MFD_ERROR : other error.
+ */
+int
+ipIfStatsTable_row_prep(ipIfStatsTable_rowreq_ctx * rowreq_ctx)
+{
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsTable_row_prep",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:390:o: Prepare row for request.
+ * If populating row data was delayed, this is the place to
+ * fill in the row for this request.
+ */
+
+ return MFD_SUCCESS;
+} /* ipIfStatsTable_row_prep */
+
+/** @} */
diff --git a/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_access.h b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_access.h
new file mode 100644
index 0000000..5ef7682
--- /dev/null
+++ b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_access.h
@@ -0,0 +1,70 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 14170 $ of $
+ *
+ * $Id:$
+ */
+#ifndef IPIFSTATSTABLE_DATA_ACCESS_H
+#define IPIFSTATSTABLE_DATA_ACCESS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+ /*
+ *********************************************************************
+ * function declarations
+ */
+
+ /*
+ *********************************************************************
+ * Table declarations
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table ipIfStatsTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+ /*
+ * IP-MIB::ipIfStatsTable is subid 3 of ipTrafficStats.
+ * Its status is Current.
+ * OID: .1.3.6.1.2.1.4.31.3, length: 9
+ */
+
+
+ int ipIfStatsTable_init_data(ipIfStatsTable_registration *
+ ipIfStatsTable_reg);
+
+
+ /*
+ * TODO:180:o: Review ipIfStatsTable cache timeout.
+ * The number of seconds before the cache times out
+ */
+#define IPIFSTATSTABLE_CACHE_TIMEOUT 60
+
+ void ipIfStatsTable_container_init(netsnmp_container **
+ container_ptr_ptr,
+ netsnmp_cache * cache);
+ void ipIfStatsTable_container_shutdown(netsnmp_container *
+ container_ptr);
+
+ int ipIfStatsTable_container_load(netsnmp_container *
+ container);
+ void ipIfStatsTable_container_free(netsnmp_container *
+ container);
+
+ int ipIfStatsTable_cache_load(netsnmp_container *
+ container);
+ void ipIfStatsTable_cache_free(netsnmp_container *
+ container);
+
+ int ipIfStatsTable_row_prep(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* IPIFSTATSTABLE_DATA_ACCESS_H */
diff --git a/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.c b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.c
new file mode 100644
index 0000000..db673dc
--- /dev/null
+++ b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.c
@@ -0,0 +1,3015 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 12088 $ of $
+ *
+ * $Id:$
+ */
+/*
+ * standard Net-SNMP includes
+ */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+
+/*
+ * include our parent header
+ */
+#include "ipIfStatsTable.h"
+
+
+/** @defgroup data_get data_get: Routines to get data
+ *
+ * TODO:230:M: Implement ipIfStatsTable get routines.
+ * TODO:240:M: Implement ipIfStatsTable mapping routines (if any).
+ *
+ * These routine are used to get the value for individual objects. The
+ * row context is passed, along with a pointer to the memory where the
+ * value should be copied.
+ *
+ * @{
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table ipIfStatsTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * IP-MIB::ipIfStatsTable is subid 3 of ipTrafficStats.
+ * Its status is Current.
+ * OID: .1.3.6.1.2.1.4.31.3, length: 9
+ */
+
+/*
+ * ---------------------------------------------------------------------
+ * * TODO:200:r: Implement ipIfStatsTable data context functions.
+ */
+/*
+ * ipIfStatsTable_allocate_data
+ *
+ * Purpose: create new ipIfStatsTable_data.
+ */
+ipIfStatsTable_data *
+ipIfStatsTable_allocate_data(void)
+{
+ /*
+ * TODO:201:r: |-> allocate memory for the ipIfStatsTable data context.
+ */
+ ipIfStatsTable_data *rtn = SNMP_MALLOC_TYPEDEF(ipIfStatsTable_data);
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsTable_allocate_data",
+ "called\n"));
+
+ if (NULL == rtn) {
+ snmp_log(LOG_ERR, "unable to malloc memory for new "
+ "ipIfStatsTable_data.\n");
+ }
+
+ return rtn;
+} /* ipIfStatsTable_allocate_data */
+
+/*
+ * ipIfStatsTable_release_data
+ *
+ * Purpose: release ipIfStatsTable data.
+ */
+void
+ipIfStatsTable_release_data(ipIfStatsTable_data * data)
+{
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsTable_release_data",
+ "called\n"));
+
+ /*
+ * TODO:202:r: |-> release memory for the ipIfStatsTable data context.
+ */
+ free(data);
+} /* ipIfStatsTable_release_data */
+
+
+
+/**
+ * set mib index(es)
+ *
+ * @param tbl_idx mib index structure
+ * @param ipIfStatsIPVersion_val
+ * @param ipIfStatsIfIndex_val
+ *
+ * @retval MFD_SUCCESS : success.
+ * @retval MFD_ERROR : other error.
+ *
+ * @remark
+ * This convenience function is useful for setting all the MIB index
+ * components with a single function call. It is assume that the C values
+ * have already been mapped from their native/rawformat to the MIB format.
+ */
+int
+ipIfStatsTable_indexes_set_tbl_idx(ipIfStatsTable_mib_index * tbl_idx,
+ u_long ipIfStatsIPVersion_val,
+ long ipIfStatsIfIndex_val)
+{
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsTable_indexes_set_tbl_idx", "called\n"));
+
+ /*
+ * ipIfStatsIPVersion(1)/InetVersion/ASN_INTEGER/long(u_long)//l/a/w/E/r/d/h
+ */
+ /** WARNING: this code might not work for netsnmp_ifstats_entry */
+ tbl_idx->ipIfStatsIPVersion = ipIfStatsIPVersion_val;
+
+ /*
+ * ipIfStatsIfIndex(2)/InterfaceIndex/ASN_INTEGER/long(long)//l/a/w/e/R/d/H
+ */
+ /** WARNING: this code might not work for netsnmp_ifstats_entry */
+ tbl_idx->ipIfStatsIfIndex = ipIfStatsIfIndex_val;
+
+
+ return MFD_SUCCESS;
+} /* ipIfStatsTable_indexes_set_tbl_idx */
+
+/**
+ * @internal
+ * set row context indexes
+ *
+ * @param reqreq_ctx the row context that needs updated indexes
+ *
+ * @retval MFD_SUCCESS : success.
+ * @retval MFD_ERROR : other error.
+ *
+ * @remark
+ * This function sets the mib indexs, then updates the oid indexs
+ * from the mib index.
+ */
+int
+ipIfStatsTable_indexes_set(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long ipIfStatsIPVersion_val,
+ long ipIfStatsIfIndex_val)
+{
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsTable_indexes_set",
+ "called\n"));
+
+ if (MFD_SUCCESS !=
+ ipIfStatsTable_indexes_set_tbl_idx(&rowreq_ctx->tbl_idx,
+ ipIfStatsIPVersion_val,
+ ipIfStatsIfIndex_val))
+ return MFD_ERROR;
+
+ /*
+ * convert mib index to oid index
+ */
+ rowreq_ctx->oid_idx.len = sizeof(rowreq_ctx->oid_tmp) / sizeof(oid);
+ if (0 != ipIfStatsTable_index_to_oid(&rowreq_ctx->oid_idx,
+ &rowreq_ctx->tbl_idx)) {
+ return MFD_ERROR;
+ }
+
+ return MFD_SUCCESS;
+} /* ipIfStatsTable_indexes_set */
+
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsInReceives
+ * ipIfStatsInReceives is subid 3 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.3
+ * Description:
+The total number of input IP datagrams received, including
+ those received in error.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER (based on perltype COUNTER)
+ * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsInReceives data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsInReceives_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsInReceives_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsInReceives_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsInReceives_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsInReceives_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsInReceives data.
+ * copy (* ipIfStatsInReceives_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINRECEIVES])
+ return MFD_SKIP;
+
+ (*ipIfStatsInReceives_val_ptr) =
+ rowreq_ctx->data->stats.HCInReceives.low;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsInReceives_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsHCInReceives
+ * ipIfStatsHCInReceives is subid 4 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.4
+ * Description:
+The total number of input IP datagrams received, including
+ those received in error. This object counts the same
+ datagrams as ipIfStatsInReceives, but allows for larger
+ values.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER64 (based on perltype COUNTER64)
+ * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64)
+ */
+/**
+ * Extract the current value of the ipIfStatsHCInReceives data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsHCInReceives_val_ptr
+ * Pointer to storage for a U64 variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsHCInReceives_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ U64 * ipIfStatsHCInReceives_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsHCInReceives_val_ptr);
+
+ /*
+ * TODO:231:o: |-> copy ipIfStatsHCInReceives data.
+ * get (* ipIfStatsHCInReceives_val_ptr ).low and (* ipIfStatsHCInReceives_val_ptr ).high from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINRECEIVES])
+ return MFD_SKIP;
+
+ (*ipIfStatsHCInReceives_val_ptr).low =
+ rowreq_ctx->data->stats.HCInReceives.low;
+ (*ipIfStatsHCInReceives_val_ptr).high =
+ rowreq_ctx->data->stats.HCInReceives.high;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsHCInReceives_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsInOctets
+ * ipIfStatsInOctets is subid 5 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.5
+ * Description:
+The total number of octets received in input IP datagrams,
+ including those received in error. Octets from datagrams
+ counted in ipIfStatsInReceives MUST be counted here.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER (based on perltype COUNTER)
+ * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsInOctets data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsInOctets_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsInOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsInOctets_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsInOctets_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsInOctets_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsInOctets data.
+ * copy (* ipIfStatsInOctets_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINOCTETS])
+ return MFD_SKIP;
+
+ (*ipIfStatsInOctets_val_ptr) =
+ rowreq_ctx->data->stats.HCInOctets.low;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsInOctets_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsHCInOctets
+ * ipIfStatsHCInOctets is subid 6 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.6
+ * Description:
+The total number of octets received in input IP datagrams,
+ including those received in error. This object counts the
+ same octets as ipIfStatsInOctets, but allows for larger
+ values.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER64 (based on perltype COUNTER64)
+ * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64)
+ */
+/**
+ * Extract the current value of the ipIfStatsHCInOctets data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsHCInOctets_val_ptr
+ * Pointer to storage for a U64 variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsHCInOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ U64 * ipIfStatsHCInOctets_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsHCInOctets_val_ptr);
+
+ /*
+ * TODO:231:o: |-> copy ipIfStatsHCInOctets data.
+ * get (* ipIfStatsHCInOctets_val_ptr ).low and (* ipIfStatsHCInOctets_val_ptr ).high from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINOCTETS])
+ return MFD_SKIP;
+
+ (*ipIfStatsHCInOctets_val_ptr).low =
+ rowreq_ctx->data->stats.HCInOctets.low;
+ (*ipIfStatsHCInOctets_val_ptr).high =
+ rowreq_ctx->data->stats.HCInOctets.high;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsHCInOctets_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsInHdrErrors
+ * ipIfStatsInHdrErrors is subid 7 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.7
+ * Description:
+The number of input IP datagrams discarded due to errors in
+ their IP headers, including version number mismatch, other
+ format errors, hop count exceeded, errors discovered in
+ processing their IP options, etc.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER (based on perltype COUNTER)
+ * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsInHdrErrors data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsInHdrErrors_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsInHdrErrors_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsInHdrErrors_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsInHdrErrors_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsInHdrErrors_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsInHdrErrors data.
+ * copy (* ipIfStatsInHdrErrors_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_INHDRERRORS])
+ return MFD_SKIP;
+
+ (*ipIfStatsInHdrErrors_val_ptr) =
+ rowreq_ctx->data->stats.InHdrErrors;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsInHdrErrors_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsInNoRoutes
+ * ipIfStatsInNoRoutes is subid 8 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.8
+ * Description:
+The number of input IP datagrams discarded because no route
+ could be found to transmit them to their destination.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER (based on perltype COUNTER)
+ * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsInNoRoutes data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsInNoRoutes_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsInNoRoutes_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsInNoRoutes_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsInNoRoutes_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsInNoRoutes_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsInNoRoutes data.
+ * copy (* ipIfStatsInNoRoutes_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINNOROUTES])
+ return MFD_SKIP;
+
+ (*ipIfStatsInNoRoutes_val_ptr) =
+ rowreq_ctx->data->stats.HCInNoRoutes.low;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsInNoRoutes_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsInAddrErrors
+ * ipIfStatsInAddrErrors is subid 9 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.9
+ * Description:
+The number of input IP datagrams discarded because the IP
+ address in their IP header's destination field was not a
+ valid address to be received at this entity. This count
+ includes invalid addresses (e.g., ::0). For entities that
+ are not IP routers and therefore do not forward datagrams,
+ this counter includes datagrams discarded because the
+ destination address was not a local address.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER (based on perltype COUNTER)
+ * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsInAddrErrors data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsInAddrErrors_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsInAddrErrors_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsInAddrErrors_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsInAddrErrors_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsInAddrErrors_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsInAddrErrors data.
+ * copy (* ipIfStatsInAddrErrors_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_INADDRERRORS])
+ return MFD_SKIP;
+
+ (*ipIfStatsInAddrErrors_val_ptr) =
+ rowreq_ctx->data->stats.InAddrErrors;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsInAddrErrors_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsInUnknownProtos
+ * ipIfStatsInUnknownProtos is subid 10 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.10
+ * Description:
+The number of locally-addressed IP datagrams received
+ successfully but discarded because of an unknown or
+ unsupported protocol.
+
+ When tracking interface statistics, the counter of the
+ interface to which these datagrams were addressed is
+ incremented. This interface might not be the same as the
+ input interface for some of the datagrams.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+
+
+
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER (based on perltype COUNTER)
+ * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsInUnknownProtos data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsInUnknownProtos_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsInUnknownProtos_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsInUnknownProtos_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsInUnknownProtos_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsInUnknownProtos_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsInUnknownProtos data.
+ * copy (* ipIfStatsInUnknownProtos_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_INUNKNOWNPROTOS])
+ return MFD_SKIP;
+
+ (*ipIfStatsInUnknownProtos_val_ptr) =
+ rowreq_ctx->data->stats.InUnknownProtos;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsInUnknownProtos_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsInTruncatedPkts
+ * ipIfStatsInTruncatedPkts is subid 11 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.11
+ * Description:
+The number of input IP datagrams discarded because the
+ datagram frame didn't carry enough data.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER (based on perltype COUNTER)
+ * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsInTruncatedPkts data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsInTruncatedPkts_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsInTruncatedPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsInTruncatedPkts_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsInTruncatedPkts_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsInTruncatedPkts_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsInTruncatedPkts data.
+ * copy (* ipIfStatsInTruncatedPkts_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_INTRUNCATEDPKTS])
+ return MFD_SKIP;
+
+ (*ipIfStatsInTruncatedPkts_val_ptr) =
+ rowreq_ctx->data->stats.InTruncatedPkts;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsInTruncatedPkts_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsInForwDatagrams
+ * ipIfStatsInForwDatagrams is subid 12 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.12
+ * Description:
+The number of input datagrams for which this entity was not
+ their final IP destination and for which this entity
+ attempted to find a route to forward them to that final
+ destination. In entities that do not act as IP routers,
+ this counter will include only those datagrams that were
+ Source-Routed via this entity, and the Source-Route
+ processing was successful.
+
+ When tracking interface statistics, the counter of the
+ incoming interface is incremented for each datagram.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER (based on perltype COUNTER)
+ * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsInForwDatagrams data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsInForwDatagrams_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsInForwDatagrams_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsInForwDatagrams_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsInForwDatagrams_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsInForwDatagrams_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsInForwDatagrams data.
+ * copy (* ipIfStatsInForwDatagrams_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINFORWDATAGRAMS])
+ return MFD_SKIP;
+
+ (*ipIfStatsInForwDatagrams_val_ptr) =
+ rowreq_ctx->data->stats.HCInForwDatagrams.low;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsInForwDatagrams_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsHCInForwDatagrams
+ * ipIfStatsHCInForwDatagrams is subid 13 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.13
+ * Description:
+The number of input datagrams for which this entity was not
+ their final IP destination and for which this entity
+ attempted to find a route to forward them to that final
+ destination. This object counts the same packets as
+
+
+
+ ipIfStatsInForwDatagrams, but allows for larger values.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER64 (based on perltype COUNTER64)
+ * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64)
+ */
+/**
+ * Extract the current value of the ipIfStatsHCInForwDatagrams data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsHCInForwDatagrams_val_ptr
+ * Pointer to storage for a U64 variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsHCInForwDatagrams_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ U64 * ipIfStatsHCInForwDatagrams_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsHCInForwDatagrams_val_ptr);
+
+ /*
+ * TODO:231:o: |-> copy ipIfStatsHCInForwDatagrams data.
+ * get (* ipIfStatsHCInForwDatagrams_val_ptr ).low and (* ipIfStatsHCInForwDatagrams_val_ptr ).high from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINFORWDATAGRAMS])
+ return MFD_SKIP;
+
+ (*ipIfStatsHCInForwDatagrams_val_ptr).low =
+ rowreq_ctx->data->stats.HCInForwDatagrams.low;
+ (*ipIfStatsHCInForwDatagrams_val_ptr).high =
+ rowreq_ctx->data->stats.HCInForwDatagrams.high;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsHCInForwDatagrams_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsReasmReqds
+ * ipIfStatsReasmReqds is subid 14 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.14
+ * Description:
+The number of IP fragments received that needed to be
+ reassembled at this interface.
+
+ When tracking interface statistics, the counter of the
+ interface to which these fragments were addressed is
+ incremented. This interface might not be the same as the
+ input interface for some of the fragments.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER (based on perltype COUNTER)
+ * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsReasmReqds data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsReasmReqds_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsReasmReqds_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsReasmReqds_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsReasmReqds_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsReasmReqds_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsReasmReqds data.
+ * copy (* ipIfStatsReasmReqds_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_REASMREQDS])
+ return MFD_SKIP;
+
+ (*ipIfStatsReasmReqds_val_ptr) =
+ rowreq_ctx->data->stats.ReasmReqds;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsReasmReqds_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsReasmOKs
+ * ipIfStatsReasmOKs is subid 15 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.15
+ * Description:
+The number of IP datagrams successfully reassembled.
+
+ When tracking interface statistics, the counter of the
+ interface to which these datagrams were addressed is
+ incremented. This interface might not be the same as the
+ input interface for some of the datagrams.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER (based on perltype COUNTER)
+ * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsReasmOKs data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsReasmOKs_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsReasmOKs_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsReasmOKs_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsReasmOKs_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsReasmOKs_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsReasmOKs data.
+ * copy (* ipIfStatsReasmOKs_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_REASMOKS])
+ return MFD_SKIP;
+
+ (*ipIfStatsReasmOKs_val_ptr) =
+ rowreq_ctx->data->stats.ReasmOKs;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsReasmOKs_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsReasmFails
+ * ipIfStatsReasmFails is subid 16 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.16
+ * Description:
+The number of failures detected by the IP re-assembly
+ algorithm (for whatever reason: timed out, errors, etc.).
+ Note that this is not necessarily a count of discarded IP
+ fragments since some algorithms (notably the algorithm in
+ RFC 815) can lose track of the number of fragments by
+ combining them as they are received.
+
+ When tracking interface statistics, the counter of the
+ interface to which these fragments were addressed is
+ incremented. This interface might not be the same as the
+ input interface for some of the fragments.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER (based on perltype COUNTER)
+ * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsReasmFails data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsReasmFails_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsReasmFails_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsReasmFails_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsReasmFails_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsReasmFails_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsReasmFails data.
+ * copy (* ipIfStatsReasmFails_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_REASMFAILS])
+ return MFD_SKIP;
+
+ (*ipIfStatsReasmFails_val_ptr) =
+ rowreq_ctx->data->stats.ReasmFails;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsReasmFails_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsInDiscards
+ * ipIfStatsInDiscards is subid 17 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.17
+ * Description:
+The number of input IP datagrams for which no problems were
+ encountered to prevent their continued processing, but
+ were discarded (e.g., for lack of buffer space). Note that
+ this counter does not include any datagrams discarded while
+ awaiting re-assembly.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER (based on perltype COUNTER)
+ * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsInDiscards data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsInDiscards_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsInDiscards_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsInDiscards_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsInDiscards_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsInDiscards_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsInDiscards data.
+ * copy (* ipIfStatsInDiscards_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_INDISCARDS])
+ return MFD_SKIP;
+
+ (*ipIfStatsInDiscards_val_ptr) =
+ rowreq_ctx->data->stats.InDiscards;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsInDiscards_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsInDelivers
+ * ipIfStatsInDelivers is subid 18 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.18
+ * Description:
+The total number of datagrams successfully delivered to IP
+ user-protocols (including ICMP).
+
+ When tracking interface statistics, the counter of the
+ interface to which these datagrams were addressed is
+ incremented. This interface might not be the same as the
+
+
+
+ input interface for some of the datagrams.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER (based on perltype COUNTER)
+ * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsInDelivers data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsInDelivers_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsInDelivers_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsInDelivers_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsInDelivers_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsInDelivers_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsInDelivers data.
+ * copy (* ipIfStatsInDelivers_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINDELIVERS])
+ return MFD_SKIP;
+
+ (*ipIfStatsInDelivers_val_ptr) =
+ rowreq_ctx->data->stats.HCInDelivers.low;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsInDelivers_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsHCInDelivers
+ * ipIfStatsHCInDelivers is subid 19 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.19
+ * Description:
+The total number of datagrams successfully delivered to IP
+ user-protocols (including ICMP). This object counts the
+ same packets as ipIfStatsInDelivers, but allows for larger
+ values.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER64 (based on perltype COUNTER64)
+ * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64)
+ */
+/**
+ * Extract the current value of the ipIfStatsHCInDelivers data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsHCInDelivers_val_ptr
+ * Pointer to storage for a U64 variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsHCInDelivers_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ U64 * ipIfStatsHCInDelivers_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsHCInDelivers_val_ptr);
+
+ /*
+ * TODO:231:o: |-> copy ipIfStatsHCInDelivers data.
+ * get (* ipIfStatsHCInDelivers_val_ptr ).low and (* ipIfStatsHCInDelivers_val_ptr ).high from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINDELIVERS])
+ return MFD_SKIP;
+
+ (*ipIfStatsHCInDelivers_val_ptr).low =
+ rowreq_ctx->data->stats.HCInDelivers.low;
+ (*ipIfStatsHCInDelivers_val_ptr).high =
+ rowreq_ctx->data->stats.HCInDelivers.high;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsHCInDelivers_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsOutRequests
+ * ipIfStatsOutRequests is subid 20 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.20
+ * Description:
+The total number of IP datagrams that local IP user-
+ protocols (including ICMP) supplied to IP in requests for
+ transmission. Note that this counter does not include any
+ datagrams counted in ipIfStatsOutForwDatagrams.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER (based on perltype COUNTER)
+ * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsOutRequests data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsOutRequests_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsOutRequests_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsOutRequests_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsOutRequests_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsOutRequests_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsOutRequests data.
+ * copy (* ipIfStatsOutRequests_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTREQUESTS])
+ return MFD_SKIP;
+
+ (*ipIfStatsOutRequests_val_ptr) =
+ rowreq_ctx->data->stats.HCOutRequests.low;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsOutRequests_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsHCOutRequests
+ * ipIfStatsHCOutRequests is subid 21 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.21
+ * Description:
+The total number of IP datagrams that local IP user-
+ protocols (including ICMP) supplied to IP in requests for
+ transmission. This object counts the same packets as
+
+
+
+ ipIfStatsOutRequests, but allows for larger values.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER64 (based on perltype COUNTER64)
+ * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64)
+ */
+/**
+ * Extract the current value of the ipIfStatsHCOutRequests data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsHCOutRequests_val_ptr
+ * Pointer to storage for a U64 variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsHCOutRequests_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ U64 * ipIfStatsHCOutRequests_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsHCOutRequests_val_ptr);
+
+ /*
+ * TODO:231:o: |-> copy ipIfStatsHCOutRequests data.
+ * get (* ipIfStatsHCOutRequests_val_ptr ).low and (* ipIfStatsHCOutRequests_val_ptr ).high from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTREQUESTS])
+ return MFD_SKIP;
+
+ (*ipIfStatsHCOutRequests_val_ptr).low =
+ rowreq_ctx->data->stats.HCOutRequests.low;
+ (*ipIfStatsHCOutRequests_val_ptr).high =
+ rowreq_ctx->data->stats.HCOutRequests.high;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsHCOutRequests_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsOutForwDatagrams
+ * ipIfStatsOutForwDatagrams is subid 23 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.23
+ * Description:
+The number of datagrams for which this entity was not their
+ final IP destination and for which it was successful in
+ finding a path to their final destination. In entities
+ that do not act as IP routers, this counter will include
+ only those datagrams that were Source-Routed via this
+ entity, and the Source-Route processing was successful.
+
+ When tracking interface statistics, the counter of the
+ outgoing interface is incremented for a successfully
+ forwarded datagram.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER (based on perltype COUNTER)
+ * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsOutForwDatagrams data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsOutForwDatagrams_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsOutForwDatagrams_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsOutForwDatagrams_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsOutForwDatagrams_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsOutForwDatagrams_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsOutForwDatagrams data.
+ * copy (* ipIfStatsOutForwDatagrams_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFORWDATAGRAMS])
+ return MFD_SKIP;
+
+ (*ipIfStatsOutForwDatagrams_val_ptr) =
+ rowreq_ctx->data->stats.HCOutForwDatagrams.low;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsOutForwDatagrams_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsHCOutForwDatagrams
+ * ipIfStatsHCOutForwDatagrams is subid 24 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.24
+ * Description:
+The number of datagrams for which this entity was not their
+ final IP destination and for which it was successful in
+ finding a path to their final destination. This object
+ counts the same packets as ipIfStatsOutForwDatagrams, but
+ allows for larger values.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+
+
+
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER64 (based on perltype COUNTER64)
+ * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64)
+ */
+/**
+ * Extract the current value of the ipIfStatsHCOutForwDatagrams data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsHCOutForwDatagrams_val_ptr
+ * Pointer to storage for a U64 variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsHCOutForwDatagrams_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ U64 * ipIfStatsHCOutForwDatagrams_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsHCOutForwDatagrams_val_ptr);
+
+ /*
+ * TODO:231:o: |-> copy ipIfStatsHCOutForwDatagrams data.
+ * get (* ipIfStatsHCOutForwDatagrams_val_ptr ).low and (* ipIfStatsHCOutForwDatagrams_val_ptr ).high from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFORWDATAGRAMS])
+ return MFD_SKIP;
+
+ (*ipIfStatsHCOutForwDatagrams_val_ptr).low =
+ rowreq_ctx->data->stats.HCOutForwDatagrams.low;
+ (*ipIfStatsHCOutForwDatagrams_val_ptr).high =
+ rowreq_ctx->data->stats.HCOutForwDatagrams.high;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsHCOutForwDatagrams_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsOutDiscards
+ * ipIfStatsOutDiscards is subid 25 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.25
+ * Description:
+The number of output IP datagrams for which no problem was
+ encountered to prevent their transmission to their
+ destination, but were discarded (e.g., for lack of
+ buffer space). Note that this counter would include
+ datagrams counted in ipIfStatsOutForwDatagrams if any such
+ datagrams met this (discretionary) discard criterion.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER (based on perltype COUNTER)
+ * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsOutDiscards data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsOutDiscards_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsOutDiscards_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsOutDiscards_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsOutDiscards_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsOutDiscards_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsOutDiscards data.
+ * copy (* ipIfStatsOutDiscards_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTDISCARDS])
+ return MFD_SKIP;
+
+ (*ipIfStatsOutDiscards_val_ptr) =
+ rowreq_ctx->data->stats.HCOutDiscards.low;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsOutDiscards_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsOutFragReqds
+ * ipIfStatsOutFragReqds is subid 26 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.26
+ * Description:
+The number of IP datagrams that would require fragmentation
+ in order to be transmitted.
+
+ When tracking interface statistics, the counter of the
+ outgoing interface is incremented for a successfully
+ fragmented datagram.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER (based on perltype COUNTER)
+ * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsOutFragReqds data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsOutFragReqds_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsOutFragReqds_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsOutFragReqds_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsOutFragReqds_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsOutFragReqds_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsOutFragReqds data.
+ * copy (* ipIfStatsOutFragReqds_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGREQDS])
+ return MFD_SKIP;
+
+ (*ipIfStatsOutFragReqds_val_ptr) =
+ rowreq_ctx->data->stats.HCOutFragReqds.low;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsOutFragReqds_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsOutFragOKs
+ * ipIfStatsOutFragOKs is subid 27 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.27
+ * Description:
+The number of IP datagrams that have been successfully
+ fragmented.
+
+ When tracking interface statistics, the counter of the
+
+
+
+ outgoing interface is incremented for a successfully
+ fragmented datagram.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER (based on perltype COUNTER)
+ * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsOutFragOKs data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsOutFragOKs_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsOutFragOKs_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsOutFragOKs_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsOutFragOKs_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsOutFragOKs_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsOutFragOKs data.
+ * copy (* ipIfStatsOutFragOKs_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGOKS])
+ return MFD_SKIP;
+
+ (*ipIfStatsOutFragOKs_val_ptr) =
+ rowreq_ctx->data->stats.HCOutFragOKs.low;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsOutFragOKs_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsOutFragFails
+ * ipIfStatsOutFragFails is subid 28 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.28
+ * Description:
+The number of IP datagrams that have been discarded because
+ they needed to be fragmented but could not be. This
+ includes IPv4 packets that have the DF bit set and IPv6
+ packets that are being forwarded and exceed the outgoing
+ link MTU.
+
+ When tracking interface statistics, the counter of the
+ outgoing interface is incremented for an unsuccessfully
+ fragmented datagram.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER (based on perltype COUNTER)
+ * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsOutFragFails data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsOutFragFails_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsOutFragFails_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsOutFragFails_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsOutFragFails_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsOutFragFails_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsOutFragFails data.
+ * copy (* ipIfStatsOutFragFails_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGFAILS])
+ return MFD_SKIP;
+
+ (*ipIfStatsOutFragFails_val_ptr) =
+ rowreq_ctx->data->stats.HCOutFragFails.low;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsOutFragFails_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsOutFragCreates
+ * ipIfStatsOutFragCreates is subid 29 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.29
+ * Description:
+The number of output datagram fragments that have been
+ generated as a result of IP fragmentation.
+
+ When tracking interface statistics, the counter of the
+ outgoing interface is incremented for a successfully
+ fragmented datagram.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER (based on perltype COUNTER)
+ * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsOutFragCreates data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsOutFragCreates_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsOutFragCreates_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsOutFragCreates_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsOutFragCreates_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsOutFragCreates_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsOutFragCreates data.
+ * copy (* ipIfStatsOutFragCreates_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGCREATES])
+ return MFD_SKIP;
+
+ (*ipIfStatsOutFragCreates_val_ptr) =
+ rowreq_ctx->data->stats.HCOutFragCreates.low;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsOutFragCreates_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsOutTransmits
+ * ipIfStatsOutTransmits is subid 30 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.30
+ * Description:
+The total number of IP datagrams that this entity supplied
+ to the lower layers for transmission. This includes
+ datagrams generated locally and those forwarded by this
+ entity.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER (based on perltype COUNTER)
+ * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsOutTransmits data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsOutTransmits_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsOutTransmits_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsOutTransmits_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsOutTransmits_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsOutTransmits_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsOutTransmits data.
+ * copy (* ipIfStatsOutTransmits_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTTRANSMITS])
+ return MFD_SKIP;
+
+ (*ipIfStatsOutTransmits_val_ptr) =
+ rowreq_ctx->data->stats.HCOutTransmits.low;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsOutTransmits_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsHCOutTransmits
+ * ipIfStatsHCOutTransmits is subid 31 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.31
+ * Description:
+The total number of IP datagrams that this entity supplied
+ to the lower layers for transmission. This object counts
+ the same datagrams as ipIfStatsOutTransmits, but allows for
+ larger values.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER64 (based on perltype COUNTER64)
+ * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64)
+ */
+/**
+ * Extract the current value of the ipIfStatsHCOutTransmits data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsHCOutTransmits_val_ptr
+ * Pointer to storage for a U64 variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsHCOutTransmits_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ U64 * ipIfStatsHCOutTransmits_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsHCOutTransmits_val_ptr);
+
+ /*
+ * TODO:231:o: |-> copy ipIfStatsHCOutTransmits data.
+ * get (* ipIfStatsHCOutTransmits_val_ptr ).low and (* ipIfStatsHCOutTransmits_val_ptr ).high from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTTRANSMITS])
+ return MFD_SKIP;
+
+ (*ipIfStatsHCOutTransmits_val_ptr).low =
+ rowreq_ctx->data->stats.HCOutTransmits.low;
+ (*ipIfStatsHCOutTransmits_val_ptr).high =
+ rowreq_ctx->data->stats.HCOutTransmits.high;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsHCOutTransmits_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsOutOctets
+ * ipIfStatsOutOctets is subid 32 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.32
+ * Description:
+The total number of octets in IP datagrams delivered to the
+ lower layers for transmission. Octets from datagrams
+ counted in ipIfStatsOutTransmits MUST be counted here.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER (based on perltype COUNTER)
+ * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsOutOctets data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsOutOctets_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsOutOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsOutOctets_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsOutOctets_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsOutOctets_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsOutOctets data.
+ * copy (* ipIfStatsOutOctets_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTOCTETS])
+ return MFD_SKIP;
+
+ (*ipIfStatsOutOctets_val_ptr) =
+ rowreq_ctx->data->stats.HCOutOctets.low;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsOutOctets_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsHCOutOctets
+ * ipIfStatsHCOutOctets is subid 33 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.33
+ * Description:
+The total number of octets in IP datagrams delivered to the
+ lower layers for transmission. This objects counts the same
+ octets as ipIfStatsOutOctets, but allows for larger values.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER64 (based on perltype COUNTER64)
+ * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64)
+ */
+/**
+ * Extract the current value of the ipIfStatsHCOutOctets data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsHCOutOctets_val_ptr
+ * Pointer to storage for a U64 variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsHCOutOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ U64 * ipIfStatsHCOutOctets_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsHCOutOctets_val_ptr);
+
+ /*
+ * TODO:231:o: |-> copy ipIfStatsHCOutOctets data.
+ * get (* ipIfStatsHCOutOctets_val_ptr ).low and (* ipIfStatsHCOutOctets_val_ptr ).high from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTOCTETS])
+ return MFD_SKIP;
+
+ (*ipIfStatsHCOutOctets_val_ptr).low =
+ rowreq_ctx->data->stats.HCOutOctets.low;
+ (*ipIfStatsHCOutOctets_val_ptr).high =
+ rowreq_ctx->data->stats.HCOutOctets.high;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsHCOutOctets_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsInMcastPkts
+ * ipIfStatsInMcastPkts is subid 34 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.34
+ * Description:
+The number of IP multicast datagrams received.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER (based on perltype COUNTER)
+ * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsInMcastPkts data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsInMcastPkts_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsInMcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsInMcastPkts_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsInMcastPkts_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsInMcastPkts_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsInMcastPkts data.
+ * copy (* ipIfStatsInMcastPkts_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINMCASTPKTS])
+ return MFD_SKIP;
+
+ (*ipIfStatsInMcastPkts_val_ptr) =
+ rowreq_ctx->data->stats.HCInMcastPkts.low;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsInMcastPkts_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsHCInMcastPkts
+ * ipIfStatsHCInMcastPkts is subid 35 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.35
+ * Description:
+The number of IP multicast datagrams received. This object
+ counts the same datagrams as ipIfStatsInMcastPkts, but
+ allows for larger values.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER64 (based on perltype COUNTER64)
+ * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64)
+ */
+/**
+ * Extract the current value of the ipIfStatsHCInMcastPkts data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsHCInMcastPkts_val_ptr
+ * Pointer to storage for a U64 variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsHCInMcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ U64 * ipIfStatsHCInMcastPkts_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsHCInMcastPkts_val_ptr);
+
+ /*
+ * TODO:231:o: |-> copy ipIfStatsHCInMcastPkts data.
+ * get (* ipIfStatsHCInMcastPkts_val_ptr ).low and (* ipIfStatsHCInMcastPkts_val_ptr ).high from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINMCASTPKTS])
+ return MFD_SKIP;
+
+ (*ipIfStatsHCInMcastPkts_val_ptr).low =
+ rowreq_ctx->data->stats.HCInMcastPkts.low;
+ (*ipIfStatsHCInMcastPkts_val_ptr).high =
+ rowreq_ctx->data->stats.HCInMcastPkts.high;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsHCInMcastPkts_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsInMcastOctets
+ * ipIfStatsInMcastOctets is subid 36 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.36
+ * Description:
+The total number of octets received in IP multicast
+
+
+
+ datagrams. Octets from datagrams counted in
+ ipIfStatsInMcastPkts MUST be counted here.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER (based on perltype COUNTER)
+ * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsInMcastOctets data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsInMcastOctets_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsInMcastOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsInMcastOctets_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsInMcastOctets_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsInMcastOctets_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsInMcastOctets data.
+ * copy (* ipIfStatsInMcastOctets_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINMCASTOCTETS])
+ return MFD_SKIP;
+
+ (*ipIfStatsInMcastOctets_val_ptr) =
+ rowreq_ctx->data->stats.HCInMcastOctets.low;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsInMcastOctets_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsHCInMcastOctets
+ * ipIfStatsHCInMcastOctets is subid 37 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.37
+ * Description:
+The total number of octets received in IP multicast
+ datagrams. This object counts the same octets as
+ ipIfStatsInMcastOctets, but allows for larger values.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER64 (based on perltype COUNTER64)
+ * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64)
+ */
+/**
+ * Extract the current value of the ipIfStatsHCInMcastOctets data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsHCInMcastOctets_val_ptr
+ * Pointer to storage for a U64 variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsHCInMcastOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ U64 * ipIfStatsHCInMcastOctets_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsHCInMcastOctets_val_ptr);
+
+ /*
+ * TODO:231:o: |-> copy ipIfStatsHCInMcastOctets data.
+ * get (* ipIfStatsHCInMcastOctets_val_ptr ).low and (* ipIfStatsHCInMcastOctets_val_ptr ).high from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINMCASTOCTETS])
+ return MFD_SKIP;
+
+ (*ipIfStatsHCInMcastOctets_val_ptr).low =
+ rowreq_ctx->data->stats.HCInMcastOctets.low;
+ (*ipIfStatsHCInMcastOctets_val_ptr).high =
+ rowreq_ctx->data->stats.HCInMcastOctets.high;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsHCInMcastOctets_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsOutMcastPkts
+ * ipIfStatsOutMcastPkts is subid 38 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.38
+ * Description:
+The number of IP multicast datagrams transmitted.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER (based on perltype COUNTER)
+ * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsOutMcastPkts data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsOutMcastPkts_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsOutMcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsOutMcastPkts_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsOutMcastPkts_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsOutMcastPkts_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsOutMcastPkts data.
+ * copy (* ipIfStatsOutMcastPkts_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTMCASTPKTS])
+ return MFD_SKIP;
+
+ (*ipIfStatsOutMcastPkts_val_ptr) =
+ rowreq_ctx->data->stats.HCOutMcastPkts.low;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsOutMcastPkts_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsHCOutMcastPkts
+ * ipIfStatsHCOutMcastPkts is subid 39 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.39
+ * Description:
+The number of IP multicast datagrams transmitted. This
+ object counts the same datagrams as ipIfStatsOutMcastPkts,
+ but allows for larger values.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+
+
+
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER64 (based on perltype COUNTER64)
+ * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64)
+ */
+/**
+ * Extract the current value of the ipIfStatsHCOutMcastPkts data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsHCOutMcastPkts_val_ptr
+ * Pointer to storage for a U64 variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsHCOutMcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ U64 * ipIfStatsHCOutMcastPkts_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsHCOutMcastPkts_val_ptr);
+
+ /*
+ * TODO:231:o: |-> copy ipIfStatsHCOutMcastPkts data.
+ * get (* ipIfStatsHCOutMcastPkts_val_ptr ).low and (* ipIfStatsHCOutMcastPkts_val_ptr ).high from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTMCASTPKTS])
+ return MFD_SKIP;
+
+ (*ipIfStatsHCOutMcastPkts_val_ptr).low =
+ rowreq_ctx->data->stats.HCOutMcastPkts.low;
+ (*ipIfStatsHCOutMcastPkts_val_ptr).high =
+ rowreq_ctx->data->stats.HCOutMcastPkts.high;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsHCOutMcastPkts_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsOutMcastOctets
+ * ipIfStatsOutMcastOctets is subid 40 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.40
+ * Description:
+The total number of octets transmitted in IP multicast
+ datagrams. Octets from datagrams counted in
+ ipIfStatsOutMcastPkts MUST be counted here.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER (based on perltype COUNTER)
+ * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsOutMcastOctets data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsOutMcastOctets_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsOutMcastOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsOutMcastOctets_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsOutMcastOctets_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsOutMcastOctets_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsOutMcastOctets data.
+ * copy (* ipIfStatsOutMcastOctets_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTMCASTOCTETS])
+ return MFD_SKIP;
+
+ (*ipIfStatsOutMcastOctets_val_ptr) =
+ rowreq_ctx->data->stats.HCOutMcastOctets.low;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsOutMcastOctets_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsHCOutMcastOctets
+ * ipIfStatsHCOutMcastOctets is subid 41 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.41
+ * Description:
+The total number of octets transmitted in IP multicast
+ datagrams. This object counts the same octets as
+ ipIfStatsOutMcastOctets, but allows for larger values.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER64 (based on perltype COUNTER64)
+ * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64)
+ */
+/**
+ * Extract the current value of the ipIfStatsHCOutMcastOctets data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsHCOutMcastOctets_val_ptr
+ * Pointer to storage for a U64 variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsHCOutMcastOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ U64 * ipIfStatsHCOutMcastOctets_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsHCOutMcastOctets_val_ptr);
+
+ /*
+ * TODO:231:o: |-> copy ipIfStatsHCOutMcastOctets data.
+ * get (* ipIfStatsHCOutMcastOctets_val_ptr ).low and (* ipIfStatsHCOutMcastOctets_val_ptr ).high from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTMCASTOCTETS])
+ return MFD_SKIP;
+
+ (*ipIfStatsHCOutMcastOctets_val_ptr).low =
+ rowreq_ctx->data->stats.HCOutMcastOctets.low;
+ (*ipIfStatsHCOutMcastOctets_val_ptr).high =
+ rowreq_ctx->data->stats.HCOutMcastOctets.high;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsHCOutMcastOctets_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsInBcastPkts
+ * ipIfStatsInBcastPkts is subid 42 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.42
+ * Description:
+The number of IP broadcast datagrams received.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER (based on perltype COUNTER)
+ * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsInBcastPkts data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsInBcastPkts_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsInBcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsInBcastPkts_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsInBcastPkts_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsInBcastPkts_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsInBcastPkts data.
+ * copy (* ipIfStatsInBcastPkts_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINBCASTPKTS])
+ return MFD_SKIP;
+
+ (*ipIfStatsInBcastPkts_val_ptr) =
+ rowreq_ctx->data->stats.HCInBcastPkts.low;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsInBcastPkts_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsHCInBcastPkts
+ * ipIfStatsHCInBcastPkts is subid 43 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.43
+ * Description:
+The number of IP broadcast datagrams received. This object
+ counts the same datagrams as ipIfStatsInBcastPkts, but
+ allows for larger values.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER64 (based on perltype COUNTER64)
+ * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64)
+ */
+/**
+ * Extract the current value of the ipIfStatsHCInBcastPkts data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsHCInBcastPkts_val_ptr
+ * Pointer to storage for a U64 variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsHCInBcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ U64 * ipIfStatsHCInBcastPkts_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsHCInBcastPkts_val_ptr);
+
+ /*
+ * TODO:231:o: |-> copy ipIfStatsHCInBcastPkts data.
+ * get (* ipIfStatsHCInBcastPkts_val_ptr ).low and (* ipIfStatsHCInBcastPkts_val_ptr ).high from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINBCASTPKTS])
+ return MFD_SKIP;
+
+ (*ipIfStatsHCInBcastPkts_val_ptr).low =
+ rowreq_ctx->data->stats.HCInBcastPkts.low;
+ (*ipIfStatsHCInBcastPkts_val_ptr).high =
+ rowreq_ctx->data->stats.HCInBcastPkts.high;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsHCInBcastPkts_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsOutBcastPkts
+ * ipIfStatsOutBcastPkts is subid 44 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.44
+ * Description:
+The number of IP broadcast datagrams transmitted.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER (based on perltype COUNTER)
+ * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsOutBcastPkts data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsOutBcastPkts_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsOutBcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsOutBcastPkts_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsOutBcastPkts_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsOutBcastPkts_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsOutBcastPkts data.
+ * copy (* ipIfStatsOutBcastPkts_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTBCASTPKTS])
+ return MFD_SKIP;
+
+ (*ipIfStatsOutBcastPkts_val_ptr) =
+ rowreq_ctx->data->stats.HCOutBcastPkts.low;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsOutBcastPkts_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsHCOutBcastPkts
+ * ipIfStatsHCOutBcastPkts is subid 45 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.45
+ * Description:
+The number of IP broadcast datagrams transmitted. This
+ object counts the same datagrams as ipIfStatsOutBcastPkts,
+ but allows for larger values.
+
+ Discontinuities in the value of this counter can occur at
+ re-initialization of the management system, and at other
+ times as indicated by the value of
+ ipIfStatsDiscontinuityTime.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is COUNTER64 (based on perltype COUNTER64)
+ * The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64)
+ */
+/**
+ * Extract the current value of the ipIfStatsHCOutBcastPkts data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsHCOutBcastPkts_val_ptr
+ * Pointer to storage for a U64 variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsHCOutBcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ U64 * ipIfStatsHCOutBcastPkts_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsHCOutBcastPkts_val_ptr);
+
+ /*
+ * TODO:231:o: |-> copy ipIfStatsHCOutBcastPkts data.
+ * get (* ipIfStatsHCOutBcastPkts_val_ptr ).low and (* ipIfStatsHCOutBcastPkts_val_ptr ).high from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTBCASTPKTS])
+ return MFD_SKIP;
+
+ (*ipIfStatsHCOutBcastPkts_val_ptr).low =
+ rowreq_ctx->data->stats.HCOutBcastPkts.low;
+ (*ipIfStatsHCOutBcastPkts_val_ptr).high =
+ rowreq_ctx->data->stats.HCOutBcastPkts.high;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsHCOutBcastPkts_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsDiscontinuityTime
+ * ipIfStatsDiscontinuityTime is subid 46 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.46
+ * Description:
+The value of sysUpTime on the most recent occasion at which
+
+
+
+ any one or more of this entry's counters suffered a
+ discontinuity.
+
+ If no such discontinuities have occurred since the last re-
+ initialization of the local management subsystem, then this
+ object contains a zero value.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is TimeStamp (based on perltype TICKS)
+ * The net-snmp type is ASN_TIMETICKS. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsDiscontinuityTime data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsDiscontinuityTime_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsDiscontinuityTime_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsDiscontinuityTime_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsDiscontinuityTime_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsDiscontinuityTime_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsDiscontinuityTime data.
+ * copy (* ipIfStatsDiscontinuityTime_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_DISCONTINUITYTIME])
+ return MFD_SKIP;
+
+ (*ipIfStatsDiscontinuityTime_val_ptr) =
+ rowreq_ctx->ipIfStatsDiscontinuityTime;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsDiscontinuityTime_get */
+
+/*---------------------------------------------------------------------
+ * IP-MIB::ipIfStatsEntry.ipIfStatsRefreshRate
+ * ipIfStatsRefreshRate is subid 47 of ipIfStatsEntry.
+ * Its status is Current, and its access level is ReadOnly.
+ * OID: .1.3.6.1.2.1.4.31.3.1.47
+ * Description:
+The minimum reasonable polling interval for this entry.
+ This object provides an indication of the minimum amount of
+ time required to update the counters in this entry.
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is UNSIGNED32 (based on perltype UNSIGNED32)
+ * The net-snmp type is ASN_UNSIGNED. The C type decl is u_long (u_long)
+ */
+/**
+ * Extract the current value of the ipIfStatsRefreshRate data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param ipIfStatsRefreshRate_val_ptr
+ * Pointer to storage for a u_long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+ipIfStatsRefreshRate_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ u_long * ipIfStatsRefreshRate_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != ipIfStatsRefreshRate_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsRefreshRate_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the ipIfStatsRefreshRate data.
+ * copy (* ipIfStatsRefreshRate_val_ptr ) from rowreq_ctx->data
+ */
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_REFRESHRATE])
+ return MFD_SKIP;
+
+ (*ipIfStatsRefreshRate_val_ptr) =
+ rowreq_ctx->ipIfStatsRefreshRate;
+
+ return MFD_SUCCESS;
+} /* ipIfStatsRefreshRate_get */
+
+
+
+/** @} */
diff --git a/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.h b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.h
new file mode 100644
index 0000000..0cc7e47
--- /dev/null
+++ b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.h
@@ -0,0 +1,246 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 12088 $ of $
+ *
+ * $Id:$
+ *
+ * @file ipIfStatsTable_data_get.h
+ *
+ * @addtogroup get
+ *
+ * Prototypes for get functions
+ *
+ * @{
+ */
+#ifndef IPIFSTATSTABLE_DATA_GET_H
+#define IPIFSTATSTABLE_DATA_GET_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /*
+ *********************************************************************
+ * GET function declarations
+ */
+
+ /*
+ *********************************************************************
+ * GET Table declarations
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table ipIfStatsTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+ /*
+ * IP-MIB::ipIfStatsTable is subid 3 of ipTrafficStats.
+ * Its status is Current.
+ * OID: .1.3.6.1.2.1.4.31.3, length: 9
+ */
+ /*
+ * indexes
+ */
+
+ int ipIfStatsInReceives_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ ipIfStatsInReceives_val_ptr);
+ int ipIfStatsHCInReceives_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ U64 *
+ ipIfStatsHCInReceives_val_ptr);
+ int ipIfStatsInOctets_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ ipIfStatsInOctets_val_ptr);
+ int ipIfStatsHCInOctets_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ U64 *
+ ipIfStatsHCInOctets_val_ptr);
+ int ipIfStatsInHdrErrors_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ ipIfStatsInHdrErrors_val_ptr);
+ int ipIfStatsInNoRoutes_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ ipIfStatsInNoRoutes_val_ptr);
+ int ipIfStatsInAddrErrors_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ ipIfStatsInAddrErrors_val_ptr);
+ int ipIfStatsInUnknownProtos_get(ipIfStatsTable_rowreq_ctx
+ * rowreq_ctx,
+ u_long *
+ ipIfStatsInUnknownProtos_val_ptr);
+ int ipIfStatsInTruncatedPkts_get(ipIfStatsTable_rowreq_ctx
+ * rowreq_ctx,
+ u_long *
+ ipIfStatsInTruncatedPkts_val_ptr);
+ int ipIfStatsInForwDatagrams_get(ipIfStatsTable_rowreq_ctx
+ * rowreq_ctx,
+ u_long *
+ ipIfStatsInForwDatagrams_val_ptr);
+ int
+ ipIfStatsHCInForwDatagrams_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ U64 *
+ ipIfStatsHCInForwDatagrams_val_ptr);
+ int ipIfStatsReasmReqds_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ ipIfStatsReasmReqds_val_ptr);
+ int ipIfStatsReasmOKs_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ ipIfStatsReasmOKs_val_ptr);
+ int ipIfStatsReasmFails_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ ipIfStatsReasmFails_val_ptr);
+ int ipIfStatsInDiscards_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ ipIfStatsInDiscards_val_ptr);
+ int ipIfStatsInDelivers_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ ipIfStatsInDelivers_val_ptr);
+ int ipIfStatsHCInDelivers_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ U64 *
+ ipIfStatsHCInDelivers_val_ptr);
+ int ipIfStatsOutRequests_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ ipIfStatsOutRequests_val_ptr);
+ int ipIfStatsHCOutRequests_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ U64 *
+ ipIfStatsHCOutRequests_val_ptr);
+ int ipIfStatsOutForwDatagrams_get(ipIfStatsTable_rowreq_ctx
+ * rowreq_ctx,
+ u_long *
+ ipIfStatsOutForwDatagrams_val_ptr);
+ int
+ ipIfStatsHCOutForwDatagrams_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ U64 *
+ ipIfStatsHCOutForwDatagrams_val_ptr);
+ int ipIfStatsOutDiscards_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ ipIfStatsOutDiscards_val_ptr);
+ int ipIfStatsOutFragReqds_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ ipIfStatsOutFragReqds_val_ptr);
+ int ipIfStatsOutFragOKs_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ ipIfStatsOutFragOKs_val_ptr);
+ int ipIfStatsOutFragFails_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ ipIfStatsOutFragFails_val_ptr);
+ int ipIfStatsOutFragCreates_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ ipIfStatsOutFragCreates_val_ptr);
+ int ipIfStatsOutTransmits_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ ipIfStatsOutTransmits_val_ptr);
+ int ipIfStatsHCOutTransmits_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ U64 *
+ ipIfStatsHCOutTransmits_val_ptr);
+ int ipIfStatsOutOctets_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ ipIfStatsOutOctets_val_ptr);
+ int ipIfStatsHCOutOctets_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ U64 *
+ ipIfStatsHCOutOctets_val_ptr);
+ int ipIfStatsInMcastPkts_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ ipIfStatsInMcastPkts_val_ptr);
+ int ipIfStatsHCInMcastPkts_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ U64 *
+ ipIfStatsHCInMcastPkts_val_ptr);
+ int ipIfStatsInMcastOctets_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ ipIfStatsInMcastOctets_val_ptr);
+ int ipIfStatsHCInMcastOctets_get(ipIfStatsTable_rowreq_ctx
+ * rowreq_ctx,
+ U64 *
+ ipIfStatsHCInMcastOctets_val_ptr);
+ int ipIfStatsOutMcastPkts_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ ipIfStatsOutMcastPkts_val_ptr);
+ int ipIfStatsHCOutMcastPkts_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ U64 *
+ ipIfStatsHCOutMcastPkts_val_ptr);
+ int ipIfStatsOutMcastOctets_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ ipIfStatsOutMcastOctets_val_ptr);
+ int ipIfStatsHCOutMcastOctets_get(ipIfStatsTable_rowreq_ctx
+ * rowreq_ctx,
+ U64 *
+ ipIfStatsHCOutMcastOctets_val_ptr);
+ int ipIfStatsInBcastPkts_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ ipIfStatsInBcastPkts_val_ptr);
+ int ipIfStatsHCInBcastPkts_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ U64 *
+ ipIfStatsHCInBcastPkts_val_ptr);
+ int ipIfStatsOutBcastPkts_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ ipIfStatsOutBcastPkts_val_ptr);
+ int ipIfStatsHCOutBcastPkts_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ U64 *
+ ipIfStatsHCOutBcastPkts_val_ptr);
+ int
+ ipIfStatsDiscontinuityTime_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ ipIfStatsDiscontinuityTime_val_ptr);
+ int ipIfStatsRefreshRate_get(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ ipIfStatsRefreshRate_val_ptr);
+
+
+ int
+ ipIfStatsTable_indexes_set_tbl_idx(ipIfStatsTable_mib_index *
+ tbl_idx,
+ u_long ipIfStatsIPVersion_val,
+ long ipIfStatsIfIndex_val);
+ int ipIfStatsTable_indexes_set(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long
+ ipIfStatsIPVersion_val,
+ long ipIfStatsIfIndex_val);
+
+
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* IPIFSTATSTABLE_DATA_GET_H */
+/** @} */
diff --git a/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_enums.h b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_enums.h
new file mode 100644
index 0000000..c3657d5
--- /dev/null
+++ b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_enums.h
@@ -0,0 +1,56 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * : generic-table-enums.m2c 12526 2005-07-15 22:41:16Z rstory $
+ *
+ * $Id:$
+ */
+#ifndef IPIFSTATSTABLE_ENUMS_H
+#define IPIFSTATSTABLE_ENUMS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /*
+ * NOTES on enums
+ * ==============
+ *
+ * Value Mapping
+ * -------------
+ * If the values for your data type don't exactly match the
+ * possible values defined by the mib, you should map them
+ * below. For example, a boolean flag (1/0) is usually represented
+ * as a TruthValue in a MIB, which maps to the values (1/2).
+ *
+ */
+/*************************************************************************
+ *************************************************************************
+ *
+ * enum definitions for table ipIfStatsTable
+ *
+ *************************************************************************
+ *************************************************************************/
+
+/*************************************************************
+ * constants for enums for the MIB node
+ * ipIfStatsIPVersion (InetVersion / ASN_INTEGER)
+ *
+ * since a Textual Convention may be referenced more than once in a
+ * MIB, protect againt redefinitions of the enum values.
+ */
+#ifndef INETVERSION_ENUMS
+#define INETVERSION_ENUMS
+
+#define INETVERSION_UNKNOWN 0
+#define INETVERSION_IPV4 1
+#define INETVERSION_IPV6 2
+
+#endif /* INETVERSION_ENUMS */
+
+
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* IPIFSTATSTABLE_ENUMS_H */
diff --git a/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_interface.c b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_interface.c
new file mode 100644
index 0000000..d415a83
--- /dev/null
+++ b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_interface.c
@@ -0,0 +1,1395 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 15899 $ of $
+ *
+ * $Id:$
+ */
+/*
+ * *********************************************************************
+ * *********************************************************************
+ * *********************************************************************
+ * *** ***
+ * *** NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE ***
+ * *** ***
+ * *** ***
+ * *** THIS FILE DOES NOT CONTAIN ANY USER EDITABLE CODE. ***
+ * *** ***
+ * *** ***
+ * *** THE GENERATED CODE IS INTERNAL IMPLEMENTATION, AND ***
+ * *** ***
+ * *** ***
+ * *** IS SUBJECT TO CHANGE WITHOUT WARNING IN FUTURE RELEASES. ***
+ * *** ***
+ * *** ***
+ * *********************************************************************
+ * *********************************************************************
+ * *********************************************************************
+ */
+
+/*
+ * standard Net-SNMP includes
+ */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+
+/*
+ * include our parent header
+ */
+#include "ipIfStatsTable.h"
+
+
+#include <net-snmp/agent/table_container.h>
+#include <net-snmp/library/container.h>
+
+#include "ipIfStatsTable_interface.h"
+
+#include <ctype.h>
+
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table ipIfStatsTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * IP-MIB::ipIfStatsTable is subid 3 of ipTrafficStats.
+ * Its status is Current.
+ * OID: .1.3.6.1.2.1.4.31.3, length: 9
+ */
+typedef struct ipIfStatsTable_interface_ctx_s {
+
+ netsnmp_container *container;
+ netsnmp_cache *cache;
+
+ ipIfStatsTable_registration *user_ctx;
+
+ netsnmp_table_registration_info tbl_info;
+
+ netsnmp_baby_steps_access_methods access_multiplexer;
+
+ u_long last_changed;
+
+} ipIfStatsTable_interface_ctx;
+
+static ipIfStatsTable_interface_ctx ipIfStatsTable_if_ctx;
+
+static void _ipIfStatsTable_container_init(ipIfStatsTable_interface_ctx
+ * if_ctx);
+static void
+_ipIfStatsTable_container_shutdown(ipIfStatsTable_interface_ctx * if_ctx);
+
+
+netsnmp_container *
+ipIfStatsTable_container_get(void)
+{
+ return ipIfStatsTable_if_ctx.container;
+}
+
+ipIfStatsTable_registration *
+ipIfStatsTable_registration_get(void)
+{
+ return ipIfStatsTable_if_ctx.user_ctx;
+}
+
+ipIfStatsTable_registration *
+ipIfStatsTable_registration_set(ipIfStatsTable_registration * newreg)
+{
+ ipIfStatsTable_registration *old = ipIfStatsTable_if_ctx.user_ctx;
+ ipIfStatsTable_if_ctx.user_ctx = newreg;
+ return old;
+}
+
+int
+ipIfStatsTable_container_size(void)
+{
+ return CONTAINER_SIZE(ipIfStatsTable_if_ctx.container);
+}
+
+/*
+ * ipIfStatsTableLastChanged, which is the last time that a row in
+ * the table was changed or the last time a row was added/deleted from the
+ * table.
+ */
+void
+ipIfStatsTable_lastChange_set(u_long table_changed)
+{
+ DEBUGMSGTL(("ipIfStatsTable:lastChanged_set",
+ "called. was %ld, now %ld\n",
+ ipIfStatsTable_if_ctx.last_changed, table_changed));
+ ipIfStatsTable_if_ctx.last_changed = table_changed;
+}
+
+/*
+ * mfd multiplexer modes
+ */
+static Netsnmp_Node_Handler _mfd_ipIfStatsTable_pre_request;
+static Netsnmp_Node_Handler _mfd_ipIfStatsTable_post_request;
+static Netsnmp_Node_Handler _mfd_ipIfStatsTable_object_lookup;
+static Netsnmp_Node_Handler _mfd_ipIfStatsTable_get_values;
+/**
+ * @internal
+ * Initialize the table ipIfStatsTable
+ * (Define its contents and how it's structured)
+ */
+void
+_ipIfStatsTable_initialize_interface(ipIfStatsTable_registration * reg_ptr,
+ u_long flags)
+{
+ netsnmp_baby_steps_access_methods *access_multiplexer =
+ &ipIfStatsTable_if_ctx.access_multiplexer;
+ netsnmp_table_registration_info *tbl_info =
+ &ipIfStatsTable_if_ctx.tbl_info;
+ netsnmp_handler_registration *reginfo;
+ netsnmp_mib_handler *handler;
+ int mfd_modes = 0;
+
+ DEBUGMSGTL(("internal:ipIfStatsTable:_ipIfStatsTable_initialize_interface", "called\n"));
+
+
+ /*************************************************
+ *
+ * save interface context for ipIfStatsTable
+ */
+ /*
+ * Setting up the table's definition
+ */
+ netsnmp_table_helper_add_indexes(tbl_info, ASN_INTEGER,
+ /** index: ipIfStatsIPVersion */
+ ASN_INTEGER,
+ /** index: ipIfStatsIfIndex */
+ 0);
+
+ /*
+ * Define the minimum and maximum accessible columns. This
+ * optimizes retrival.
+ */
+ tbl_info->min_column = IPIFSTATSTABLE_MIN_COL;
+ tbl_info->max_column = IPIFSTATSTABLE_MAX_COL;
+
+ /*
+ * save users context
+ */
+ ipIfStatsTable_if_ctx.user_ctx = reg_ptr;
+
+ /*
+ * call data access initialization code
+ */
+ ipIfStatsTable_init_data(reg_ptr);
+
+ /*
+ * set up the container
+ */
+ _ipIfStatsTable_container_init(&ipIfStatsTable_if_ctx);
+ if (NULL == ipIfStatsTable_if_ctx.container) {
+ snmp_log(LOG_ERR,
+ "could not initialize container for ipIfStatsTable\n");
+ return;
+ }
+
+ /*
+ * access_multiplexer: REQUIRED wrapper for get request handling
+ */
+ access_multiplexer->object_lookup = _mfd_ipIfStatsTable_object_lookup;
+ access_multiplexer->get_values = _mfd_ipIfStatsTable_get_values;
+
+ /*
+ * no wrappers yet
+ */
+ access_multiplexer->pre_request = _mfd_ipIfStatsTable_pre_request;
+ access_multiplexer->post_request = _mfd_ipIfStatsTable_post_request;
+
+
+ /*************************************************
+ *
+ * Create a registration, save our reg data, register table.
+ */
+ DEBUGMSGTL(("ipIfStatsTable:init_ipIfStatsTable",
+ "Registering ipIfStatsTable as a mibs-for-dummies table.\n"));
+ handler =
+ netsnmp_baby_steps_access_multiplexer_get(access_multiplexer);
+ reginfo =
+ netsnmp_handler_registration_create("ipIfStatsTable", handler,
+ ipIfStatsTable_oid,
+ ipIfStatsTable_oid_size,
+ HANDLER_CAN_BABY_STEP |
+ HANDLER_CAN_RONLY);
+ if (NULL == reginfo) {
+ snmp_log(LOG_ERR, "error registering table ipIfStatsTable\n");
+ return;
+ }
+ reginfo->my_reg_void = &ipIfStatsTable_if_ctx;
+
+ /*************************************************
+ *
+ * set up baby steps handler, create it and inject it
+ */
+ if (access_multiplexer->object_lookup)
+ mfd_modes |= BABY_STEP_OBJECT_LOOKUP;
+ if (access_multiplexer->set_values)
+ mfd_modes |= BABY_STEP_SET_VALUES;
+ if (access_multiplexer->irreversible_commit)
+ mfd_modes |= BABY_STEP_IRREVERSIBLE_COMMIT;
+ if (access_multiplexer->object_syntax_checks)
+ mfd_modes |= BABY_STEP_CHECK_OBJECT;
+
+ if (access_multiplexer->pre_request)
+ mfd_modes |= BABY_STEP_PRE_REQUEST;
+ if (access_multiplexer->post_request)
+ mfd_modes |= BABY_STEP_POST_REQUEST;
+
+ if (access_multiplexer->undo_setup)
+ mfd_modes |= BABY_STEP_UNDO_SETUP;
+ if (access_multiplexer->undo_cleanup)
+ mfd_modes |= BABY_STEP_UNDO_CLEANUP;
+ if (access_multiplexer->undo_sets)
+ mfd_modes |= BABY_STEP_UNDO_SETS;
+
+ if (access_multiplexer->row_creation)
+ mfd_modes |= BABY_STEP_ROW_CREATE;
+ if (access_multiplexer->consistency_checks)
+ mfd_modes |= BABY_STEP_CHECK_CONSISTENCY;
+ if (access_multiplexer->commit)
+ mfd_modes |= BABY_STEP_COMMIT;
+ if (access_multiplexer->undo_commit)
+ mfd_modes |= BABY_STEP_UNDO_COMMIT;
+
+ handler = netsnmp_baby_steps_handler_get(mfd_modes);
+ netsnmp_inject_handler(reginfo, handler);
+
+ /*************************************************
+ *
+ * inject row_merge helper with prefix rootoid_len + 2 (entry.col)
+ */
+ handler = netsnmp_get_row_merge_handler(reginfo->rootoid_len + 2);
+ netsnmp_inject_handler(reginfo, handler);
+
+ /*************************************************
+ *
+ * inject container_table helper
+ */
+ handler =
+ netsnmp_container_table_handler_get(tbl_info,
+ ipIfStatsTable_if_ctx.
+ container,
+ TABLE_CONTAINER_KEY_NETSNMP_INDEX);
+ netsnmp_inject_handler(reginfo, handler);
+
+ /*************************************************
+ *
+ * inject cache helper
+ */
+ if (NULL != ipIfStatsTable_if_ctx.cache) {
+ handler = netsnmp_cache_handler_get(ipIfStatsTable_if_ctx.cache);
+ netsnmp_inject_handler(reginfo, handler);
+ }
+
+ /*
+ * register table
+ */
+ netsnmp_register_table(reginfo, tbl_info);
+
+ /*
+ * register LastChanged
+ */
+ {
+ oid lc_oid[] = { IPIFSTATSTABLELASTCHANGE_OID };
+ netsnmp_register_watched_scalar(netsnmp_create_handler_registration
+ ("ipIfStatsTableLastChanged", NULL,
+ lc_oid, OID_LENGTH(lc_oid),
+ HANDLER_CAN_RONLY),
+ netsnmp_create_watcher_info((void
+ *)
+ &ipIfStatsTable_if_ctx.
+ last_changed,
+ sizeof
+ (u_long),
+ ASN_TIMETICKS,
+ WATCHER_FIXED_SIZE));
+ }
+} /* _ipIfStatsTable_initialize_interface */
+
+/**
+ * @internal
+ * Shutdown the table ipIfStatsTable
+ */
+void
+_ipIfStatsTable_shutdown_interface(ipIfStatsTable_registration * reg_ptr)
+{
+ /*
+ * shutdown the container
+ */
+ _ipIfStatsTable_container_shutdown(&ipIfStatsTable_if_ctx);
+}
+
+void
+ipIfStatsTable_valid_columns_set(netsnmp_column_info *vc)
+{
+ ipIfStatsTable_if_ctx.tbl_info.valid_columns = vc;
+} /* ipIfStatsTable_valid_columns_set */
+
+/**
+ * @internal
+ * convert the index component stored in the context to an oid
+ */
+int
+ipIfStatsTable_index_to_oid(netsnmp_index * oid_idx,
+ ipIfStatsTable_mib_index * mib_idx)
+{
+ int err = SNMP_ERR_NOERROR;
+
+ /*
+ * temp storage for parsing indexes
+ */
+ /*
+ * ipIfStatsIPVersion(1)/InetVersion/ASN_INTEGER/long(u_long)//l/a/w/E/r/d/h
+ */
+ netsnmp_variable_list var_ipIfStatsIPVersion;
+ /*
+ * ipIfStatsIfIndex(2)/InterfaceIndex/ASN_INTEGER/long(long)//l/a/w/e/R/d/H
+ */
+ netsnmp_variable_list var_ipIfStatsIfIndex;
+
+ /*
+ * set up varbinds
+ */
+ memset(&var_ipIfStatsIPVersion, 0x00, sizeof(var_ipIfStatsIPVersion));
+ var_ipIfStatsIPVersion.type = ASN_INTEGER;
+ memset(&var_ipIfStatsIfIndex, 0x00, sizeof(var_ipIfStatsIfIndex));
+ var_ipIfStatsIfIndex.type = ASN_INTEGER;
+
+ /*
+ * chain temp index varbinds together
+ */
+ var_ipIfStatsIPVersion.next_variable = &var_ipIfStatsIfIndex;
+ var_ipIfStatsIfIndex.next_variable = NULL;
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsTable_index_to_oid",
+ "called\n"));
+
+ /*
+ * ipIfStatsIPVersion(1)/InetVersion/ASN_INTEGER/long(u_long)//l/a/w/E/r/d/h
+ */
+ snmp_set_var_value(&var_ipIfStatsIPVersion,
+ (u_char *) & mib_idx->ipIfStatsIPVersion,
+ sizeof(mib_idx->ipIfStatsIPVersion));
+
+ /*
+ * ipIfStatsIfIndex(2)/InterfaceIndex/ASN_INTEGER/long(long)//l/a/w/e/R/d/H
+ */
+ snmp_set_var_value(&var_ipIfStatsIfIndex,
+ (u_char *) & mib_idx->ipIfStatsIfIndex,
+ sizeof(mib_idx->ipIfStatsIfIndex));
+
+
+ err = build_oid_noalloc(oid_idx->oids, oid_idx->len, &oid_idx->len,
+ NULL, 0, &var_ipIfStatsIPVersion);
+ if (err)
+ snmp_log(LOG_ERR, "error %d converting index to oid\n", err);
+
+ /*
+ * parsing may have allocated memory. free it.
+ */
+ snmp_reset_var_buffers(&var_ipIfStatsIPVersion);
+
+ return err;
+} /* ipIfStatsTable_index_to_oid */
+
+/**
+ * extract ipIfStatsTable indexes from a netsnmp_index
+ *
+ * @retval SNMP_ERR_NOERROR : no error
+ * @retval SNMP_ERR_GENERR : error
+ */
+int
+ipIfStatsTable_index_from_oid(netsnmp_index * oid_idx,
+ ipIfStatsTable_mib_index * mib_idx)
+{
+ int err = SNMP_ERR_NOERROR;
+
+ /*
+ * temp storage for parsing indexes
+ */
+ /*
+ * ipIfStatsIPVersion(1)/InetVersion/ASN_INTEGER/long(u_long)//l/a/w/E/r/d/h
+ */
+ netsnmp_variable_list var_ipIfStatsIPVersion;
+ /*
+ * ipIfStatsIfIndex(2)/InterfaceIndex/ASN_INTEGER/long(long)//l/a/w/e/R/d/H
+ */
+ netsnmp_variable_list var_ipIfStatsIfIndex;
+
+ /*
+ * set up varbinds
+ */
+ memset(&var_ipIfStatsIPVersion, 0x00, sizeof(var_ipIfStatsIPVersion));
+ var_ipIfStatsIPVersion.type = ASN_INTEGER;
+ memset(&var_ipIfStatsIfIndex, 0x00, sizeof(var_ipIfStatsIfIndex));
+ var_ipIfStatsIfIndex.type = ASN_INTEGER;
+
+ /*
+ * chain temp index varbinds together
+ */
+ var_ipIfStatsIPVersion.next_variable = &var_ipIfStatsIfIndex;
+ var_ipIfStatsIfIndex.next_variable = NULL;
+
+
+ DEBUGMSGTL(("verbose:ipIfStatsTable:ipIfStatsTable_index_from_oid",
+ "called\n"));
+
+ /*
+ * parse the oid into the individual index components
+ */
+ err = parse_oid_indexes(oid_idx->oids, oid_idx->len,
+ &var_ipIfStatsIPVersion);
+ if (err == SNMP_ERR_NOERROR) {
+ /*
+ * copy out values
+ */
+ mib_idx->ipIfStatsIPVersion =
+ *((u_long *) var_ipIfStatsIPVersion.val.string);
+ mib_idx->ipIfStatsIfIndex =
+ *((long *) var_ipIfStatsIfIndex.val.string);
+
+
+ }
+
+ /*
+ * parsing may have allocated memory. free it.
+ */
+ snmp_reset_var_buffers(&var_ipIfStatsIPVersion);
+
+ return err;
+} /* ipIfStatsTable_index_from_oid */
+
+
+/*
+ *********************************************************************
+ * @internal
+ * allocate resources for a ipIfStatsTable_rowreq_ctx
+ */
+ipIfStatsTable_rowreq_ctx *
+ipIfStatsTable_allocate_rowreq_ctx(ipIfStatsTable_data * data,
+ void *user_init_ctx)
+{
+ ipIfStatsTable_rowreq_ctx *rowreq_ctx =
+ SNMP_MALLOC_TYPEDEF(ipIfStatsTable_rowreq_ctx);
+
+ DEBUGMSGTL(("internal:ipIfStatsTable:ipIfStatsTable_allocate_rowreq_ctx", "called\n"));
+
+ if (NULL == rowreq_ctx) {
+ snmp_log(LOG_ERR, "Couldn't allocate memory for a "
+ "ipIfStatsTable_rowreq_ctx.\n");
+ return NULL;
+ } else {
+ if (NULL != data) {
+ /*
+ * track if we got data from user
+ */
+ rowreq_ctx->rowreq_flags |= MFD_ROW_DATA_FROM_USER;
+ rowreq_ctx->data = data;
+ } else if (NULL ==
+ (rowreq_ctx->data = ipIfStatsTable_allocate_data())) {
+ SNMP_FREE(rowreq_ctx);
+ return NULL;
+ }
+ }
+
+ /*
+ * undo context will be allocated when needed (in *_undo_setup)
+ */
+
+ rowreq_ctx->oid_idx.oids = rowreq_ctx->oid_tmp;
+
+ rowreq_ctx->ipIfStatsTable_data_list = NULL;
+
+ /*
+ * if we allocated data, call init routine
+ */
+ if (!(rowreq_ctx->rowreq_flags & MFD_ROW_DATA_FROM_USER)) {
+ if (SNMPERR_SUCCESS !=
+ ipIfStatsTable_rowreq_ctx_init(rowreq_ctx, user_init_ctx)) {
+ ipIfStatsTable_release_rowreq_ctx(rowreq_ctx);
+ rowreq_ctx = NULL;
+ }
+ }
+
+ return rowreq_ctx;
+} /* ipIfStatsTable_allocate_rowreq_ctx */
+
+/*
+ * @internal
+ * release resources for a ipIfStatsTable_rowreq_ctx
+ */
+void
+ipIfStatsTable_release_rowreq_ctx(ipIfStatsTable_rowreq_ctx * rowreq_ctx)
+{
+ DEBUGMSGTL(("internal:ipIfStatsTable:ipIfStatsTable_release_rowreq_ctx", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ ipIfStatsTable_rowreq_ctx_cleanup(rowreq_ctx);
+
+ /*
+ * for non-transient data, don't free data we got from the user
+ */
+ if ((rowreq_ctx->data) &&
+ !(rowreq_ctx->rowreq_flags & MFD_ROW_DATA_FROM_USER))
+ ipIfStatsTable_release_data(rowreq_ctx->data);
+
+ /*
+ * free index oid pointer
+ */
+ if (rowreq_ctx->oid_idx.oids != rowreq_ctx->oid_tmp)
+ free(rowreq_ctx->oid_idx.oids);
+
+ SNMP_FREE(rowreq_ctx);
+} /* ipIfStatsTable_release_rowreq_ctx */
+
+/**
+ * @internal
+ * wrapper
+ */
+static int
+_mfd_ipIfStatsTable_pre_request(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration *reginfo,
+ netsnmp_agent_request_info *agtreq_info,
+ netsnmp_request_info *requests)
+{
+ int rc;
+
+ DEBUGMSGTL(("internal:ipIfStatsTable:_mfd_ipIfStatsTable_pre_request",
+ "called\n"));
+
+ if (1 != netsnmp_row_merge_status_first(reginfo, agtreq_info)) {
+ DEBUGMSGTL(("internal:ipIfStatsTable",
+ "skipping additional pre_request\n"));
+ return SNMP_ERR_NOERROR;
+ }
+
+ rc = ipIfStatsTable_pre_request(ipIfStatsTable_if_ctx.user_ctx);
+ if (MFD_SUCCESS != rc) {
+ /*
+ * nothing we can do about it but log it
+ */
+ DEBUGMSGTL(("ipIfStatsTable", "error %d from "
+ "ipIfStatsTable_pre_request\n", rc));
+ netsnmp_request_set_error_all(requests, SNMP_VALIDATE_ERR(rc));
+ }
+
+ return SNMP_ERR_NOERROR;
+} /* _mfd_ipIfStatsTable_pre_request */
+
+/**
+ * @internal
+ * wrapper
+ */
+static int
+_mfd_ipIfStatsTable_post_request(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration *reginfo,
+ netsnmp_agent_request_info *agtreq_info,
+ netsnmp_request_info *requests)
+{
+ ipIfStatsTable_rowreq_ctx *rowreq_ctx =
+ netsnmp_container_table_row_extract(requests);
+ int rc, packet_rc;
+
+ DEBUGMSGTL(("internal:ipIfStatsTable:_mfd_ipIfStatsTable_post_request",
+ "called\n"));
+
+ /*
+ * release row context, if deleted
+ */
+ if (rowreq_ctx && (rowreq_ctx->rowreq_flags & MFD_ROW_DELETED))
+ ipIfStatsTable_release_rowreq_ctx(rowreq_ctx);
+
+ /*
+ * wait for last call before calling user
+ */
+ if (1 != netsnmp_row_merge_status_last(reginfo, agtreq_info)) {
+ DEBUGMSGTL(("internal:ipIfStatsTable",
+ "waiting for last post_request\n"));
+ return SNMP_ERR_NOERROR;
+ }
+
+ packet_rc = netsnmp_check_all_requests_error(agtreq_info->asp, 0);
+ rc = ipIfStatsTable_post_request(ipIfStatsTable_if_ctx.user_ctx,
+ packet_rc);
+ if (MFD_SUCCESS != rc) {
+ /*
+ * nothing we can do about it but log it
+ */
+ DEBUGMSGTL(("ipIfStatsTable", "error %d from "
+ "ipIfStatsTable_post_request\n", rc));
+ }
+
+ return SNMP_ERR_NOERROR;
+} /* _mfd_ipIfStatsTable_post_request */
+
+/**
+ * @internal
+ * wrapper
+ */
+static int
+_mfd_ipIfStatsTable_object_lookup(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration *reginfo,
+ netsnmp_agent_request_info *agtreq_info,
+ netsnmp_request_info *requests)
+{
+ int rc = SNMP_ERR_NOERROR;
+ ipIfStatsTable_rowreq_ctx *rowreq_ctx =
+ netsnmp_container_table_row_extract(requests);
+
+ DEBUGMSGTL(("internal:ipIfStatsTable:_mfd_ipIfStatsTable_object_lookup", "called\n"));
+
+ /*
+ * get our context from mfd
+ * ipIfStatsTable_interface_ctx *if_ctx =
+ * (ipIfStatsTable_interface_ctx *)reginfo->my_reg_void;
+ */
+
+ if (NULL == rowreq_ctx) {
+ rc = SNMP_ERR_NOCREATION;
+ }
+
+ if (MFD_SUCCESS != rc)
+ netsnmp_request_set_error_all(requests, rc);
+ else
+ ipIfStatsTable_row_prep(rowreq_ctx);
+
+ return SNMP_VALIDATE_ERR(rc);
+} /* _mfd_ipIfStatsTable_object_lookup */
+
+/***********************************************************************
+ *
+ * GET processing
+ *
+ ***********************************************************************/
+/*
+ * @internal
+ * Retrieve the value for a particular column
+ */
+NETSNMP_STATIC_INLINE int
+_ipIfStatsTable_get_column(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
+ netsnmp_variable_list * var, int column)
+{
+ int rc = SNMPERR_SUCCESS;
+
+ DEBUGMSGTL(("internal:ipIfStatsTable:_mfd_ipIfStatsTable_get_column",
+ "called for %d\n", column));
+
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ switch (column) {
+
+ /*
+ * ipIfStatsInReceives(3)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSINRECEIVES:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_COUNTER;
+ rc = ipIfStatsInReceives_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsHCInReceives(4)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSHCINRECEIVES:
+ var->val_len = sizeof(U64);
+ var->type = ASN_COUNTER64;
+ rc = ipIfStatsHCInReceives_get(rowreq_ctx,
+ (U64 *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsInOctets(5)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSINOCTETS:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_COUNTER;
+ rc = ipIfStatsInOctets_get(rowreq_ctx, (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsHCInOctets(6)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSHCINOCTETS:
+ var->val_len = sizeof(U64);
+ var->type = ASN_COUNTER64;
+ rc = ipIfStatsHCInOctets_get(rowreq_ctx, (U64 *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsInHdrErrors(7)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSINHDRERRORS:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_COUNTER;
+ rc = ipIfStatsInHdrErrors_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsInNoRoutes(8)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSINNOROUTES:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_COUNTER;
+ rc = ipIfStatsInNoRoutes_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsInAddrErrors(9)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSINADDRERRORS:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_COUNTER;
+ rc = ipIfStatsInAddrErrors_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsInUnknownProtos(10)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSINUNKNOWNPROTOS:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_COUNTER;
+ rc = ipIfStatsInUnknownProtos_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsInTruncatedPkts(11)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSINTRUNCATEDPKTS:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_COUNTER;
+ rc = ipIfStatsInTruncatedPkts_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsInForwDatagrams(12)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSINFORWDATAGRAMS:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_COUNTER;
+ rc = ipIfStatsInForwDatagrams_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsHCInForwDatagrams(13)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSHCINFORWDATAGRAMS:
+ var->val_len = sizeof(U64);
+ var->type = ASN_COUNTER64;
+ rc = ipIfStatsHCInForwDatagrams_get(rowreq_ctx,
+ (U64 *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsReasmReqds(14)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSREASMREQDS:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_COUNTER;
+ rc = ipIfStatsReasmReqds_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsReasmOKs(15)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSREASMOKS:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_COUNTER;
+ rc = ipIfStatsReasmOKs_get(rowreq_ctx, (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsReasmFails(16)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSREASMFAILS:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_COUNTER;
+ rc = ipIfStatsReasmFails_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsInDiscards(17)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSINDISCARDS:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_COUNTER;
+ rc = ipIfStatsInDiscards_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsInDelivers(18)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSINDELIVERS:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_COUNTER;
+ rc = ipIfStatsInDelivers_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsHCInDelivers(19)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSHCINDELIVERS:
+ var->val_len = sizeof(U64);
+ var->type = ASN_COUNTER64;
+ rc = ipIfStatsHCInDelivers_get(rowreq_ctx,
+ (U64 *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsOutRequests(20)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSOUTREQUESTS:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_COUNTER;
+ rc = ipIfStatsOutRequests_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsHCOutRequests(21)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSHCOUTREQUESTS:
+ var->val_len = sizeof(U64);
+ var->type = ASN_COUNTER64;
+ rc = ipIfStatsHCOutRequests_get(rowreq_ctx,
+ (U64 *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsOutForwDatagrams(23)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSOUTFORWDATAGRAMS:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_COUNTER;
+ rc = ipIfStatsOutForwDatagrams_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsHCOutForwDatagrams(24)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSHCOUTFORWDATAGRAMS:
+ var->val_len = sizeof(U64);
+ var->type = ASN_COUNTER64;
+ rc = ipIfStatsHCOutForwDatagrams_get(rowreq_ctx,
+ (U64 *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsOutDiscards(25)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSOUTDISCARDS:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_COUNTER;
+ rc = ipIfStatsOutDiscards_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsOutFragReqds(26)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSOUTFRAGREQDS:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_COUNTER;
+ rc = ipIfStatsOutFragReqds_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsOutFragOKs(27)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSOUTFRAGOKS:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_COUNTER;
+ rc = ipIfStatsOutFragOKs_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsOutFragFails(28)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSOUTFRAGFAILS:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_COUNTER;
+ rc = ipIfStatsOutFragFails_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsOutFragCreates(29)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSOUTFRAGCREATES:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_COUNTER;
+ rc = ipIfStatsOutFragCreates_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsOutTransmits(30)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSOUTTRANSMITS:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_COUNTER;
+ rc = ipIfStatsOutTransmits_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsHCOutTransmits(31)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSHCOUTTRANSMITS:
+ var->val_len = sizeof(U64);
+ var->type = ASN_COUNTER64;
+ rc = ipIfStatsHCOutTransmits_get(rowreq_ctx,
+ (U64 *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsOutOctets(32)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSOUTOCTETS:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_COUNTER;
+ rc = ipIfStatsOutOctets_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsHCOutOctets(33)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSHCOUTOCTETS:
+ var->val_len = sizeof(U64);
+ var->type = ASN_COUNTER64;
+ rc = ipIfStatsHCOutOctets_get(rowreq_ctx, (U64 *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsInMcastPkts(34)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSINMCASTPKTS:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_COUNTER;
+ rc = ipIfStatsInMcastPkts_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsHCInMcastPkts(35)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSHCINMCASTPKTS:
+ var->val_len = sizeof(U64);
+ var->type = ASN_COUNTER64;
+ rc = ipIfStatsHCInMcastPkts_get(rowreq_ctx,
+ (U64 *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsInMcastOctets(36)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSINMCASTOCTETS:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_COUNTER;
+ rc = ipIfStatsInMcastOctets_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsHCInMcastOctets(37)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSHCINMCASTOCTETS:
+ var->val_len = sizeof(U64);
+ var->type = ASN_COUNTER64;
+ rc = ipIfStatsHCInMcastOctets_get(rowreq_ctx,
+ (U64 *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsOutMcastPkts(38)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSOUTMCASTPKTS:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_COUNTER;
+ rc = ipIfStatsOutMcastPkts_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsHCOutMcastPkts(39)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSHCOUTMCASTPKTS:
+ var->val_len = sizeof(U64);
+ var->type = ASN_COUNTER64;
+ rc = ipIfStatsHCOutMcastPkts_get(rowreq_ctx,
+ (U64 *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsOutMcastOctets(40)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSOUTMCASTOCTETS:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_COUNTER;
+ rc = ipIfStatsOutMcastOctets_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsHCOutMcastOctets(41)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSHCOUTMCASTOCTETS:
+ var->val_len = sizeof(U64);
+ var->type = ASN_COUNTER64;
+ rc = ipIfStatsHCOutMcastOctets_get(rowreq_ctx,
+ (U64 *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsInBcastPkts(42)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSINBCASTPKTS:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_COUNTER;
+ rc = ipIfStatsInBcastPkts_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsHCInBcastPkts(43)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSHCINBCASTPKTS:
+ var->val_len = sizeof(U64);
+ var->type = ASN_COUNTER64;
+ rc = ipIfStatsHCInBcastPkts_get(rowreq_ctx,
+ (U64 *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsOutBcastPkts(44)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSOUTBCASTPKTS:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_COUNTER;
+ rc = ipIfStatsOutBcastPkts_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsHCOutBcastPkts(45)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSHCOUTBCASTPKTS:
+ var->val_len = sizeof(U64);
+ var->type = ASN_COUNTER64;
+ rc = ipIfStatsHCOutBcastPkts_get(rowreq_ctx,
+ (U64 *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsDiscontinuityTime(46)/TimeStamp/ASN_TIMETICKS/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSDISCONTINUITYTIME:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_TIMETICKS;
+ rc = ipIfStatsDiscontinuityTime_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ /*
+ * ipIfStatsRefreshRate(47)/UNSIGNED32/ASN_UNSIGNED/u_long(u_long)//l/A/w/e/r/d/h
+ */
+ case COLUMN_IPIFSTATSREFRESHRATE:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_UNSIGNED;
+ rc = ipIfStatsRefreshRate_get(rowreq_ctx,
+ (u_long *) var->val.string);
+ break;
+
+ default:
+ if (IPIFSTATSTABLE_MIN_COL <= column
+ && column <= IPIFSTATSTABLE_MAX_COL) {
+ DEBUGMSGTL(("internal:ipIfStatsTable:_mfd_ipIfStatsTable_get_column", "assume column %d is reserved\n", column));
+ rc = MFD_SKIP;
+ } else {
+ snmp_log(LOG_ERR,
+ "unknown column %d in _ipIfStatsTable_get_column\n",
+ column);
+ }
+ break;
+ }
+
+ return rc;
+} /* _ipIfStatsTable_get_column */
+
+int
+_mfd_ipIfStatsTable_get_values(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration *reginfo,
+ netsnmp_agent_request_info *agtreq_info,
+ netsnmp_request_info *requests)
+{
+ ipIfStatsTable_rowreq_ctx *rowreq_ctx =
+ netsnmp_container_table_row_extract(requests);
+ netsnmp_table_request_info *tri;
+ u_char *old_string;
+ void (*dataFreeHook) (void *);
+ int rc;
+
+ DEBUGMSGTL(("internal:ipIfStatsTable:_mfd_ipIfStatsTable_get_values",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ for (; requests; requests = requests->next) {
+ /*
+ * save old pointer, so we can free it if replaced
+ */
+ old_string = requests->requestvb->val.string;
+ dataFreeHook = requests->requestvb->dataFreeHook;
+ if (NULL == requests->requestvb->val.string) {
+ requests->requestvb->val.string = requests->requestvb->buf;
+ requests->requestvb->val_len =
+ sizeof(requests->requestvb->buf);
+ } else if (requests->requestvb->buf ==
+ requests->requestvb->val.string) {
+ if (requests->requestvb->val_len !=
+ sizeof(requests->requestvb->buf))
+ requests->requestvb->val_len =
+ sizeof(requests->requestvb->buf);
+ }
+
+ /*
+ * get column data
+ */
+ tri = netsnmp_extract_table_info(requests);
+ if (NULL == tri)
+ continue;
+
+ rc = _ipIfStatsTable_get_column(rowreq_ctx, requests->requestvb,
+ tri->colnum);
+ if (rc) {
+ if (MFD_SKIP == rc) {
+ requests->requestvb->type = SNMP_NOSUCHINSTANCE;
+ rc = SNMP_ERR_NOERROR;
+ }
+ } else if (NULL == requests->requestvb->val.string) {
+ snmp_log(LOG_ERR, "NULL varbind data pointer!\n");
+ rc = SNMP_ERR_GENERR;
+ }
+ if (rc)
+ netsnmp_request_set_error(requests, SNMP_VALIDATE_ERR(rc));
+
+ /*
+ * if the buffer wasn't used previously for the old data (i.e. it
+ * was allcoated memory) and the get routine replaced the pointer,
+ * we need to free the previous pointer.
+ */
+ if (old_string && (old_string != requests->requestvb->buf) &&
+ (requests->requestvb->val.string != old_string)) {
+ if (dataFreeHook)
+ (*dataFreeHook) (old_string);
+ else
+ free(old_string);
+ }
+ } /* for results */
+
+ return SNMP_ERR_NOERROR;
+} /* _mfd_ipIfStatsTable_get_values */
+
+
+/***********************************************************************
+ *
+ * SET processing
+ *
+ ***********************************************************************/
+
+/*
+ * SET PROCESSING NOT APPLICABLE (per MIB or user setting)
+ */
+/***********************************************************************
+ *
+ * DATA ACCESS
+ *
+ ***********************************************************************/
+static void _container_free(netsnmp_container * container);
+
+/**
+ * @internal
+ */
+static int
+_cache_load(netsnmp_cache * cache, void *vmagic)
+{
+ DEBUGMSGTL(("internal:ipIfStatsTable:_cache_load", "called\n"));
+
+ if ((NULL == cache) || (NULL == cache->magic)) {
+ snmp_log(LOG_ERR, "invalid cache for ipIfStatsTable_cache_load\n");
+ return -1;
+ }
+
+ /** should only be called for an invalid or expired cache */
+ netsnmp_assert((0 == cache->valid) || (1 == cache->expired));
+
+ /*
+ * call user code
+ */
+ return ipIfStatsTable_container_load((netsnmp_container *) cache->
+ magic);
+} /* _cache_load */
+
+/**
+ * @internal
+ */
+static void
+_cache_free(netsnmp_cache * cache, void *magic)
+{
+ netsnmp_container *container;
+
+ DEBUGMSGTL(("internal:ipIfStatsTable:_cache_free", "called\n"));
+
+ if ((NULL == cache) || (NULL == cache->magic)) {
+ snmp_log(LOG_ERR, "invalid cache in ipIfStatsTable_cache_free\n");
+ return;
+ }
+
+ container = (netsnmp_container *) cache->magic;
+
+ _container_free(container);
+} /* _cache_free */
+
+/**
+ * @internal
+ */
+static void
+_container_item_free(ipIfStatsTable_rowreq_ctx * rowreq_ctx, void *context)
+{
+ DEBUGMSGTL(("internal:ipIfStatsTable:_container_item_free",
+ "called\n"));
+
+ if (NULL == rowreq_ctx)
+ return;
+
+ ipIfStatsTable_release_rowreq_ctx(rowreq_ctx);
+} /* _container_item_free */
+
+/**
+ * @internal
+ */
+static void
+_container_free(netsnmp_container * container)
+{
+ DEBUGMSGTL(("internal:ipIfStatsTable:_container_free", "called\n"));
+
+ if (NULL == container) {
+ snmp_log(LOG_ERR,
+ "invalid container in ipIfStatsTable_container_free\n");
+ return;
+ }
+
+ /*
+ * call user code
+ */
+ ipIfStatsTable_container_free(container);
+
+ /*
+ * free all items. inefficient, but easy.
+ */
+ CONTAINER_CLEAR(container,
+ (netsnmp_container_obj_func *) _container_item_free,
+ NULL);
+} /* _container_free */
+
+/**
+ * @internal
+ * initialize the container with functions or wrappers
+ */
+void
+_ipIfStatsTable_container_init(ipIfStatsTable_interface_ctx * if_ctx)
+{
+ DEBUGMSGTL(("internal:ipIfStatsTable:_ipIfStatsTable_container_init",
+ "called\n"));
+
+ /*
+ * cache init
+ */
+ if_ctx->cache = netsnmp_cache_create(30, /* timeout in seconds */
+ _cache_load, _cache_free,
+ ipIfStatsTable_oid,
+ ipIfStatsTable_oid_size);
+
+ if (NULL == if_ctx->cache) {
+ snmp_log(LOG_ERR, "error creating cache for ipIfStatsTable\n");
+ return;
+ }
+
+ if_ctx->cache->flags = NETSNMP_CACHE_DONT_INVALIDATE_ON_SET;
+
+ ipIfStatsTable_container_init(&if_ctx->container, if_ctx->cache);
+ if (NULL == if_ctx->container)
+ if_ctx->container =
+ netsnmp_container_find("ipIfStatsTable:table_container");
+ if (NULL == if_ctx->container) {
+ snmp_log(LOG_ERR, "error creating container in "
+ "ipIfStatsTable_container_init\n");
+ return;
+ }
+
+ if (NULL != if_ctx->cache)
+ if_ctx->cache->magic = (void *) if_ctx->container;
+} /* _ipIfStatsTable_container_init */
+
+/**
+ * @internal
+ * shutdown the container with functions or wrappers
+ */
+void
+_ipIfStatsTable_container_shutdown(ipIfStatsTable_interface_ctx * if_ctx)
+{
+ DEBUGMSGTL(("internal:ipIfStatsTable:_ipIfStatsTable_container_shutdown", "called\n"));
+
+ ipIfStatsTable_container_shutdown(if_ctx->container);
+
+ _container_free(if_ctx->container);
+
+} /* _ipIfStatsTable_container_shutdown */
+
+
+ipIfStatsTable_rowreq_ctx *
+ipIfStatsTable_row_find_by_mib_index(ipIfStatsTable_mib_index * mib_idx)
+{
+ ipIfStatsTable_rowreq_ctx *rowreq_ctx;
+ oid oid_tmp[MAX_OID_LEN];
+ netsnmp_index oid_idx;
+ int rc;
+
+ /*
+ * set up storage for OID
+ */
+ oid_idx.oids = oid_tmp;
+ oid_idx.len = sizeof(oid_tmp) / sizeof(oid);
+
+ /*
+ * convert
+ */
+ rc = ipIfStatsTable_index_to_oid(&oid_idx, mib_idx);
+ if (MFD_SUCCESS != rc)
+ return NULL;
+
+ rowreq_ctx = CONTAINER_FIND(ipIfStatsTable_if_ctx.container, &oid_idx);
+
+ return rowreq_ctx;
+}
diff --git a/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_interface.h b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_interface.h
new file mode 100644
index 0000000..c43de84
--- /dev/null
+++ b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_interface.h
@@ -0,0 +1,99 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 15899 $ of $
+ *
+ * $Id:$
+ */
+/** @ingroup interface: Routines to interface to Net-SNMP
+ *
+ * \warning This code should not be modified, called directly,
+ * or used to interpret functionality. It is subject to
+ * change at any time.
+ *
+ * @{
+ */
+/*
+ * *********************************************************************
+ * *********************************************************************
+ * *********************************************************************
+ * *** ***
+ * *** NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE ***
+ * *** ***
+ * *** ***
+ * *** THIS FILE DOES NOT CONTAIN ANY USER EDITABLE CODE. ***
+ * *** ***
+ * *** ***
+ * *** THE GENERATED CODE IS INTERNAL IMPLEMENTATION, AND ***
+ * *** ***
+ * *** ***
+ * *** IS SUBJECT TO CHANGE WITHOUT WARNING IN FUTURE RELEASES. ***
+ * *** ***
+ * *** ***
+ * *********************************************************************
+ * *********************************************************************
+ * *********************************************************************
+ */
+#ifndef IPIFSTATSTABLE_INTERFACE_H
+#define IPIFSTATSTABLE_INTERFACE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#include "ipIfStatsTable.h"
+
+
+ /*
+ ********************************************************************
+ * Table declarations
+ */
+
+ /*
+ * PUBLIC interface initialization routine
+ */
+ void
+ _ipIfStatsTable_initialize_interface(ipIfStatsTable_registration *
+ user_ctx, u_long flags);
+ void
+ _ipIfStatsTable_shutdown_interface(ipIfStatsTable_registration *
+ user_ctx);
+
+ ipIfStatsTable_registration *ipIfStatsTable_registration_get(void);
+
+ ipIfStatsTable_registration
+ *ipIfStatsTable_registration_set(ipIfStatsTable_registration *
+ newreg);
+
+ netsnmp_container *ipIfStatsTable_container_get(void);
+ int ipIfStatsTable_container_size(void);
+
+ ipIfStatsTable_rowreq_ctx
+ *ipIfStatsTable_allocate_rowreq_ctx(ipIfStatsTable_data *, void *);
+ void
+ ipIfStatsTable_release_rowreq_ctx(ipIfStatsTable_rowreq_ctx *
+ rowreq_ctx);
+
+ int ipIfStatsTable_index_to_oid(netsnmp_index * oid_idx,
+ ipIfStatsTable_mib_index *
+ mib_idx);
+ int ipIfStatsTable_index_from_oid(netsnmp_index * oid_idx,
+ ipIfStatsTable_mib_index
+ * mib_idx);
+
+ /*
+ * access to certain internals. use with caution!
+ */
+ void ipIfStatsTable_valid_columns_set(netsnmp_column_info
+ *vc);
+
+ /*
+ */
+ void ipIfStatsTable_lastChange_set(u_long uptime);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* IPIFSTATSTABLE_INTERFACE_H */
+/** @} */
diff --git a/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_oids.h b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_oids.h
new file mode 100644
index 0000000..76607a9
--- /dev/null
+++ b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_oids.h
@@ -0,0 +1,122 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * : generic-table-oids.m2c 12855 2005-09-27 15:56:08Z rstory $
+ *
+ * $Id:$
+ */
+#ifndef IPIFSTATSTABLE_OIDS_H
+#define IPIFSTATSTABLE_OIDS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+ /*
+ * column number definitions for table ipIfStatsTable
+ */
+#define IPIFSTATSTABLE_OID 1,3,6,1,2,1,4,31,3
+#define IPIFSTATSTABLELASTCHANGE_OID 1,3,6,1,2,1,4,31,2
+
+#define COLUMN_IPIFSTATSIPVERSION 1
+
+#define COLUMN_IPIFSTATSIFINDEX 2
+
+#define COLUMN_IPIFSTATSINRECEIVES 3
+
+#define COLUMN_IPIFSTATSHCINRECEIVES 4
+
+#define COLUMN_IPIFSTATSINOCTETS 5
+
+#define COLUMN_IPIFSTATSHCINOCTETS 6
+
+#define COLUMN_IPIFSTATSINHDRERRORS 7
+
+#define COLUMN_IPIFSTATSINNOROUTES 8
+
+#define COLUMN_IPIFSTATSINADDRERRORS 9
+
+#define COLUMN_IPIFSTATSINUNKNOWNPROTOS 10
+
+#define COLUMN_IPIFSTATSINTRUNCATEDPKTS 11
+
+#define COLUMN_IPIFSTATSINFORWDATAGRAMS 12
+
+#define COLUMN_IPIFSTATSHCINFORWDATAGRAMS 13
+
+#define COLUMN_IPIFSTATSREASMREQDS 14
+
+#define COLUMN_IPIFSTATSREASMOKS 15
+
+#define COLUMN_IPIFSTATSREASMFAILS 16
+
+#define COLUMN_IPIFSTATSINDISCARDS 17
+
+#define COLUMN_IPIFSTATSINDELIVERS 18
+
+#define COLUMN_IPIFSTATSHCINDELIVERS 19
+
+#define COLUMN_IPIFSTATSOUTREQUESTS 20
+
+#define COLUMN_IPIFSTATSHCOUTREQUESTS 21
+
+#define COLUMN_IPIFSTATSOUTFORWDATAGRAMS 23
+
+#define COLUMN_IPIFSTATSHCOUTFORWDATAGRAMS 24
+
+#define COLUMN_IPIFSTATSOUTDISCARDS 25
+
+#define COLUMN_IPIFSTATSOUTFRAGREQDS 26
+
+#define COLUMN_IPIFSTATSOUTFRAGOKS 27
+
+#define COLUMN_IPIFSTATSOUTFRAGFAILS 28
+
+#define COLUMN_IPIFSTATSOUTFRAGCREATES 29
+
+#define COLUMN_IPIFSTATSOUTTRANSMITS 30
+
+#define COLUMN_IPIFSTATSHCOUTTRANSMITS 31
+
+#define COLUMN_IPIFSTATSOUTOCTETS 32
+
+#define COLUMN_IPIFSTATSHCOUTOCTETS 33
+
+#define COLUMN_IPIFSTATSINMCASTPKTS 34
+
+#define COLUMN_IPIFSTATSHCINMCASTPKTS 35
+
+#define COLUMN_IPIFSTATSINMCASTOCTETS 36
+
+#define COLUMN_IPIFSTATSHCINMCASTOCTETS 37
+
+#define COLUMN_IPIFSTATSOUTMCASTPKTS 38
+
+#define COLUMN_IPIFSTATSHCOUTMCASTPKTS 39
+
+#define COLUMN_IPIFSTATSOUTMCASTOCTETS 40
+
+#define COLUMN_IPIFSTATSHCOUTMCASTOCTETS 41
+
+#define COLUMN_IPIFSTATSINBCASTPKTS 42
+
+#define COLUMN_IPIFSTATSHCINBCASTPKTS 43
+
+#define COLUMN_IPIFSTATSOUTBCASTPKTS 44
+
+#define COLUMN_IPIFSTATSHCOUTBCASTPKTS 45
+
+#define COLUMN_IPIFSTATSDISCONTINUITYTIME 46
+
+#define COLUMN_IPIFSTATSREFRESHRATE 47
+
+
+#define IPIFSTATSTABLE_MIN_COL COLUMN_IPIFSTATSINRECEIVES
+#define IPIFSTATSTABLE_MAX_COL COLUMN_IPIFSTATSREFRESHRATE
+
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* IPIFSTATSTABLE_OIDS_H */
diff --git a/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.c b/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.c
index 4b1acb1..28e8538 100644
--- a/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.c
+++ b/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.c
@@ -387,11 +387,14 @@ ipSystemStatsInReceives_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
"called\n"));
netsnmp_assert(NULL != rowreq_ctx);
-
+
/*
* TODO:231:o: |-> Extract the current value of the ipSystemStatsInReceives data.
* copy (* ipSystemStatsInReceives_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINRECEIVES])
+ return MFD_SKIP;
+
(*ipSystemStatsInReceives_val_ptr) =
rowreq_ctx->data->stats.HCInReceives.low;
@@ -453,6 +456,9 @@ ipSystemStatsHCInReceives_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> copy ipSystemStatsHCInReceives data.
* get (* ipSystemStatsHCInReceives_val_ptr ).low and (* ipSystemStatsHCInReceives_val_ptr ).high from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINRECEIVES])
+ return MFD_SKIP;
+
(*ipSystemStatsHCInReceives_val_ptr).low =
rowreq_ctx->data->stats.HCInReceives.low;
(*ipSystemStatsHCInReceives_val_ptr).high =
@@ -517,6 +523,9 @@ ipSystemStatsInOctets_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> Extract the current value of the ipSystemStatsInOctets data.
* copy (* ipSystemStatsInOctets_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINOCTETS])
+ return MFD_SKIP;
+
(*ipSystemStatsInOctets_val_ptr) =
rowreq_ctx->data->stats.HCInOctets.low;
@@ -574,6 +583,9 @@ ipSystemStatsHCInOctets_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> copy ipSystemStatsHCInOctets data.
* get (* ipSystemStatsHCInOctets_val_ptr ).low and (* ipSystemStatsHCInOctets_val_ptr ).high from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINOCTETS])
+ return MFD_SKIP;
+
(*ipSystemStatsHCInOctets_val_ptr).low =
rowreq_ctx->data->stats.HCInOctets.low;
(*ipSystemStatsHCInOctets_val_ptr).high =
@@ -641,6 +653,9 @@ ipSystemStatsInHdrErrors_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> Extract the current value of the ipSystemStatsInHdrErrors data.
* copy (* ipSystemStatsInHdrErrors_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_INHDRERRORS])
+ return MFD_SKIP;
+
(*ipSystemStatsInHdrErrors_val_ptr) =
rowreq_ctx->data->stats.InHdrErrors;
@@ -702,8 +717,11 @@ ipSystemStatsInNoRoutes_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> Extract the current value of the ipSystemStatsInNoRoutes data.
* copy (* ipSystemStatsInNoRoutes_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINNOROUTES])
+ return MFD_SKIP;
+
(*ipSystemStatsInNoRoutes_val_ptr) =
- rowreq_ctx->data->stats.InNoRoutes;
+ rowreq_ctx->data->stats.HCInNoRoutes.low;
return MFD_SUCCESS;
} /* ipSystemStatsInNoRoutes_get */
@@ -769,6 +787,9 @@ ipSystemStatsInAddrErrors_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> Extract the current value of the ipSystemStatsInAddrErrors data.
* copy (* ipSystemStatsInAddrErrors_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_INADDRERRORS])
+ return MFD_SKIP;
+
(*ipSystemStatsInAddrErrors_val_ptr) =
rowreq_ctx->data->stats.InAddrErrors;
@@ -840,6 +861,9 @@ ipSystemStatsInUnknownProtos_get(ipSystemStatsTable_rowreq_ctx *
* TODO:231:o: |-> Extract the current value of the ipSystemStatsInUnknownProtos data.
* copy (* ipSystemStatsInUnknownProtos_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_INUNKNOWNPROTOS])
+ return MFD_SKIP;
+
(*ipSystemStatsInUnknownProtos_val_ptr) =
rowreq_ctx->data->stats.InUnknownProtos;
@@ -902,6 +926,9 @@ ipSystemStatsInTruncatedPkts_get(ipSystemStatsTable_rowreq_ctx *
* TODO:231:o: |-> Extract the current value of the ipSystemStatsInTruncatedPkts data.
* copy (* ipSystemStatsInTruncatedPkts_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_INTRUNCATEDPKTS])
+ return MFD_SKIP;
+
(*ipSystemStatsInTruncatedPkts_val_ptr) =
rowreq_ctx->data->stats.InTruncatedPkts;
@@ -973,6 +1000,9 @@ ipSystemStatsInForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
* TODO:231:o: |-> Extract the current value of the ipSystemStatsInForwDatagrams data.
* copy (* ipSystemStatsInForwDatagrams_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINFORWDATAGRAMS])
+ return MFD_SKIP;
+
(*ipSystemStatsInForwDatagrams_val_ptr) =
rowreq_ctx->data->stats.HCInForwDatagrams.low;
@@ -1033,6 +1063,9 @@ ipSystemStatsHCInForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
* TODO:231:o: |-> copy ipSystemStatsHCInForwDatagrams data.
* get (* ipSystemStatsHCInForwDatagrams_val_ptr ).low and (* ipSystemStatsHCInForwDatagrams_val_ptr ).high from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINFORWDATAGRAMS])
+ return MFD_SKIP;
+
(*ipSystemStatsHCInForwDatagrams_val_ptr).low =
rowreq_ctx->data->stats.HCInForwDatagrams.low;
(*ipSystemStatsHCInForwDatagrams_val_ptr).high =
@@ -1102,6 +1135,9 @@ ipSystemStatsReasmReqds_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> Extract the current value of the ipSystemStatsReasmReqds data.
* copy (* ipSystemStatsReasmReqds_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_REASMREQDS])
+ return MFD_SKIP;
+
(*ipSystemStatsReasmReqds_val_ptr) =
rowreq_ctx->data->stats.ReasmReqds;
@@ -1172,6 +1208,9 @@ ipSystemStatsReasmOKs_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> Extract the current value of the ipSystemStatsReasmOKs data.
* copy (* ipSystemStatsReasmOKs_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_REASMOKS])
+ return MFD_SKIP;
+
(*ipSystemStatsReasmOKs_val_ptr) = rowreq_ctx->data->stats.ReasmOKs;
return MFD_SUCCESS;
@@ -1242,6 +1281,9 @@ ipSystemStatsReasmFails_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> Extract the current value of the ipSystemStatsReasmFails data.
* copy (* ipSystemStatsReasmFails_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_REASMFAILS])
+ return MFD_SKIP;
+
(*ipSystemStatsReasmFails_val_ptr) =
rowreq_ctx->data->stats.ReasmFails;
@@ -1306,6 +1348,9 @@ ipSystemStatsInDiscards_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> Extract the current value of the ipSystemStatsInDiscards data.
* copy (* ipSystemStatsInDiscards_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_INDISCARDS])
+ return MFD_SKIP;
+
(*ipSystemStatsInDiscards_val_ptr) =
rowreq_ctx->data->stats.InDiscards;
@@ -1373,6 +1418,9 @@ ipSystemStatsInDelivers_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> Extract the current value of the ipSystemStatsInDelivers data.
* copy (* ipSystemStatsInDelivers_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINDELIVERS])
+ return MFD_SKIP;
+
(*ipSystemStatsInDelivers_val_ptr) =
rowreq_ctx->data->stats.HCInDelivers.low;
@@ -1430,6 +1478,9 @@ ipSystemStatsHCInDelivers_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> copy ipSystemStatsHCInDelivers data.
* get (* ipSystemStatsHCInDelivers_val_ptr ).low and (* ipSystemStatsHCInDelivers_val_ptr ).high from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINDELIVERS])
+ return MFD_SKIP;
+
(*ipSystemStatsHCInDelivers_val_ptr).low =
rowreq_ctx->data->stats.HCInDelivers.low;
(*ipSystemStatsHCInDelivers_val_ptr).high =
@@ -1495,6 +1546,9 @@ ipSystemStatsOutRequests_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> Extract the current value of the ipSystemStatsOutRequests data.
* copy (* ipSystemStatsOutRequests_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTREQUESTS])
+ return MFD_SKIP;
+
(*ipSystemStatsOutRequests_val_ptr) =
rowreq_ctx->data->stats.HCOutRequests.low;
@@ -1552,6 +1606,9 @@ ipSystemStatsHCOutRequests_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> copy ipSystemStatsHCOutRequests data.
* get (* ipSystemStatsHCOutRequests_val_ptr ).low and (* ipSystemStatsHCOutRequests_val_ptr ).high from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTREQUESTS])
+ return MFD_SKIP;
+
(*ipSystemStatsHCOutRequests_val_ptr).low =
rowreq_ctx->data->stats.HCOutRequests.low;
(*ipSystemStatsHCOutRequests_val_ptr).high =
@@ -1616,8 +1673,11 @@ ipSystemStatsOutNoRoutes_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> Extract the current value of the ipSystemStatsOutNoRoutes data.
* copy (* ipSystemStatsOutNoRoutes_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTNOROUTES])
+ return MFD_SKIP;
+
(*ipSystemStatsOutNoRoutes_val_ptr) =
- rowreq_ctx->data->stats.OutNoRoutes;
+ rowreq_ctx->data->stats.HCOutNoRoutes.low;
return MFD_SUCCESS;
} /* ipSystemStatsOutNoRoutes_get */
@@ -1691,6 +1751,9 @@ ipSystemStatsOutForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
* TODO:231:o: |-> Extract the current value of the ipSystemStatsOutForwDatagrams data.
* copy (* ipSystemStatsOutForwDatagrams_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFORWDATAGRAMS])
+ return MFD_SKIP;
+
(*ipSystemStatsOutForwDatagrams_val_ptr) =
rowreq_ctx->data->stats.HCOutForwDatagrams.low;
@@ -1751,6 +1814,9 @@ ipSystemStatsHCOutForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
* TODO:231:o: |-> copy ipSystemStatsHCOutForwDatagrams data.
* get (* ipSystemStatsHCOutForwDatagrams_val_ptr ).low and (* ipSystemStatsHCOutForwDatagrams_val_ptr ).high from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFORWDATAGRAMS])
+ return MFD_SKIP;
+
(*ipSystemStatsHCOutForwDatagrams_val_ptr).low =
rowreq_ctx->data->stats.HCOutForwDatagrams.low;
(*ipSystemStatsHCOutForwDatagrams_val_ptr).high =
@@ -1818,8 +1884,11 @@ ipSystemStatsOutDiscards_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> Extract the current value of the ipSystemStatsOutDiscards data.
* copy (* ipSystemStatsOutDiscards_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTDISCARDS])
+ return MFD_SKIP;
+
(*ipSystemStatsOutDiscards_val_ptr) =
- rowreq_ctx->data->stats.OutDiscards;
+ rowreq_ctx->data->stats.HCOutDiscards.low;
return MFD_SUCCESS;
} /* ipSystemStatsOutDiscards_get */
@@ -1887,8 +1956,11 @@ ipSystemStatsOutFragReqds_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> Extract the current value of the ipSystemStatsOutFragReqds data.
* copy (* ipSystemStatsOutFragReqds_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGREQDS])
+ return MFD_SKIP;
+
(*ipSystemStatsOutFragReqds_val_ptr) =
- rowreq_ctx->data->stats.OutFragReqds;
+ rowreq_ctx->data->stats.HCOutFragReqds.low;
return MFD_SUCCESS;
} /* ipSystemStatsOutFragReqds_get */
@@ -1953,9 +2025,11 @@ ipSystemStatsOutFragOKs_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> Extract the current value of the ipSystemStatsOutFragOKs data.
* copy (* ipSystemStatsOutFragOKs_val_ptr ) from rowreq_ctx->data
*/
- snmp_log(LOG_ERR,
- "ipSystemStatsTable node ipSystemStatsOutFragOKs not implemented: skipping\n");
- return MFD_SKIP;
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGOKS])
+ return MFD_SKIP;
+
+ (*ipSystemStatsOutFragOKs_val_ptr) =
+ rowreq_ctx->data->stats.HCOutFragOKs.low;
return MFD_SUCCESS;
} /* ipSystemStatsOutFragOKs_get */
@@ -2023,8 +2097,11 @@ ipSystemStatsOutFragFails_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> Extract the current value of the ipSystemStatsOutFragFails data.
* copy (* ipSystemStatsOutFragFails_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGFAILS])
+ return MFD_SKIP;
+
(*ipSystemStatsOutFragFails_val_ptr) =
- rowreq_ctx->data->stats.OutFragFails;
+ rowreq_ctx->data->stats.HCOutFragFails.low;
return MFD_SUCCESS;
} /* ipSystemStatsOutFragFails_get */
@@ -2089,8 +2166,11 @@ ipSystemStatsOutFragCreates_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> Extract the current value of the ipSystemStatsOutFragCreates data.
* copy (* ipSystemStatsOutFragCreates_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGCREATES])
+ return MFD_SKIP;
+
(*ipSystemStatsOutFragCreates_val_ptr) =
- rowreq_ctx->data->stats.OutFragCreates;
+ rowreq_ctx->data->stats.HCOutFragCreates.low;
return MFD_SUCCESS;
} /* ipSystemStatsOutFragCreates_get */
@@ -2152,6 +2232,9 @@ ipSystemStatsOutTransmits_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> Extract the current value of the ipSystemStatsOutTransmits data.
* copy (* ipSystemStatsOutTransmits_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTTRANSMITS])
+ return MFD_SKIP;
+
(*ipSystemStatsOutTransmits_val_ptr) =
rowreq_ctx->data->stats.HCOutTransmits.low;
@@ -2209,6 +2292,9 @@ ipSystemStatsHCOutTransmits_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> copy ipSystemStatsHCOutTransmits data.
* get (* ipSystemStatsHCOutTransmits_val_ptr ).low and (* ipSystemStatsHCOutTransmits_val_ptr ).high from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTTRANSMITS])
+ return MFD_SKIP;
+
(*ipSystemStatsHCOutTransmits_val_ptr).low =
rowreq_ctx->data->stats.HCOutTransmits.low;
(*ipSystemStatsHCOutTransmits_val_ptr).high =
@@ -2273,6 +2359,9 @@ ipSystemStatsOutOctets_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> Extract the current value of the ipSystemStatsOutOctets data.
* copy (* ipSystemStatsOutOctets_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTOCTETS])
+ return MFD_SKIP;
+
(*ipSystemStatsOutOctets_val_ptr) =
rowreq_ctx->data->stats.HCOutOctets.low;
@@ -2330,6 +2419,9 @@ ipSystemStatsHCOutOctets_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> copy ipSystemStatsHCOutOctets data.
* get (* ipSystemStatsHCOutOctets_val_ptr ).low and (* ipSystemStatsHCOutOctets_val_ptr ).high from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTOCTETS])
+ return MFD_SKIP;
+
(*ipSystemStatsHCOutOctets_val_ptr).low =
rowreq_ctx->data->stats.HCOutOctets.low;
(*ipSystemStatsHCOutOctets_val_ptr).high =
@@ -2392,6 +2484,9 @@ ipSystemStatsInMcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> Extract the current value of the ipSystemStatsInMcastPkts data.
* copy (* ipSystemStatsInMcastPkts_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINMCASTPKTS])
+ return MFD_SKIP;
+
(*ipSystemStatsInMcastPkts_val_ptr) =
rowreq_ctx->data->stats.HCInMcastPkts.low;
@@ -2448,6 +2543,9 @@ ipSystemStatsHCInMcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> copy ipSystemStatsHCInMcastPkts data.
* get (* ipSystemStatsHCInMcastPkts_val_ptr ).low and (* ipSystemStatsHCInMcastPkts_val_ptr ).high from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINMCASTPKTS])
+ return MFD_SKIP;
+
(*ipSystemStatsHCInMcastPkts_val_ptr).low =
rowreq_ctx->data->stats.HCInMcastPkts.low;
(*ipSystemStatsHCInMcastPkts_val_ptr).high =
@@ -2511,6 +2609,9 @@ ipSystemStatsInMcastOctets_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> Extract the current value of the ipSystemStatsInMcastOctets data.
* copy (* ipSystemStatsInMcastOctets_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINMCASTOCTETS])
+ return MFD_SKIP;
+
(*ipSystemStatsInMcastOctets_val_ptr) =
rowreq_ctx->data->stats.HCInMcastOctets.low;
@@ -2569,6 +2670,9 @@ ipSystemStatsHCInMcastOctets_get(ipSystemStatsTable_rowreq_ctx *
* TODO:231:o: |-> copy ipSystemStatsHCInMcastOctets data.
* get (* ipSystemStatsHCInMcastOctets_val_ptr ).low and (* ipSystemStatsHCInMcastOctets_val_ptr ).high from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINMCASTOCTETS])
+ return MFD_SKIP;
+
(*ipSystemStatsHCInMcastOctets_val_ptr).low =
rowreq_ctx->data->stats.HCInMcastOctets.low;
(*ipSystemStatsHCInMcastOctets_val_ptr).high =
@@ -2631,6 +2735,9 @@ ipSystemStatsOutMcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> Extract the current value of the ipSystemStatsOutMcastPkts data.
* copy (* ipSystemStatsOutMcastPkts_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTMCASTPKTS])
+ return MFD_SKIP;
+
(*ipSystemStatsOutMcastPkts_val_ptr) =
rowreq_ctx->data->stats.HCOutMcastPkts.low;
@@ -2687,6 +2794,9 @@ ipSystemStatsHCOutMcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> copy ipSystemStatsHCOutMcastPkts data.
* get (* ipSystemStatsHCOutMcastPkts_val_ptr ).low and (* ipSystemStatsHCOutMcastPkts_val_ptr ).high from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTMCASTPKTS])
+ return MFD_SKIP;
+
(*ipSystemStatsHCOutMcastPkts_val_ptr).low =
rowreq_ctx->data->stats.HCOutMcastPkts.low;
(*ipSystemStatsHCOutMcastPkts_val_ptr).high =
@@ -2751,6 +2861,9 @@ ipSystemStatsOutMcastOctets_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> Extract the current value of the ipSystemStatsOutMcastOctets data.
* copy (* ipSystemStatsOutMcastOctets_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTMCASTOCTETS])
+ return MFD_SKIP;
+
(*ipSystemStatsOutMcastOctets_val_ptr) =
rowreq_ctx->data->stats.HCOutMcastOctets.low;
@@ -2813,6 +2926,9 @@ ipSystemStatsHCOutMcastOctets_get(ipSystemStatsTable_rowreq_ctx *
* TODO:231:o: |-> copy ipSystemStatsHCOutMcastOctets data.
* get (* ipSystemStatsHCOutMcastOctets_val_ptr ).low and (* ipSystemStatsHCOutMcastOctets_val_ptr ).high from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTMCASTOCTETS])
+ return MFD_SKIP;
+
(*ipSystemStatsHCOutMcastOctets_val_ptr).low =
rowreq_ctx->data->stats.HCOutMcastOctets.low;
(*ipSystemStatsHCOutMcastOctets_val_ptr).high =
@@ -2875,6 +2991,9 @@ ipSystemStatsInBcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> Extract the current value of the ipSystemStatsInBcastPkts data.
* copy (* ipSystemStatsInBcastPkts_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINBCASTPKTS])
+ return MFD_SKIP;
+
(*ipSystemStatsInBcastPkts_val_ptr) =
rowreq_ctx->data->stats.HCInBcastPkts.low;
@@ -2931,6 +3050,9 @@ ipSystemStatsHCInBcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> copy ipSystemStatsHCInBcastPkts data.
* get (* ipSystemStatsHCInBcastPkts_val_ptr ).low and (* ipSystemStatsHCInBcastPkts_val_ptr ).high from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINBCASTPKTS])
+ return MFD_SKIP;
+
(*ipSystemStatsHCInBcastPkts_val_ptr).low =
rowreq_ctx->data->stats.HCInBcastPkts.low;
(*ipSystemStatsHCInBcastPkts_val_ptr).high =
@@ -2993,6 +3115,9 @@ ipSystemStatsOutBcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> Extract the current value of the ipSystemStatsOutBcastPkts data.
* copy (* ipSystemStatsOutBcastPkts_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTBCASTPKTS])
+ return MFD_SKIP;
+
(*ipSystemStatsOutBcastPkts_val_ptr) =
rowreq_ctx->data->stats.HCOutBcastPkts.low;
@@ -3049,6 +3174,9 @@ ipSystemStatsHCOutBcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> copy ipSystemStatsHCOutBcastPkts data.
* get (* ipSystemStatsHCOutBcastPkts_val_ptr ).low and (* ipSystemStatsHCOutBcastPkts_val_ptr ).high from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTBCASTPKTS])
+ return MFD_SKIP;
+
(*ipSystemStatsHCOutBcastPkts_val_ptr).low =
rowreq_ctx->data->stats.HCOutBcastPkts.low;
(*ipSystemStatsHCOutBcastPkts_val_ptr).high =
@@ -3113,6 +3241,9 @@ ipSystemStatsDiscontinuityTime_get(ipSystemStatsTable_rowreq_ctx *
* TODO:231:o: |-> Extract the current value of the ipSystemStatsDiscontinuityTime data.
* copy (* ipSystemStatsDiscontinuityTime_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_DISCONTINUITYTIME])
+ return MFD_SKIP;
+
(*ipSystemStatsDiscontinuityTime_val_ptr) =
rowreq_ctx->ipSystemStatsDiscontinuityTime;
@@ -3169,6 +3300,9 @@ ipSystemStatsRefreshRate_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
* TODO:231:o: |-> Extract the current value of the ipSystemStatsRefreshRate data.
* copy (* ipSystemStatsRefreshRate_val_ptr ) from rowreq_ctx->data
*/
+ if (!rowreq_ctx->data->stats.columnAvail[IPSYSTEMSTATSTABLE_REFRESHRATE])
+ return MFD_SKIP;
+
(*ipSystemStatsRefreshRate_val_ptr) =
rowreq_ctx->ipSystemStatsRefreshRate;
diff --git a/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access.c b/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access.c
index c1d257d..56d163d 100644
--- a/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access.c
+++ b/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_data_access.c
@@ -19,7 +19,7 @@
#include "ipSystemStatsTable_data_access.h"
-static int ipss_cache_refresh = 30;
+static int ipss_cache_refresh = IPSYSTEMSTATSTABLE_CACHE_TIMEOUT;
/** @ingroup interface
* @addtogroup data_access data_access: Routines to access data
@@ -58,61 +58,10 @@ int
ipSystemStatsTable_init_data(ipSystemStatsTable_registration *
ipSystemStatsTable_reg)
{
- static unsigned int my_columns[] = {
- COLUMN_IPSYSTEMSTATSINRECEIVES, COLUMN_IPSYSTEMSTATSHCINRECEIVES,
- /** COLUMN_IPSYSTEMSTATSINOCTETS, */
- COLUMN_IPSYSTEMSTATSHCINOCTETS,
- COLUMN_IPSYSTEMSTATSINHDRERRORS,
- /** COLUMN_IPSYSTEMSTATSINNOROUTES, */
- COLUMN_IPSYSTEMSTATSINADDRERRORS,
- COLUMN_IPSYSTEMSTATSINUNKNOWNPROTOS,
- /** COLUMN_IPSYSTEMSTATSINTRUNCATEDPKTS, */
- COLUMN_IPSYSTEMSTATSINFORWDATAGRAMS,
- COLUMN_IPSYSTEMSTATSHCINFORWDATAGRAMS,
- COLUMN_IPSYSTEMSTATSREASMREQDS,
- COLUMN_IPSYSTEMSTATSREASMOKS, COLUMN_IPSYSTEMSTATSREASMFAILS,
- COLUMN_IPSYSTEMSTATSINDISCARDS, COLUMN_IPSYSTEMSTATSINDELIVERS,
- COLUMN_IPSYSTEMSTATSHCINDELIVERS, COLUMN_IPSYSTEMSTATSOUTREQUESTS,
- COLUMN_IPSYSTEMSTATSHCOUTREQUESTS, COLUMN_IPSYSTEMSTATSOUTNOROUTES,
- /** COLUMN_IPSYSTEMSTATSOUTFORWDATAGRAMS, */
- COLUMN_IPSYSTEMSTATSHCOUTFORWDATAGRAMS,
- COLUMN_IPSYSTEMSTATSOUTDISCARDS,
- /** COLUMN_IPSYSTEMSTATSOUTFRAGREQDS, */
- COLUMN_IPSYSTEMSTATSOUTFRAGOKS, COLUMN_IPSYSTEMSTATSOUTFRAGFAILS,
- COLUMN_IPSYSTEMSTATSOUTFRAGCREATES,
- /** COLUMN_IPSYSTEMSTATSOUTTRANSMITS, */
- /** COLUMN_IPSYSTEMSTATSHCOUTTRANSMITS, */
- /** COLUMN_IPSYSTEMSTATSOUTOCTETS, */
- /** COLUMN_IPSYSTEMSTATSHCOUTOCTETS, */
- /** COLUMN_IPSYSTEMSTATSINMCASTPKTS, */
- /** COLUMN_IPSYSTEMSTATSHCINMCASTPKTS, */
- /** COLUMN_IPSYSTEMSTATSINMCASTOCTETS, */
- /** COLUMN_IPSYSTEMSTATSHCINMCASTOCTETS, */
- /** COLUMN_IPSYSTEMSTATSOUTMCASTPKTS, */
- /** COLUMN_IPSYSTEMSTATSHCOUTMCASTPKTS, */
- /** COLUMN_IPSYSTEMSTATSOUTMCASTOCTETS, */
- /** COLUMN_IPSYSTEMSTATSHCOUTMCASTOCTETS, */
- /** COLUMN_IPSYSTEMSTATSINBCASTPKTS, */
- /** COLUMN_IPSYSTEMSTATSHCINBCASTPKTS, */
- /** COLUMN_IPSYSTEMSTATSOUTBCASTPKTS, */
- /** COLUMN_IPSYSTEMSTATSHCOUTBCASTPKTS, */
- COLUMN_IPSYSTEMSTATSDISCONTINUITYTIME,
- COLUMN_IPSYSTEMSTATSREFRESHRATE
- };
- static netsnmp_column_info valid_columns;
-
DEBUGMSGTL(("verbose:ipSystemStatsTable:ipSystemStatsTable_init_data",
"called\n"));
/*
- * we only want to process certain columns, and ignore
- * anything else.
- */
- valid_columns.isRange = 0;
- valid_columns.details.list = my_columns;
- valid_columns.list_count = sizeof(my_columns) / sizeof(unsigned int);
- ipSystemStatsTable_valid_columns_set(&valid_columns);
- /*
* TODO:303:o: Initialize ipSystemStatsTable data.
*/
@@ -166,7 +115,9 @@ ipSystemStatsTable_container_init(netsnmp_container **container_ptr_ptr,
* For advanced users, you can use a custom container. If you
* do not create one, one will be created for you.
*/
- *container_ptr_ptr = NULL;
+
+
+ *container_ptr_ptr = netsnmp_container_find("ipSystemStatsTable:table_container");
if (NULL == cache) {
snmp_log(LOG_ERR,
@@ -191,6 +142,7 @@ ipSystemStatsTable_container_init(netsnmp_container **container_ptr_ptr,
(NETSNMP_CACHE_DONT_AUTO_RELEASE | NETSNMP_CACHE_DONT_FREE_EXPIRED
| NETSNMP_CACHE_DONT_FREE_BEFORE_LOAD |
NETSNMP_CACHE_AUTO_RELOAD);
+ ipSystemStatsTable_container_load(*container_ptr_ptr);
} /* ipSystemStatsTable_container_init */
/**
@@ -266,7 +218,7 @@ _add_new(netsnmp_systemstats_entry *systemstats_entry,
&& (MFD_SUCCESS ==
ipSystemStatsTable_indexes_set(rowreq_ctx,
systemstats_entry->
- ns_ip_version))) {
+ index[0]))) {
rowreq_ctx->ipSystemStatsRefreshRate = ipss_cache_refresh * 1000; /* milli-seconds */
CONTAINER_INSERT(container, rowreq_ctx);
} else {
diff --git a/include/net-snmp/data_access/ipstats.h b/include/net-snmp/data_access/ipstats.h
index 0e7aa1e..0e1bc21 100644
--- a/include/net-snmp/data_access/ipstats.h
+++ b/include/net-snmp/data_access/ipstats.h
@@ -10,6 +10,40 @@
extern "C" {
#endif
+#define IPSYSTEMSTATSTABLE_HCINRECEIVES 1
+#define IPSYSTEMSTATSTABLE_HCINOCTETS 2
+#define IPSYSTEMSTATSTABLE_INHDRERRORS 3
+#define IPSYSTEMSTATSTABLE_HCINNOROUTES 4
+#define IPSYSTEMSTATSTABLE_INADDRERRORS 5
+#define IPSYSTEMSTATSTABLE_INUNKNOWNPROTOS 6
+#define IPSYSTEMSTATSTABLE_INTRUNCATEDPKTS 7
+#define IPSYSTEMSTATSTABLE_HCINFORWDATAGRAMS 8
+#define IPSYSTEMSTATSTABLE_REASMREQDS 9
+#define IPSYSTEMSTATSTABLE_REASMOKS 10
+#define IPSYSTEMSTATSTABLE_REASMFAILS 11
+#define IPSYSTEMSTATSTABLE_INDISCARDS 12
+#define IPSYSTEMSTATSTABLE_HCINDELIVERS 13
+#define IPSYSTEMSTATSTABLE_HCOUTREQUESTS 14
+#define IPSYSTEMSTATSTABLE_HCOUTNOROUTES 15
+#define IPSYSTEMSTATSTABLE_HCOUTFORWDATAGRAMS 16
+#define IPSYSTEMSTATSTABLE_HCOUTDISCARDS 17
+#define IPSYSTEMSTATSTABLE_HCOUTFRAGREQDS 18
+#define IPSYSTEMSTATSTABLE_HCOUTFRAGOKS 19
+#define IPSYSTEMSTATSTABLE_HCOUTFRAGFAILS 20
+#define IPSYSTEMSTATSTABLE_HCOUTFRAGCREATES 21
+#define IPSYSTEMSTATSTABLE_HCOUTTRANSMITS 22
+#define IPSYSTEMSTATSTABLE_HCOUTOCTETS 23
+#define IPSYSTEMSTATSTABLE_HCINMCASTPKTS 24
+#define IPSYSTEMSTATSTABLE_HCINMCASTOCTETS 25
+#define IPSYSTEMSTATSTABLE_HCOUTMCASTPKTS 26
+#define IPSYSTEMSTATSTABLE_HCOUTMCASTOCTETS 27
+#define IPSYSTEMSTATSTABLE_HCINBCASTPKTS 28
+#define IPSYSTEMSTATSTABLE_HCOUTBCASTPKTS 29
+#define IPSYSTEMSTATSTABLE_DISCONTINUITYTIME 30
+#define IPSYSTEMSTATSTABLE_REFRESHRATE 31
+
+#define IPSYSTEMSTATSTABLE_LAST IPSYSTEMSTATSTABLE_REFRESHRATE
+
/**---------------------------------------------------------------------*/
/*
* structure definitions
@@ -20,28 +54,42 @@ extern "C" {
*/
typedef struct netsnmp_ipstats_s {
+ /* Columns of ipStatsTable. Some of them are HC for computation of the
+ * other columns, when underlying OS does not provide them.
+ * Always fill at least 32 bits, the table is periodically polled -> 32 bit
+ * overflow shall be detected and 64 bit value should be computed automatically. */
U64 HCInReceives;
U64 HCInOctets;
u_long InHdrErrors;
- u_long InNoRoutes;
+ U64 HCInNoRoutes;
u_long InAddrErrors;
u_long InUnknownProtos;
u_long InTruncatedPkts;
- U64 HCInForwDatagrams;
+
+ /* optional, can be computed from HCInNoRoutes and HCOutForwDatagrams */
+ U64 HCInForwDatagrams;
+
u_long ReasmReqds;
u_long ReasmOKs;
u_long ReasmFails;
u_long InDiscards;
U64 HCInDelivers;
U64 HCOutRequests;
- u_long OutNoRoutes;
+ U64 HCOutNoRoutes;
U64 HCOutForwDatagrams;
- u_long OutDiscards;
- u_long OutFragReqds;
- u_long OutFragOKs;
- u_long OutFragFails;
- u_long OutFragCreates;
+ U64 HCOutDiscards;
+
+ /* optional, can be computed from HCOutFragOKs + HCOutFragFails*/
+ U64 HCOutFragReqds;
+ U64 HCOutFragOKs;
+ U64 HCOutFragFails;
+ U64 HCOutFragCreates;
+
+ /* optional, can be computed from
+ * HCOutRequests +HCOutForwDatagrams + HCOutFragCreates
+ * - HCOutFragReqds - HCOutNoRoutes - HCOutDiscards */
U64 HCOutTransmits;
+
U64 HCOutOctets;
U64 HCInMcastPkts;
U64 HCInMcastOctets;
@@ -50,6 +98,8 @@ typedef struct netsnmp_ipstats_s {
U64 HCInBcastPkts;
U64 HCOutBcastPkts;
+ /* Array of available columns.*/
+ int columnAvail[IPSYSTEMSTATSTABLE_LAST+1];
} netsnmp_ipstats;
diff --git a/include/net-snmp/data_access/systemstats.h b/include/net-snmp/data_access/systemstats.h
index 53dfd51..47e1076 100644
--- a/include/net-snmp/data_access/systemstats.h
+++ b/include/net-snmp/data_access/systemstats.h
@@ -22,7 +22,11 @@ extern "C" {
typedef struct netsnmp_systemstats_s {
netsnmp_index oid_index; /* MUST BE FIRST!! for container use */
- oid ns_ip_version;
+ /*
+ * Index of the table
+ * First entry = ip version
+ * Second entry = interface index (0 for ipSystemStatsTable */
+ oid index[2];
int flags; /* for net-snmp use */
@@ -49,13 +53,15 @@ netsnmp_container * netsnmp_access_systemstats_container_init(u_int init_flags);
#define NETSNMP_ACCESS_SYSTEMSTATS_INIT_NOFLAGS 0x0000
#define NETSNMP_ACCESS_SYSTEMSTATS_INIT_ADDL_IDX_BY_ADDR 0x0001
-/*
- * load and free
+/**
+ * Load container. If the NETSNMP_ACCESS_SYSTEMSTATS_LOAD_IFTABLE is set
+ * the ipIfSystemStats table is loaded, else ipSystemStatsTable is loaded.
*/
netsnmp_container*
netsnmp_access_systemstats_container_load(netsnmp_container* container,
u_int load_flags);
#define NETSNMP_ACCESS_SYSTEMSTATS_LOAD_NOFLAGS 0x0000
+#define NETSNMP_ACCESS_SYSTEMSTATS_LOAD_IFTABLE 0x0001
void netsnmp_access_systemstats_container_free(netsnmp_container *container,
u_int free_flags);
@@ -68,7 +74,7 @@ void netsnmp_access_systemstats_container_free(netsnmp_container *container,
* create/free an entry
*/
netsnmp_systemstats_entry *
-netsnmp_access_systemstats_entry_create(int version);
+netsnmp_access_systemstats_entry_create(int version, int if_index);
void netsnmp_access_systemstats_entry_free(netsnmp_systemstats_entry * entry);
--
1.6.0.2