File: mib_module.h

package info (click to toggle)
snmp 3.6-1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 1,284 kB
  • ctags: 1,929
  • sloc: ansic: 18,710; sh: 585; makefile: 311
file content (116 lines) | stat: -rw-r--r-- 2,779 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/*
 * mib_module.h --
 *
 * This file contains the list of the system dependent MIB modules.
 *
 * Copyright (c) 1997
 *
 * Erik Schoenfelder		TU Braunschweig, Germany
 *
 * 
 * Permission to use, copy, modify, and distribute this software and its 
 * documentation for any purpose and without fee is hereby granted, 
 * provided that the above copyright notice appear in all copies and that
 * both that copyright notice and this permission notice appear in 
 * supporting documentation, and that the name of CMU not be
 * used in advertising or publicity pertaining to distribution of the
 * software without specific, written prior permission.  
 * 
 * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
 * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
 * THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
 * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
 * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
 * SOFTWARE.
 * 
 * 
 * Adding your mib-module to the agent:
 *
 * - create a yourmib.c file containing your code.
 *   see mib_example.c for a skeleton.
 *
 * - add your module enclosing define to this header.
 *
 * - add your module initialization to mib_module.c.
 *
 * - add the module to apps/Makefile (or apps/Makefile.in and rerun
 *   configure) to include the module in compilation.
 */

#ifndef MIB_MODULE_H
#define MIB_MODULE_H

#include <sys/types.h>

#include "mib.h"
#include "asn1.h"
#include "snmp.h"
#include "snmp_impl.h"

#include "snmp_vars.h"

/*
 * Standard MIB modules:
 */

extern void snmp_vars_init _ANSI_ARGS_((void));

/*
 * Platforms which implement ident mib:
 */

#ifdef linux
#define HAVE_IDENT
#include "ident_vars.h"
#endif

/*
 * Platforms which implement host recources mib:
 */

#ifdef linux
#define HAVE_HR
#include "hr_vars.h"
#endif

/*
 * Linux specific mib module (still small, but more to come):
 */

#ifdef linux
#define HAVE_LINUX
#include "linux_vars.h"
#endif

/* 
 * The example module.
 * (but of course, we don't want the example per default included :-)
 */

#ifdef HAVE_EXAMPLE
extern void examp_init _ANSI_ARGS_((void));
#endif




/*
 * Function to register a module. Called from the modules
 * specific initialization routine.
 */

extern void mib_register _ANSI_ARGS_((oid *oid_base,
				      int oid_base_len,
				      struct variable *mib_variables,
				      int mib_variables_len, 
				      int mib_variables_width));

/*
 * The initialization function which calls the module specific
 * initialization functions during agent startup.
 */

extern void init_modules _ANSI_ARGS_((void));

#endif /* MIB_MODULE_H */