oldapi: Caoldapi:mCalls mibemoduleecode written inytheooldostyle)of code.(3)
NAME
netsnmpoldapi - Calls mib module code written in the old style of
code.
Functions
netsnmpmibhandler * getoldapihandler (void)
returns a oldapi handler that should be the final calling handler.
int netsnmpregisteroldapi (const char *moduleName, struct variable
*var, sizet varsize, sizet numvars, oid *mibloc, sizet
mibloclen, int priority, int rangesubid, oid rangeubound,
netsnmpsession *ss, const char *context, int timeout, int flags)
Registers an old API set into the mib tree.
int netsnmpregistermibtablerow (const char *moduleName, struct
variable *var, sizet varsize, sizet numvars, oid *mibloc, sizet
mibloclen, int priority, int varsubid, netsnmpsession *ss, const
char *context, int timeout, int flags)
registers a row within a mib table
int netsnmpoldapihelper (netsnmpmibhandler *handler,
netsnmphandlerregistration *reginfo, netsnmpagentrequestinfo
*reqinfo, netsnmprequestinfo *requests)
implements the oldapi handler
Detailed Description
This is a backwards compatilibity module that allows code written in
the old API to be run under the new handler based architecture. Use it
by calling netsnmpregisteroldapi().
Function Documentation
netsnmpmibhandler** getoldapihandler (void)
returns a oldapi handler that should be the final calling handler.
Don't use this function. Use the netsnmpregisteroldapi() function
instead. Definition at line 40 of file oldapi.c.
References netsnmpcreatehandler().
Referenced by netsnmpregistermibtablerow(), and
netsnmpregisteroldapi().
int netsnmpoldapihelper (netsnmpmibhandler ** handler,,
netsnmphandlerregistration ** reginfo,, netsnmpagentrequestinfo **
reqinfo,, netsnmprequestinfo ** requests)
implements the oldapi handler Definition at line 229 of file
oldapi.c.
References netsnmpagentrequestinfos::asp,
netsnmphandlerregistrations::handlerName,
netsnmpagentrequestinfos::mode, netsnmpmibhandlers::myvoid,
variablelist::name, variablelist::namelength,
netsnmpcreatedatalist(), netsnmphandlerregistration,
netsnmpmibhandler, netsnmpoidequals(),
netsnmprequestaddlistdata(), netsnmprequestgetlistdata(),
netsnmpsetrequesterror(), netsnmprequestinfos::next,
netsnmprequestinfos::requestvb,
netsnmphandlerregistrations::rootoid,
netsnmphandlerregistrations::rootoidlen, SNMPMALOCTYPEDEF,
snmpsetvartypedvalue(), variablelist::type, variablelist::val,
and variablelist::vallen.
int netsnmpregistermibtablerow (const char ** moduleName,, struct
variable ** var,, sizet varsize,, sizet numvars,, oid ** mibloc,, sizet
mibloclen,, int priority,, int varsubid,, netsnmpsession ** ss,, const
char ** context,, int timeout,, int flags)
registers a row within a mib table Definition at line 110 of file
oldapi.c.
References netsnmphandlerregistrations::contextName,
getoldapihandler(), netsnmphandlerregistrations::handler,
netsnmphandlerregistrations::handlerName,
netsnmphandlerregistrations::modes, netsnmpmibhandlers::myvoid,
netsnmphandlerregistration, netsnmphandlerregistrationfree(),
netsnmpregisterhandlernocallback(),
netsnmphandlerregistrations::priority,
netsnmphandlerregistrations::rangesubid,
netsnmphandlerregistrations::rangeubound,
netsnmphandlerregistrations::rootoid,
netsnmphandlerregistrations::rootoidlen, snmpcallcallbacks(),
SNMPMALOCTYPEDEF, and netsnmphandlerregistrations::timeout.
int netsnmpregisteroldapi (const char ** moduleName,, struct variable **
var,, sizet varsize,, sizet numvars,, oid ** mibloc,, sizet mibloclen,,
int priority,, int rangesubid,, oid rangeubound,, netsnmpsession ** ss,,
const char ** context,, int timeout,, int flags)
Registers an old API set into the mib tree. Functionally this mimics
the old registermibcontext() function (and in fact the new
registermibcontext() function merely calls this new oldapi one).
netsnmphandlerregistrationfree(reginfo); already freed Definition at
line 51 of file oldapi.c.
References netsnmphandlerregistrations::contextName,
getoldapihandler(), netsnmphandlerregistrations::handler,
netsnmphandlerregistrations::handlerName, memdup(),
netsnmphandlerregistrations::modes, netsnmpmibhandlers::myvoid,
netsnmphandlerregistration, netsnmpregisterhandler(),
netsnmphandlerregistrations::priority,
netsnmphandlerregistrations::rangesubid,
netsnmphandlerregistrations::rangeubound,
netsnmphandlerregistrations::rootoid,
netsnmphandlerregistrations::rootoidlen, SNMPFRE,
SNMPMALOCTYPEDEF, and netsnmphandlerregistrations::timeout.
net-snmp oldapi: Calls mib module Jcode20w0ritten in the old style of code.(3)
|