summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org>2014-11-16 14:10:47 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2014-11-16 15:11:30 (GMT)
commit7b7cb3c95e9fe5af0072d290e39cda9fa0f85b60 (patch) (side-by-side diff)
tree3164cbffc4c251983a769aee719b506fc5bc4d33
parent2303726f29a4e4724301f36d4c12037a1b516a35 (diff)
downloadvarnish-mib-7b7cb3c95e9fe5af0072d290e39cda9fa0f85b60.tar.gz
varnish-mib-7b7cb3c95e9fe5af0072d290e39cda9fa0f85b60.tar.bz2
Minor changes
Diffstat (more/less context) (ignore whitespace 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 @@
#
# You should have received a copy of the GNU General Public License
# along with varnish-mib. If not, see <http://www.gnu.org/licenses/>.
+
+# This macro inserts a comment instructing Emacs and vi that
+# this file is read-only. It must be called at the end of the file.
+@define ROCOM@
+/* Local variables:
+ buffer-read-only: t
+ End:
+ vi: set ro:
+*/
+@enddefine@
@open ${name}@
-/*
- * Note: this file originally auto-generated by mib2c using
- * mib2c.varnish.conf
- */
+/* THIS FILE IS GENERATED AUTOMATICALLY. PLEASE DO NOT EDIT. */
#include <config.h>
#include <stdlib.h>
#include <stdint.h>
-#include "vapi/vsc.h"
-#include "vapi/vsm.h"
+#include <vapi/vsc.h>
+#include <vapi/vsm.h>
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
@@ -89,6 +96,13 @@ print "$vars{'modulename'}\n";
0;
@endperl@
+/* Variable handlers.
+
+ An instance handler only hands us one request at a time, unwrapping
+ any eventual GETNEXT requests. All OIDs are read-only, so the handlers
+ should only handle GET requests.
+*/
+
@foreach $i scalar@
static int
handle_$i(netsnmp_mib_handler *handler,
@@ -97,12 +111,7 @@ handle_$i(netsnmp_mib_handler *handler,
netsnmp_request_info *requests)
{
uint32_t val;
- /* We are never called for a GETNEXT if it's registered as a
- "instance", as it's "magically" handled for us. */
-
- /* an instance handler also only hands us one request at a time, so
- we don't need to loop over a list of requests; we'll only get one.
- */
+
@startperl@
&{$vars{'varnish_translate'}}($vars{'i'});
@endperl@
@@ -153,3 +162,4 @@ deinit_$modulename(void)
{
varnish_snmp_deinit();
}
+@calldefine ROCOM@

Return to:

Send suggestions and report system problems to the System administrator.