diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2014-11-19 19:47:20 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2014-11-19 19:47:20 +0200 |
commit | b3759f3dd958e453dfa3a12e6ab3cb3a48430cc2 (patch) | |
tree | 451a85042d17750716ace41830edbec5a8af5643 /src/varnish_mib.mib2c | |
parent | ea3cf7a61094789123c30d8ff5edfd0e43b4fe38 (diff) | |
download | varnish-mib-b3759f3dd958e453dfa3a12e6ab3cb3a48430cc2.tar.gz varnish-mib-b3759f3dd958e453dfa3a12e6ab3cb3a48430cc2.tar.bz2 |
Use 64-bit counters
* src/Makefile.am (varnish_mib.c): Depend on VARNISH-MIB.txt
* src/VARNISH-MIB.txt: Change all counters to 64 bit
Fix time-stamp-format variable.
* src/varnish_mib.mib2c: Handle ASN_COUNTER64
Diffstat (limited to 'src/varnish_mib.mib2c')
-rw-r--r-- | src/varnish_mib.mib2c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/varnish_mib.mib2c b/src/varnish_mib.mib2c index 6be8cd7..1bb91ce 100644 --- a/src/varnish_mib.mib2c +++ b/src/varnish_mib.mib2c @@ -131,11 +131,22 @@ handle_$i(netsnmp_mib_handler *handler, @if $varnish_type eq 'MAIN'@ { struct VSC_C_main const *st = VSC_Main(vd, NULL); + @if $i.type eq 'ASN_COUNTER64'@ + struct counter64 ctr; + if (!st) + return SNMP_ERR_NOSUCHNAME; + ctr.high = st->$varnish_member >> 32; + ctr.low = st->$varnish_member & 0xffffffff; + snmp_set_var_typed_value(requests->requestvb, $i.type, + &ctr, + sizeof(ctr)); + @else@ if (!st) return SNMP_ERR_NOSUCHNAME; snmp_set_var_typed_value(requests->requestvb, $i.type, &st->$varnish_member, sizeof(st->$varnish_member)); + @end@ } @elsif $varnish_type eq 'STRING'@ { |