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 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190
|
.TH "instance" 3 "14 Jul 2006" "Version 5.2.3" "net-snmp" \" -*- nroff -*-
.ad l
.nh
.SH NAME
instance \- Process individual MIB instances easily.
.PP
.SS "Functions"
.in +1c
.ti -1c
.RI "\fBnetsnmp_mib_handler\fP * \fBnetsnmp_get_instance_handler\fP (void)"
.br
.RI "\fICreates an instance helper handler, calls netsnmp_create_handler, which then could be registered, using \fBnetsnmp_register_handler()\fP. \fP"
.ti -1c
.RI "int \fBnetsnmp_register_instance\fP (\fBnetsnmp_handler_registration\fP *reginfo)"
.br
.RI "\fIThis function registers an instance helper handler, which is a way of registering an exact OID such that GENEXT requests are handled entirely by the helper. \fP"
.ti -1c
.RI "int \fBnetsnmp_register_read_only_instance\fP (\fBnetsnmp_handler_registration\fP *reginfo)"
.br
.RI "\fIThis function injects a 'read only' handler into the handler chain prior to serializing/registering the handler. \fP"
.ti -1c
.RI "int \fBnetsnmp_register_read_only_ulong_instance\fP (const char *name, oid *reg_oid, size_t reg_oid_len, u_long *it, \fBNetsnmp_Node_Handler\fP *subhandler)"
.br
.ti -1c
.RI "int \fBnetsnmp_register_ulong_instance\fP (const char *name, oid *reg_oid, size_t reg_oid_len, u_long *it, \fBNetsnmp_Node_Handler\fP *subhandler)"
.br
.ti -1c
.RI "int \fBnetsnmp_register_read_only_counter32_instance\fP (const char *name, oid *reg_oid, size_t reg_oid_len, u_long *it, \fBNetsnmp_Node_Handler\fP *subhandler)"
.br
.ti -1c
.RI "int \fBnetsnmp_register_read_only_long_instance\fP (const char *name, oid *reg_oid, size_t reg_oid_len, long *it, \fBNetsnmp_Node_Handler\fP *subhandler)"
.br
.ti -1c
.RI "int \fBnetsnmp_register_long_instance\fP (const char *name, oid *reg_oid, size_t reg_oid_len, long *it, \fBNetsnmp_Node_Handler\fP *subhandler)"
.br
.ti -1c
.RI "int \fBnetsnmp_register_read_only_int_instance\fP (const char *name, oid *reg_oid, size_t reg_oid_len, int *it, \fBNetsnmp_Node_Handler\fP *subhandler)"
.br
.ti -1c
.RI "int \fBregister_read_only_int_instance\fP (const char *name, oid *reg_oid, size_t reg_oid_len, int *it, \fBNetsnmp_Node_Handler\fP *subhandler)"
.br
.ti -1c
.RI "int \fBnetsnmp_register_read_only_ulong_instance_context\fP (const char *name, oid *reg_oid, size_t reg_oid_len, u_long *it, \fBNetsnmp_Node_Handler\fP *subhandler, const char *contextName)"
.br
.ti -1c
.RI "int \fBnetsnmp_register_ulong_instance_context\fP (const char *name, oid *reg_oid, size_t reg_oid_len, u_long *it, \fBNetsnmp_Node_Handler\fP *subhandler, const char *contextName)"
.br
.ti -1c
.RI "int \fBnetsnmp_register_read_only_counter32_instance_context\fP (const char *name, oid *reg_oid, size_t reg_oid_len, u_long *it, \fBNetsnmp_Node_Handler\fP *subhandler, const char *contextName)"
.br
.ti -1c
.RI "int \fBnetsnmp_register_read_only_long_instance_context\fP (const char *name, oid *reg_oid, size_t reg_oid_len, long *it, \fBNetsnmp_Node_Handler\fP *subhandler, const char *contextName)"
.br
.ti -1c
.RI "int \fBnetsnmp_register_long_instance_context\fP (const char *name, oid *reg_oid, size_t reg_oid_len, long *it, \fBNetsnmp_Node_Handler\fP *subhandler, const char *contextName)"
.br
.ti -1c
.RI "int \fBnetsnmp_register_int_instance_context\fP (const char *name, oid *reg_oid, size_t reg_oid_len, int *it, \fBNetsnmp_Node_Handler\fP *subhandler, const char *contextName)"
.br
.ti -1c
.RI "int \fBnetsnmp_register_read_only_int_instance_context\fP (const char *name, oid *reg_oid, size_t reg_oid_len, int *it, \fBNetsnmp_Node_Handler\fP *subhandler, const char *contextName)"
.br
.ti -1c
.RI "int \fBregister_read_only_int_instance_context\fP (const char *name, oid *reg_oid, size_t reg_oid_len, int *it, \fBNetsnmp_Node_Handler\fP *subhandler, const char *contextName)"
.br
.ti -1c
.RI "int \fBnetsnmp_register_int_instance\fP (const char *name, oid *reg_oid, size_t reg_oid_len, int *it, \fBNetsnmp_Node_Handler\fP *subhandler)"
.br
.RI "\fIThis function registers an int helper handler to a specified OID. \fP"
.ti -1c
.RI "int \fBnetsnmp_instance_ulong_handler\fP (\fBnetsnmp_mib_handler\fP *handler, \fBnetsnmp_handler_registration\fP *reginfo, \fBnetsnmp_agent_request_info\fP *reqinfo, \fBnetsnmp_request_info\fP *requests)"
.br
.ti -1c
.RI "int \fBnetsnmp_instance_counter32_handler\fP (\fBnetsnmp_mib_handler\fP *handler, \fBnetsnmp_handler_registration\fP *reginfo, \fBnetsnmp_agent_request_info\fP *reqinfo, \fBnetsnmp_request_info\fP *requests)"
.br
.ti -1c
.RI "int \fBnetsnmp_instance_long_handler\fP (\fBnetsnmp_mib_handler\fP *handler, \fBnetsnmp_handler_registration\fP *reginfo, \fBnetsnmp_agent_request_info\fP *reqinfo, \fBnetsnmp_request_info\fP *requests)"
.br
.ti -1c
.RI "int \fBnetsnmp_instance_int_handler\fP (\fBnetsnmp_mib_handler\fP *handler, \fBnetsnmp_handler_registration\fP *reginfo, \fBnetsnmp_agent_request_info\fP *reqinfo, \fBnetsnmp_request_info\fP *requests)"
.br
.ti -1c
.RI "int \fBnetsnmp_instance_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 individual MIB instances easily.
.PP
.SH "Function Documentation"
.PP
.SS "\fBnetsnmp_mib_handler\fP* netsnmp_get_instance_handler (void)"
.PP
Creates an instance helper handler, calls netsnmp_create_handler, which then could be registered, using \fBnetsnmp_register_handler()\fP.
.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
.PP
Definition at line 45 of file instance.c.
.PP
References netsnmp_create_handler(), and netsnmp_instance_helper_handler().
.PP
Referenced by netsnmp_register_instance(), netsnmp_register_read_only_instance(), netsnmp_register_read_only_scalar(), netsnmp_register_scalar(), and netsnmp_register_scalar_group().
.SS "int netsnmp_register_instance (\fBnetsnmp_handler_registration\fP * reginfo)"
.PP
This function registers an instance helper handler, which is a way of registering an exact OID such that GENEXT requests are handled entirely by the helper.
.PP
First need to inject it into the calling chain of the handler defined by the netsnmp_handler_registration struct, reginfo. The new handler is injected at the top of the list and will be the new handler to be called first. This function also injects a serialize handler before actually calling netsnmp_register_handle, 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 an instance helper handler.
.RE
.PP
\fBReturns:\fP
.RS 4
MIB_REGISTERED_OK is returned if the registration was a success. Failures are MIB_REGISTRATION_FAILED and MIB_DUPLICATE_REGISTRATION.
.RE
.PP
.PP
\fBExamples: \fP
.in +1c
\fBdelayed_instance.c\fP.
.PP
Definition at line 70 of file instance.c.
.PP
References netsnmp_get_instance_handler(), netsnmp_inject_handler(), and netsnmp_register_serialize().
.PP
Referenced by netsnmp_register_int_instance(), netsnmp_register_long_instance(), netsnmp_register_long_instance_context(), netsnmp_register_ulong_instance(), netsnmp_register_ulong_instance_context(), and netsnmp_register_watched_instance().
.SS "int netsnmp_register_int_instance (const char * name, oid * reg_oid, size_t reg_oid_len, int * it, \fBNetsnmp_Node_Handler\fP * subhandler)"
.PP
This function registers an int helper handler to a specified OID.
.PP
\fBParameters:\fP
.RS 4
\fIname\fP the name used for registration pruposes.
.br
\fIreg_oid\fP the OID where you want to register your integer at
.br
\fIreg_oid_len\fP the length of the OID
.br
\fIit\fP the integer value to be registered during initialization
.br
\fIsubhandler\fP a handler to do whatever you want to do, otherwise use NULL to use the default int handler.
.RE
.PP
\fBReturns:\fP
.RS 4
MIB_REGISTERED_OK is returned if the registration was a success. Failures are MIB_REGISTRATION_FAILED and MIB_DUPLICATE_REGISTRATION.
.RE
.PP
.PP
\fBExamples: \fP
.in +1c
\fBscalar_int.c\fP.
.PP
Definition at line 387 of file instance.c.
.PP
References HANDLER_CAN_RWRITE, netsnmp_instance_int_handler(), netsnmp_register_instance(), and NULL.
.SS "int netsnmp_register_read_only_instance (\fBnetsnmp_handler_registration\fP * reginfo)"
.PP
This function injects a 'read only' handler into the handler chain prior to serializing/registering the handler.
.PP
The only purpose of this 'read only' handler is to return an appropriate error for any requests passed to it in a SET mode. Inserting it into your handler chain will ensure you're never asked to perform a SET request so you can ignore those error conditions.
.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 instance helper handler.
.RE
.PP
\fBReturns:\fP
.RS 4
MIB_REGISTERED_OK is returned if the registration was a success. Failures are MIB_REGISTRATION_FAILED and MIB_DUPLICATE_REGISTRATION.
.RE
.PP
.PP
Definition at line 95 of file instance.c.
.PP
References netsnmp_get_instance_handler(), netsnmp_get_read_only_handler(), netsnmp_inject_handler(), and netsnmp_register_serialize().
.PP
Referenced by netsnmp_register_int_instance_context(), netsnmp_register_read_only_counter32_instance(), netsnmp_register_read_only_counter32_instance_context(), netsnmp_register_read_only_int_instance(), netsnmp_register_read_only_int_instance_context(), netsnmp_register_read_only_long_instance(), netsnmp_register_read_only_long_instance_context(), netsnmp_register_read_only_ulong_instance(), and netsnmp_register_read_only_ulong_instance_context().
|