1old_api(3) net-snmp old_api(3)
2
3
4
6 old_api - Calls mib module code written in the old style of code.
7
8
9 Functions
10 netsnmp_mib_handler * get_old_api_handler (void)
11 returns a old_api handler that should be the final calling handler.
12 int netsnmp_register_old_api (const char *moduleName, struct variable
13 *var, size_t varsize, size_t numvars, oid *mibloc, size_t
14 mibloclen, int priority, int range_subid, oid range_ubound,
15 netsnmp_session *ss, const char *context, int timeout, int flags)
16 Registers an old API set into the mib tree.
17 int netsnmp_register_mib_table_row (const char *moduleName, struct
18 variable *var, size_t varsize, size_t numvars, oid *mibloc, size_t
19 mibloclen, int priority, int var_subid, netsnmp_session *ss, const
20 char *context, int timeout, int flags)
21 registers a row within a mib table
22 int netsnmp_old_api_helper (netsnmp_mib_handler *handler,
23 netsnmp_handler_registration *reginfo, netsnmp_agent_request_info
24 *reqinfo, netsnmp_request_info *requests)
25 implements the old_api handler
26
28 Calls mib module code written in the old style of code.
29
30 This is a backwards compatilibity module that allows code written in
31 the old API to be run under the new handler based architecture. Use it
32 by calling netsnmp_register_old_api().
33
35 netsnmp_mib_handler* get_old_api_handler (void)
36 returns a old_api handler that should be the final calling handler.
37
38 Don't use this function. Use the netsnmp_register_old_api() function
39 instead.
40
41 Definition at line 37 of file old_api.c.
42
43 References netsnmp_create_handler(), and netsnmp_old_api_helper().
44
45 Referenced by netsnmp_register_old_api().
46
47 int netsnmp_old_api_helper (netsnmp_mib_handler * handler,
48 netsnmp_handler_registration * reginfo, netsnmp_agent_request_info *
49 reqinfo, netsnmp_request_info * requests)
50 implements the old_api handler
51
52 Definition at line 226 of file old_api.c.
53
54 References variable::acl, variable::findVar, variable::magic,
55 MIB_CLIENTS_ARE_EVIL, netsnmp_agent_request_info_s::mode,
56 netsnmp_mib_handler_s::myvoid, variable_list::name, variable::name,
57 variable_list::name_length, variable::namelen,
58 netsnmp_request_info_s::next, NULL, netsnmp_request_info_s::requestvb,
59 netsnmp_handler_registration_s::rootoid,
60 netsnmp_handler_registration_s::rootoid_len, and variable::type.
61
62 Referenced by get_old_api_handler().
63
64 int netsnmp_register_mib_table_row (const char * moduleName, struct
65 variable * var, size_t varsize, size_t numvars, oid * mibloc, size_t
66 mibloclen, int priority, int var_subid, netsnmp_session * ss, const
67 char * context, int timeout, int flags)
68 registers a row within a mib table
69
70 Definition at line 107 of file old_api.c.
71
72 int netsnmp_register_old_api (const char * moduleName, struct variable *
73 var, size_t varsize, size_t numvars, oid * mibloc, size_t mibloclen,
74 int priority, int range_subid, oid range_ubound, netsnmp_session * ss,
75 const char * context, int timeout, int flags)
76 Registers an old API set into the mib tree.
77
78 Functionally this mimics the old register_mib_context() function (and
79 in fact the new register_mib_context() function merely calls this new
80 old_api one).
81
82 netsnmp_handler_registration_free(reginfo); already freed
83
84 Definition at line 48 of file old_api.c.
85
86 References netsnmp_handler_registration_s::contextName,
87 get_old_api_handler(), netsnmp_handler_registration_s::handler,
88 HANDLER_CAN_RWRITE, netsnmp_handler_registration_s::handlerName,
89 memdup(), netsnmp_handler_registration_s::modes,
90 netsnmp_mib_handler_s::myvoid, netsnmp_register_handler(), NULL,
91 netsnmp_handler_registration_s::priority,
92 netsnmp_handler_registration_s::range_subid,
93 netsnmp_handler_registration_s::range_ubound,
94 netsnmp_handler_registration_s::rootoid,
95 netsnmp_handler_registration_s::rootoid_len, SNMP_FREE,
96 SNMP_MALLOC_TYPEDEF, and netsnmp_handler_registration_s::timeout.
97
98 Referenced by register_mib_context().
99
100
101
102Version 5.4 24 Nov 2006 old_api(3)