1scalar(3) net-snmp scalar(3)
2
3
4
6 scalar - Process scalars easily.
7
8
9 Functions
10 netsnmp_mib_handler * netsnmp_get_scalar_handler (void)
11 Creates a scalar handler calling netsnmp_create_handler with a
12 handler name defaulted to 'scalar' and access method,
13 netsnmp_scalar_helper_handler.
14 int netsnmp_register_scalar (netsnmp_handler_registration *reginfo)
15 This function registers a scalar helper handler.
16 int netsnmp_register_read_only_scalar (netsnmp_handler_registration
17 *reginfo)
18 This function registers a read only scalar helper handler.
19 int netsnmp_scalar_helper_handler (netsnmp_mib_handler *handler,
20 netsnmp_handler_registration *reginfo, netsnmp_agent_request_info
21 *reqinfo, netsnmp_request_info *requests)
22
24 Process scalars easily.
25
27 netsnmp_mib_handler* netsnmp_get_scalar_handler (void)
28 Creates a scalar handler calling netsnmp_create_handler with a handler
29 name defaulted to 'scalar' and access method,
30 netsnmp_scalar_helper_handler.
31
32 Returns:
33 Returns a pointer to a netsnmp_mib_handler struct which contains
34 the handler's name and the access method
35
36 See also:
37 netsnmp_get_scalar_handler
38
39 netsnmp_register_scalar
40
41 Definition at line 46 of file scalar.c.
42
43 References netsnmp_create_handler(), and
44 netsnmp_scalar_helper_handler().
45
46 Referenced by netsnmp_register_read_only_scalar(),
47 netsnmp_register_scalar(), and netsnmp_register_scalar_group().
48
49 int netsnmp_register_read_only_scalar (netsnmp_handler_registration *
50 reginfo)
51 This function registers a read only scalar helper handler.
52
53 This function is very similar to netsnmp_register_scalar the only
54 addition is that the 'read_only' handler is injected into the handler
55 chain prior to injecting the serialize handler and registering reginfo.
56
57 Parameters:
58 reginfo a handler registration structure which could get created
59 using netsnmp_create_handler_registration. Used to register a read
60 only scalar helper handler.
61
62 Returns:
63 MIB_REGISTERED_OK is returned if the registration was a success.
64 Failures are MIB_REGISTRATION_FAILURE and
65 MIB_DUPLICATE_REGISTRATION.
66
67 See also:
68 netsnmp_register_scalar
69
70 netsnmp_get_scalar_handler
71
72 Definition at line 109 of file scalar.c.
73
74 References netsnmp_get_instance_handler(),
75 netsnmp_get_read_only_handler(), netsnmp_get_scalar_handler(),
76 netsnmp_inject_handler(), netsnmp_register_serialize(),
77 netsnmp_handler_registration_s::rootoid, and
78 netsnmp_handler_registration_s::rootoid_len.
79
80 int netsnmp_register_scalar (netsnmp_handler_registration * reginfo)
81 This function registers a scalar helper handler.
82
83 The registered OID, reginfo->rootoid, space is extended for the
84 instance subid using realloc() but the reginfo->rootoid_len length is
85 not extended just yet. .This function subsequently injects the
86 instance, scalar, and serialize helper handlers before actually
87 registering reginfo.
88
89 Each handler is injected/pushed to the top of the handler chain list
90 and will be processed last in first out, LIFO.
91
92 Parameters:
93 reginfo a handler registration structure which could get created
94 using netsnmp_create_handler_registration. Used to register a
95 scalar helper handler.
96
97 Returns:
98 MIB_REGISTERED_OK is returned if the registration was a success.
99 Failures are MIB_REGISTRATION_FAILURE and
100 MIB_DUPLICATE_REGISTRATION.
101
102 See also:
103 netsnmp_register_read_only_scalar
104
105 netsnmp_get_scalar_handler
106
107 Definition at line 74 of file scalar.c.
108
109 References netsnmp_get_instance_handler(),
110 netsnmp_get_scalar_handler(), netsnmp_inject_handler(),
111 netsnmp_register_serialize(), netsnmp_handler_registration_s::rootoid,
112 and netsnmp_handler_registration_s::rootoid_len.
113
114 Referenced by netsnmp_register_watched_scalar(), and
115 netsnmp_watched_timestamp_register().
116
117
118
119Version 5.4 24 Nov 2006 scalar(3)