instance: process individinstMaInBce:nprocess individual MIB instances easily.(3)
NAME
netsnmpinstance - process individual MIB instances easily.
Functions
netsnmpmibhandler * netsnmpgetinstancehandler (void)
Creates an instance helper handler, calls netsnmpcreatehandler,
which then could be registered, using netsnmpregisterhandler().
int netsnmpregisterinstance (netsnmphandlerregistration **reginfo)
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.
int netsnmpregisterreadonlyinstance (netsnmphandlerregistration
**reginfo)
This function injects a 'read only' handler into the handler chain
prior to serializing/registering the handler.
int netsnmpregisterreadonlyulonginstance (const char **name,, oid
**regoid,, sizet regoidlen,, ulong **it,, NetsnmpNodeHandler
**subhandler)
int netsnmpregisterulonginstance (const char **name,, oid **regoid,,
sizet regoidlen,, ulong **it,, NetsnmpNodeHandler **subhandler)
int netsnmpregisterreadonlycounter32instance (const char **name,,
oid **regoid,, sizet regoidlen,, ulong **it,, NetsnmpNodeHandler
**subhandler)
int netsnmpregisterreadonlylonginstance (const char **name,, oid
**regoid,, sizet regoidlen,, long **it,, NetsnmpNodeHandler
**subhandler)
int netsnmpregisterlonginstance (const char **name,, oid **regoid,,
sizet regoidlen,, long **it,, NetsnmpNodeHandler **subhandler)
int netsnmpregisterreadonlyintinstance (const char **name,, oid
**regoid,, sizet regoidlen,, int **it,, NetsnmpNodeHandler
**subhandler)
int registerreadonlyintinstance (const char **name,, oid **regoid,,
sizet regoidlen,, int **it,, NetsnmpNodeHandler **subhandler)
int netsnmpregisterreadonlyulonginstancecontext (const char
**name,, oid **regoid,, sizet regoidlen,, ulong **it,,
NetsnmpNodeHandler **subhandler,, const char **contextName)
int netsnmpregisterulonginstancecontext (const char **name,, oid
**regoid,, sizet regoidlen,, ulong **it,, NetsnmpNodeHandler
**subhandler,, const char **contextName)
int netsnmpregisterreadonlycounter32instancecontext (const char
**name,, oid **regoid,, sizet regoidlen,, ulong **it,,
NetsnmpNodeHandler **subhandler,, const char **contextName)
int netsnmpregisterreadonlylonginstancecontext (const char **name,,
oid **regoid,, sizet regoidlen,, long **it,, NetsnmpNodeHandler
**subhandler,, const char **contextName)
int netsnmpregisterlonginstancecontext (const char **name,, oid
**regoid,, sizet regoidlen,, long **it,, NetsnmpNodeHandler
**subhandler,, const char **contextName)
int netsnmpregisterintinstancecontext (const char **name,, oid
**regoid,, sizet regoidlen,, int **it,, NetsnmpNodeHandler
**subhandler,, const char **contextName)
int netsnmpregisterreadonlyintinstancecontext (const char **name,,
oid **regoid,, sizet regoidlen,, int **it,, NetsnmpNodeHandler
**subhandler,, const char **contextName)
int registerreadonlyintinstancecontext (const char **name,, oid
**regoid,, sizet regoidlen,, int **it,, NetsnmpNodeHandler
**subhandler,, const char **contextName)
int netsnmpregisterintinstance (const char **name,, oid **regoid,,
sizet regoidlen,, int **it,, NetsnmpNodeHandler **subhandler)
This function registers an int helper handler to a specified OID.
int netsnmpinstanceulonghandler (netsnmpmibhandler **handler,,
netsnmphandlerregistration **reginfo,, netsnmpagentrequestinfo
**reqinfo,, netsnmprequestinfo **requests)
int netsnmpinstancecounter32handler (netsnmpmibhandler **handler,,
netsnmphandlerregistration **reginfo,, netsnmpagentrequestinfo
**reqinfo,, netsnmprequestinfo **requests)
int netsnmpinstancelonghandler (netsnmpmibhandler **handler,,
netsnmphandlerregistration **reginfo,, netsnmpagentrequestinfo
**reqinfo,, netsnmprequestinfo **requests)
int netsnmpinstanceinthandler (netsnmpmibhandler **handler,,
netsnmphandlerregistration **reginfo,, netsnmpagentrequestinfo
**reqinfo,, netsnmprequestinfo **requests)
int netsnmpinstancehelperhandler (netsnmpmibhandler **handler,,
netsnmphandlerregistration **reginfo,, netsnmpagentrequestinfo
**reqinfo,, netsnmprequestinfo **requests)
Function Documentation
netsnmpmibhandler** netsnmpgetinstancehandler (void)
Creates an instance helper handler, calls netsnmpcreatehandler, which
then could be registered, using netsnmpregisterhandler(). Parameters::
void .RE
Returns::
Returns a pointer to a netsnmpmibhandler struct which
contains the handler's name and the access method
Definition at line 46 of file instance.c.
References netsnmpcreatehandler().
Referenced by netsnmpregisterinstance(),
netsnmpregisterreadonlyinstance(),
netsnmpregisterreadonlyscalar(), and netsnmpregisterscalar().
int netsnmpregisterinstance (netsnmphandlerregistration ** reginfo)
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. First need to inject it into the calling chain of the
handler defined by the netsnmphandlerregistration 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 netsnmpregisterhandle, registering
reginfo.
Parameters::
reginfo a handler registration structure which could get created
using netsnmpcreatehandlerregistration. Used to register an
instance helper handler.
Returns::
MIBREGISTEREDOK is returned if the registration was a success.
Failures are MIBREGISTRATIONFAILED and
MIBDUPLICATEREGISTRATION.
Examples::
delayedinstance.c.
Definition at line 71 of file instance.c.
References netsnmpgetinstancehandler(),
netsnmphandlerregistration, netsnmpinjecthandler(), and
netsnmpregisterserialize().
Referenced by netsnmpregisterintinstance().
int netsnmpregisterintinstance (const char ** name,, oid ** regoid,, sizet
regoidlen,, int ** it,, NetsnmpNodeHandler ** subhandler)
This function registers an int helper handler to a specified OID.
Parameters::
name the name used for registration pruposes.
regoid the OID where you want to register your integer at
regoidlen the length of the OID
it the integer value to be registered during initialization
subhandler a handler to do whatever you want to do, otherwise use
NUL to use the default int handler.
Returns::
MIBREGISTEREDOK is returned if the registration was a success.
Failures are MIBREGISTRATIONFAILED and
MIBDUPLICATEREGISTRATION.
Examples::
scalarint.c.
Definition at line 388 of file instance.c.
References netsnmphandlerregistration, and
netsnmpregisterinstance().
int netsnmpregisterreadonlyinstance (netsnmphandlerregistration **
reginfo)
This function injects a 'read only' handler into the handler chain
prior to serializing/registering the handler. 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.
Parameters::
reginfo a handler registration structure which could get created
using netsnmpcreatehandlerregistration. Used to register a read
only instance helper handler.
Returns::
MIBREGISTEREDOK is returned if the registration was a success.
Failures are MIBREGISTRATIONFAILED and
MIBDUPLICATEREGISTRATION.
Definition at line 96 of file instance.c.
References netsnmpgetinstancehandler(),
netsnmpgetreadonlyhandler(), netsnmphandlerregistration,
netsnmpinjecthandler(), and netsnmpregisterserialize().
net-snmp instance:2prJocess00individual MIB instances easily.(3)
|