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