|
|
2908c4 |
diff -urNp orig/agent/mibgroup/sctp-mib/sctpScalars_linux.c new/agent/mibgroup/sctp-mib/sctpScalars_linux.c
|
|
|
2908c4 |
--- orig/agent/mibgroup/sctp-mib/sctpScalars_linux.c 2016-08-25 09:18:55.239801239 +0200
|
|
|
2908c4 |
+++ new/agent/mibgroup/sctp-mib/sctpScalars_linux.c 2016-08-25 10:37:02.416999975 +0200
|
|
|
2908c4 |
@@ -84,17 +84,17 @@ netsnmp_access_sctp_stats_arch_load(nets
|
|
|
2908c4 |
return -1;
|
|
|
2908c4 |
}
|
|
|
2908c4 |
|
|
|
2908c4 |
- if (line[6] == 'r')
|
|
|
2908c4 |
+ if (line[4] == 'C' && line[8] == 'E')
|
|
|
2908c4 |
sctp_stats->curr_estab = value;
|
|
|
2908c4 |
- else if (line[5] == 'c')
|
|
|
2908c4 |
+ else if (line[4] == 'A' && line[10] == 'E')
|
|
|
2908c4 |
sctp_stats->active_estabs = value;
|
|
|
2908c4 |
- else if (line[4] == 'P')
|
|
|
2908c4 |
+ else if (line[4] == 'P' && line[11] == 'E')
|
|
|
2908c4 |
sctp_stats->passive_estabs = value;
|
|
|
2908c4 |
- else if (line[5] == 'b')
|
|
|
2908c4 |
+ else if (line[4] == 'a' && line[5] == 'b')
|
|
|
2908c4 |
sctp_stats->aborteds = value;
|
|
|
2908c4 |
- else if (line[4] == 'S')
|
|
|
2908c4 |
+ else if (line[4] == 'S' && line[5] == 'h')
|
|
|
2908c4 |
sctp_stats->shutdowns = value;
|
|
|
2908c4 |
- else if (line[8] == 'f')
|
|
|
2908c4 |
+ else if (line[4] == 'O' && line[9] == 'B')
|
|
|
2908c4 |
sctp_stats->out_of_blues = value;
|
|
|
2908c4 |
else if (line[6] == 'e')
|
|
|
2908c4 |
sctp_stats->checksum_errors = value;
|
|
|
2908c4 |
@@ -113,7 +113,7 @@ netsnmp_access_sctp_stats_arch_load(nets
|
|
|
2908c4 |
sctp_stats->out_sctp_packs.high = value >> 32;
|
|
|
2908c4 |
} else
|
|
|
2908c4 |
ret = -1;
|
|
|
2908c4 |
- } else {
|
|
|
2908c4 |
+ } else if (line[4] == 'I'){
|
|
|
2908c4 |
if (line[6] == 'C') {
|
|
|
2908c4 |
sctp_stats->in_ctrl_chunks.low = value & 0xffffffff;
|
|
|
2908c4 |
sctp_stats->in_ctrl_chunks.high = value >> 32;
|
|
|
2908c4 |
@@ -123,24 +123,27 @@ netsnmp_access_sctp_stats_arch_load(nets
|
|
|
2908c4 |
} else if (line[6] == 'U') {
|
|
|
2908c4 |
sctp_stats->in_unorder_chunks.low = value & 0xffffffff;
|
|
|
2908c4 |
sctp_stats->in_unorder_chunks.high = value >> 32;
|
|
|
2908c4 |
- } else if (line[4] == 'F') {
|
|
|
2908c4 |
- sctp_stats->frag_usr_msgs.low = value & 0xffffffff;
|
|
|
2908c4 |
- sctp_stats->frag_usr_msgs.high = value >> 32;
|
|
|
2908c4 |
- } else if (line[4] == 'R') {
|
|
|
2908c4 |
- sctp_stats->reasm_usr_msgs.low = value & 0xffffffff;
|
|
|
2908c4 |
- sctp_stats->reasm_usr_msgs.high = value >> 32;
|
|
|
2908c4 |
} else if (line[6] == 'S') {
|
|
|
2908c4 |
sctp_stats->in_sctp_packs.low = value & 0xffffffff;
|
|
|
2908c4 |
sctp_stats->in_sctp_packs.high = value >> 32;
|
|
|
2908c4 |
- } else
|
|
|
2908c4 |
+ } else {
|
|
|
2908c4 |
ret = -1;
|
|
|
2908c4 |
+ }
|
|
|
2908c4 |
+ } else if (line[4] == 'F' && line[8] == 'U') {
|
|
|
2908c4 |
+ sctp_stats->frag_usr_msgs.low = value & 0xffffffff;
|
|
|
2908c4 |
+ sctp_stats->frag_usr_msgs.high = value >> 32;
|
|
|
2908c4 |
+ } else if (line[4] == 'R') {
|
|
|
2908c4 |
+ sctp_stats->reasm_usr_msgs.low = value & 0xffffffff;
|
|
|
2908c4 |
+ sctp_stats->reasm_usr_msgs.high = value >> 32;
|
|
|
2908c4 |
+ } else if (line[4] == 'T') {
|
|
|
2908c4 |
+ } else {
|
|
|
2908c4 |
+ ret = -1;
|
|
|
2908c4 |
}
|
|
|
2908c4 |
|
|
|
2908c4 |
if (ret < 0) {
|
|
|
2908c4 |
DEBUGMSGTL(("sctp:scalars:stats:arch_load",
|
|
|
2908c4 |
- "Unknown entry!'\n"));
|
|
|
2908c4 |
- fclose(f);
|
|
|
2908c4 |
- return ret;
|
|
|
2908c4 |
+ "Unknown entry: %s\n", line));
|
|
|
2908c4 |
+ ret = 0;
|
|
|
2908c4 |
}
|
|
|
2908c4 |
}
|
|
|
2908c4 |
|