aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2014-11-16 16:10:47 +0200
committerSergey Poznyakoff <gray@gnu.org>2014-11-16 17:11:30 +0200
commit7b7cb3c95e9fe5af0072d290e39cda9fa0f85b60 (patch)
tree3164cbffc4c251983a769aee719b506fc5bc4d33
parent2303726f29a4e4724301f36d4c12037a1b516a35 (diff)
downloadvarnish-mib-7b7cb3c95e9fe5af0072d290e39cda9fa0f85b60.tar.gz
varnish-mib-7b7cb3c95e9fe5af0072d290e39cda9fa0f85b60.tar.bz2
Minor changes
-rw-r--r--src/varnish_mib.mib2c34
1 files changed, 22 insertions, 12 deletions
diff --git a/src/varnish_mib.mib2c b/src/varnish_mib.mib2c
index 55b57e5..798fc53 100644
--- a/src/varnish_mib.mib2c
+++ b/src/varnish_mib.mib2c
@@ -13,18 +13,25 @@
13# 13#
14# You should have received a copy of the GNU General Public License 14# You should have received a copy of the GNU General Public License
15# along with varnish-mib. If not, see <http://www.gnu.org/licenses/>. 15# along with varnish-mib. If not, see <http://www.gnu.org/licenses/>.
16
17# This macro inserts a comment instructing Emacs and vi that
18# this file is read-only. It must be called at the end of the file.
19@define ROCOM@
20/* Local variables:
21 buffer-read-only: t
22 End:
23 vi: set ro:
24*/
25@enddefine@
16@open ${name}@ 26@open ${name}@
17/* 27/* THIS FILE IS GENERATED AUTOMATICALLY. PLEASE DO NOT EDIT. */
18 * Note: this file originally auto-generated by mib2c using
19 * mib2c.varnish.conf
20 */
21 28
22#include <config.h> 29#include <config.h>
23#include <stdlib.h> 30#include <stdlib.h>
24#include <stdint.h> 31#include <stdint.h>
25 32
26#include "vapi/vsc.h" 33#include <vapi/vsc.h>
27#include "vapi/vsm.h" 34#include <vapi/vsm.h>
28 35
29#include <net-snmp/net-snmp-config.h> 36#include <net-snmp/net-snmp-config.h>
30#include <net-snmp/net-snmp-includes.h> 37#include <net-snmp/net-snmp-includes.h>
@@ -89,6 +96,13 @@ print "$vars{'modulename'}\n";
890; 960;
90@endperl@ 97@endperl@
91 98
99/* Variable handlers.
100
101 An instance handler only hands us one request at a time, unwrapping
102 any eventual GETNEXT requests. All OIDs are read-only, so the handlers
103 should only handle GET requests.
104*/
105
92@foreach $i scalar@ 106@foreach $i scalar@
93static int 107static int
94handle_$i(netsnmp_mib_handler *handler, 108handle_$i(netsnmp_mib_handler *handler,
@@ -97,12 +111,7 @@ handle_$i(netsnmp_mib_handler *handler,
97 netsnmp_request_info *requests) 111 netsnmp_request_info *requests)
98{ 112{
99 uint32_t val; 113 uint32_t val;
100 /* We are never called for a GETNEXT if it's registered as a 114
101 "instance", as it's "magically" handled for us. */
102
103 /* an instance handler also only hands us one request at a time, so
104 we don't need to loop over a list of requests; we'll only get one.
105 */
106 @startperl@ 115 @startperl@
107 &{$vars{'varnish_translate'}}($vars{'i'}); 116 &{$vars{'varnish_translate'}}($vars{'i'});
108 @endperl@ 117 @endperl@
@@ -153,3 +162,4 @@ deinit_$modulename(void)
153{ 162{
154 varnish_snmp_deinit(); 163 varnish_snmp_deinit();
155} 164}
165@calldefine ROCOM@

Return to:

Send suggestions and report system problems to the System administrator.