summaryrefslogtreecommitdiff
path: root/cleopatre/application/spidnetsnmp/man/netsnmp_scalar.3
blob: cb1ed104d5bceb24310eeb7894a70a9e95924270 (plain)
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
.TH "scalar" 3 "5 Sep 2008" "Version 5.4.2" "net-snmp" \" -*- nroff -*-
.ad l
.nh
.SH NAME
scalar \- Process scalars easily.  

.PP
.SS "Functions"

.in +1c
.ti -1c
.RI "\fBnetsnmp_mib_handler\fP * \fBnetsnmp_get_scalar_handler\fP (void)"
.br
.RI "\fICreates a scalar handler calling netsnmp_create_handler with a handler name defaulted to 'scalar' and access method, netsnmp_scalar_helper_handler. \fP"
.ti -1c
.RI "int \fBnetsnmp_register_scalar\fP (\fBnetsnmp_handler_registration\fP *reginfo)"
.br
.RI "\fIThis function registers a scalar helper handler. \fP"
.ti -1c
.RI "int \fBnetsnmp_register_read_only_scalar\fP (\fBnetsnmp_handler_registration\fP *reginfo)"
.br
.RI "\fIThis function registers a read only scalar helper handler. \fP"
.ti -1c
.RI "int \fBnetsnmp_scalar_helper_handler\fP (\fBnetsnmp_mib_handler\fP *handler, \fBnetsnmp_handler_registration\fP *reginfo, \fBnetsnmp_agent_request_info\fP *reqinfo, \fBnetsnmp_request_info\fP *requests)"
.br
.in -1c
.SH "Detailed Description"
.PP 
Process scalars easily. 
.PP
.SH "Function Documentation"
.PP 
.SS "\fBnetsnmp_mib_handler\fP* netsnmp_get_scalar_handler (void)"
.PP
Creates a scalar handler calling netsnmp_create_handler with a handler name defaulted to 'scalar' and access method, netsnmp_scalar_helper_handler. 
.PP
\fBReturns:\fP
.RS 4
Returns a pointer to a netsnmp_mib_handler struct which contains the handler's name and the access method
.RE
.PP
\fBSee also:\fP
.RS 4
\fBnetsnmp_get_scalar_handler\fP 
.PP
\fBnetsnmp_register_scalar\fP 
.RE
.PP

.PP
Definition at line 46 of file scalar.c.
.PP
References netsnmp_create_handler(), and netsnmp_scalar_helper_handler().
.PP
Referenced by netsnmp_register_read_only_scalar(), netsnmp_register_scalar(), and netsnmp_register_scalar_group().
.SS "int netsnmp_register_read_only_scalar (\fBnetsnmp_handler_registration\fP * reginfo)"
.PP
This function registers a read only scalar helper handler. 
.PP
This function is very similar to netsnmp_register_scalar the only addition is that the 'read_only' handler is injected into the handler chain prior to injecting the serialize handler and registering reginfo.
.PP
\fBParameters:\fP
.RS 4
\fIreginfo\fP a handler registration structure which could get created using netsnmp_create_handler_registration. Used to register a read only scalar helper handler.
.RE
.PP
\fBReturns:\fP
.RS 4
MIB_REGISTERED_OK is returned if the registration was a success. Failures are MIB_REGISTRATION_FAILURE and MIB_DUPLICATE_REGISTRATION.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBnetsnmp_register_scalar\fP 
.PP
\fBnetsnmp_get_scalar_handler\fP 
.RE
.PP

.PP
Definition at line 109 of file scalar.c.
.PP
References netsnmp_get_instance_handler(), netsnmp_get_read_only_handler(), netsnmp_get_scalar_handler(), netsnmp_inject_handler(), netsnmp_register_serialize(), netsnmp_handler_registration_s::rootoid, and netsnmp_handler_registration_s::rootoid_len.
.SS "int netsnmp_register_scalar (\fBnetsnmp_handler_registration\fP * reginfo)"
.PP
This function registers a scalar helper handler. 
.PP
The registered OID, reginfo->rootoid, space is extended for the instance subid using realloc() but the reginfo->rootoid_len length is not extended just yet. .This function subsequently injects the instance, scalar, and serialize helper handlers before actually registering reginfo.
.PP
Each handler is injected/pushed to the top of the handler chain list and will be processed last in first out, LIFO.
.PP
\fBParameters:\fP
.RS 4
\fIreginfo\fP a handler registration structure which could get created using netsnmp_create_handler_registration. Used to register a scalar helper handler.
.RE
.PP
\fBReturns:\fP
.RS 4
MIB_REGISTERED_OK is returned if the registration was a success. Failures are MIB_REGISTRATION_FAILURE and MIB_DUPLICATE_REGISTRATION.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBnetsnmp_register_read_only_scalar\fP 
.PP
\fBnetsnmp_get_scalar_handler\fP 
.RE
.PP

.PP
Definition at line 74 of file scalar.c.
.PP
References netsnmp_get_instance_handler(), netsnmp_get_scalar_handler(), netsnmp_inject_handler(), netsnmp_register_serialize(), netsnmp_handler_registration_s::rootoid, and netsnmp_handler_registration_s::rootoid_len.
.PP
Referenced by netsnmp_register_watched_scalar(), and netsnmp_watched_timestamp_register().