~ubuntu-branches/ubuntu/gutsy/net-snmp/gutsy-security

« back to all changes in this revision

Viewing changes to man/netsnmp_default_store.3

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2004-09-13 12:06:21 UTC
  • Revision ID: james.westby@ubuntu.com-20040913120621-g952ntonlleihcvm
Tags: upstream-5.1.1
ImportĀ upstreamĀ versionĀ 5.1.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.TH "storage space for defaults" 3 "19 Mar 2004" "net-snmp" \" -*- nroff -*-
 
2
.ad l
 
3
.nh
 
4
.SH NAME
 
5
storage space for defaults \- The purpose of the default storage is three-fold:. 
 
6
More...
 
7
.SS "Data Structures"
 
8
 
 
9
.in +1c
 
10
.ti -1c
 
11
.RI "struct \fBnetsnmp_ds_read_config_s\fP"
 
12
.br
 
13
.in -1c
 
14
.SS "Functions"
 
15
 
 
16
.in +1c
 
17
.ti -1c
 
18
.RI "int \fBnetsnmp_ds_set_boolean\fP (int storeid, int which, int value)"
 
19
.br
 
20
.RI "\fIStores 'true' or 'false' given an int value for value into netsnmp_ds_booleans[store][which] slot.\fP"
 
21
.in -1c
 
22
.SH "DETAILED DESCRIPTION"
 
23
.PP 
 
24
The purpose of the default storage is three-fold:.
 
25
.PP
 
26
1) To create a global storage space without creating a whole bunch of globally accessible variables or a whole bunch of access functions to work with more privately restricted variables.
 
27
.PP
 
28
2) To provide a single location where the thread lock- ing needs to be implemented. At the time of this writing, however, thread locking is not yet in place.
 
29
.PP
 
30
3) To reduce the number of cross dependencies between code pieces that may or may not be linked together in the long run. This provides for a single loca- tion in which configuration data, for example, can be stored for a separate section of code that may not be linked in to the application in question.
 
31
.PP
 
32
The functions defined here implement these goals.
 
33
.PP
 
34
Currently, three data types are supported: booleans, inte- gers, and strings. Each of these data types have separate storage spaces. In addition, the storage space for each data type is divided further by the application level. Currently, there are two storage spaces. The first is reserved for the SNMP library itself. The second is intended for use in applications and is not modified or checked by the library, and, therefore, this is the space usable by you.
 
35
.PP
 
36
These definitions correspond with the 'storid' argument to the API
 
37
.TP
 
38
define NETSNMP_DS_LIBRARY_ID 0
 
39
.TP
 
40
define NETSNMP_DS_APPLICATION_ID 1
 
41
.TP
 
42
define NETSNMP_DS_TOKEN_ID 2
 
43
.PP
 
44
These definitions correspond with the 'which' argument to the API, when the storeid argument is NETSNMP_DS_LIBRARY_ID
 
45
.PP
 
46
library booleans
 
47
.PP
 
48
.TP
 
49
define NETSNMP_DS_LIB_MIB_ERRORS 0
 
50
.TP
 
51
define NETSNMP_DS_LIB_SAVE_MIB_DESCRS 1
 
52
.TP
 
53
define NETSNMP_DS_LIB_MIB_COMMENT_TERM 2
 
54
.TP
 
55
define NETSNMP_DS_LIB_MIB_PARSE_LABEL 3
 
56
.TP
 
57
define NETSNMP_DS_LIB_DUMP_PACKET 4
 
58
.TP
 
59
define NETSNMP_DS_LIB_LOG_TIMESTAMP 5
 
60
.TP
 
61
define NETSNMP_DS_LIB_DONT_READ_CONFIGS 6
 
62
.TP
 
63
define NETSNMP_DS_LIB_MIB_REPLACE 7 replace objects from latest module 
 
64
.TP
 
65
define NETSNMP_DS_LIB_PRINT_NUMERIC_ENUM 8 print only numeric enum values
 
66
.TP
 
67
define NETSNMP_DS_LIB_PRINT_NUMERIC_OIDS 9 print only numeric enum values 
 
68
.TP
 
69
define NETSNMP_DS_LIB_DONT_BREAKDOWN_OIDS 10 dont print oid indexes specially 
 
70
.TP
 
71
define NETSNMP_DS_LIB_ALARM_DONT_USE_SIG 11 don't use the alarm() signal 
 
72
.TP
 
73
define NETSNMP_DS_LIB_PRINT_FULL_OID 12 print fully qualified oids 
 
74
.TP
 
75
define NETSNMP_DS_LIB_QUICK_PRINT 13 print very brief output for parsing
 
76
.TP
 
77
define NETSNMP_DS_LIB_RANDOM_ACCESS 14 random access to oid labels
 
78
.TP
 
79
define NETSNMP_DS_LIB_REGEX_ACCESS 15 regex matching to oid labels
 
80
.TP
 
81
define NETSNMP_DS_LIB_DONT_CHECK_RANGE 16 don't check values for ranges on send
 
82
.TP
 
83
define NETSNMP_DS_LIB_NO_TOKEN_WARNINGS 17 no warn about unknown config tokens
 
84
.TP
 
85
define NETSNMP_DS_LIB_NUMERIC_TIMETICKS 18 print timeticks as a number 
 
86
.TP
 
87
define NETSNMP_DS_LIB_ESCAPE_QUOTES 19 shell escape quote marks in oids
 
88
.TP
 
89
define NETSNMP_DS_LIB_REVERSE_ENCODE 20 encode packets from back to front
 
90
.TP
 
91
define NETSNMP_DS_LIB_PRINT_BARE_VALUE 21 just print value (not OID = value)
 
92
.TP
 
93
define NETSNMP_DS_LIB_EXTENDED_INDEX 22 print extended index format [x1][x2]
 
94
.TP
 
95
define NETSNMP_DS_LIB_PRINT_HEX_TEXT 23 print ASCII text along with hex strings
 
96
.TP
 
97
define NETSNMP_DS_LIB_PRINT_UCD_STYLE_OID 24 print OID's using the UCD-style prefix suppression
 
98
.TP
 
99
define NETSNMP_DS_LIB_READ_UCD_STYLE_OID 25 require top-level OIDs to be prefixed with a dot
 
100
.TP
 
101
define NETSNMP_DS_LIB_HAVE_READ_PREMIB_CONFIG 26 have the pre-mib parsing config tokens been processed
 
102
.TP
 
103
define NETSNMP_DS_LIB_HAVE_READ_CONFIG 27 have the config tokens been processed
 
104
.TP
 
105
define NETSNMP_DS_LIB_QUICKE_PRINT 28
 
106
.TP
 
107
define NETSNMP_DS_LIB_DONT_PRINT_UNITS 29 don't print UNITS suffix
 
108
.TP
 
109
define NETSNMP_DS_LIB_NO_DISPLAY_HINT 30 don't apply DISPLAY-HINTs
 
110
.TP
 
111
define NETSNMP_DS_LIB_16BIT_IDS 31 restrict requestIDs, etc to 16-bit values
 
112
.PP
 
113
library integers
 
114
.PP
 
115
.TP
 
116
define NETSNMP_DS_LIB_MIB_WARNINGS 0
 
117
.TP
 
118
define NETSNMP_DS_LIB_SECLEVEL 1
 
119
.PP
 
120
library strings
 
121
.PP
 
122
.TP
 
123
define NETSNMP_DS_LIB_SECNAME 0
 
124
.TP
 
125
define NETSNMP_DS_LIB_CONTEXT 1
 
126
.TP
 
127
define NETSNMP_DS_LIB_PASSPHRASE 2
 
128
.TP
 
129
define NETSNMP_DS_LIB_AUTHPASSPHRASE 3
 
130
.TP
 
131
define NETSNMP_DS_LIB_PRIVPASSPHRASE 4
 
132
.TP
 
133
define NETSNMP_DS_LIB_OPTIONALCONFIG 5
 
134
.TP
 
135
define NETSNMP_DS_LIB_APPTYPE 6
 
136
.TP
 
137
define NETSNMP_DS_LIB_COMMUNITY 7
 
138
.TP
 
139
define NETSNMP_DS_LIB_PERSISTENT_DIR 8
 
140
.TP
 
141
define NETSNMP_DS_LIB_CONFIGURATION_DIR 9
 
142
.TP
 
143
define NETSNMP_DS_LIB_SECMODEL 10
 
144
.TP
 
145
define NETSNMP_DS_LIB_MIBDIRS 11 
 
146
.PP
 
147
.SH "FUNCTION DOCUMENTATION"
 
148
.PP 
 
149
.SS "int netsnmp_ds_set_boolean (int storeid, int which, int value)"
 
150
.PP
 
151
Stores 'true' or 'false' given an int value for value into netsnmp_ds_booleans[store][which] slot.
 
152
.PP
 
153
\fBParameters: \fP
 
154
.in +1c
 
155
.TP
 
156
\fB\fIstoreid\fP\fP
 
157
an index to the boolean storage container's first index(store)
 
158
.TP
 
159
\fB\fIwhich\fP\fP
 
160
an index to the boolean storage container's second index(which)
 
161
.TP
 
162
\fB\fIvalue\fP\fP
 
163
if > 0, 'true' is set into the slot otherwise 'false'
 
164
.PP
 
165
\fBReturns: \fP
 
166
.in +1c
 
167
Returns SNMPPERR_GENERR if the storeid and which parameters do not correspond to a valid slot, or SNMPERR_SUCCESS otherwise. 
 
168
.PP
 
169
Definition at line 183 of file default_store.c.
 
170
.PP
 
171
Referenced by init_agent().