modeendcall:l:atathehendnofoa serieseoforequests,s,calllanotherehandlerehook.(3)3)
NAME
netsnmpmodeendcall - at the end of a series of requests, call
another handler hook.
Functions
netsnmpmibhandler * netsnmpgetmodeendcallhandler
(netsnmpmodehandlerlist *endlist)
returns a modeendcall handler that can be injected into a given
handler chain.
netsnmpmodehandlerlist * netsnmpmodeendcalladdmodecallback
(netsnmpmodehandlerlist *endlist, int mode, netsnmpmibhandler
*callbackh)
adds a mode specific callback to the callback list.
int netsnmpmodeendcallhelper (netsnmpmibhandler *handler,
netsnmphandlerregistration *reginfo, netsnmpagentrequestinfo
*reqinfo, netsnmprequestinfo *requests)
Detailed Description
Handlers that want to loop through a series of requests and then
receive a callback at the end of a particular MODE can use this helper
to make this possible. For most modules, this is not needed as the
handler itself could perform a for() loop around the request list and
then perform its actions afterwards. However, if something like the
serialize helper is in use this isn't possible because not all the
requests for a given handler are being passed downward in a single
group. Thus, this helper *must* be added above other helpers like the
serialize helper to be useful.
Multiple mode specific handlers can be registered and will be called in
the order they were regestered in. Callbacks regesterd with a mode of
NETSNMPMODENDALMODES will be called for all modes.
Function Documentation
netsnmpmibhandler** netsnmpgetmodeendcallhandler
(netsnmpmodehandlerlist ** endlist)
returns a modeendcall handler that can be injected into a given
handler chain. Parameters::
endlist The callback list for the handler to make use of.
Returns::
An injectable Net-SNMP handler.
Definition at line 48 of file modeendcall.c.
References netsnmpmibhandlers::myvoid, netsnmpcreatehandler(), and
netsnmpmibhandler.
netsnmpmodehandlerlist** netsnmpmodeendcalladdmodecallback
(netsnmpmodehandlerlist ** endlist,, int mode,, netsnmpmibhandler **
callbackh)
adds a mode specific callback to the callback list. Parameters::
endinfo the information structure for the modeendcall helper. Can
be NUL to create a new list.
mode the mode to be called upon. A mode of
NETSNMPMODENDALMODES = all modes.
callbackh the netsnmpmibhandler callback to call.
Returns::
the new registration information list upon success.
Definition at line 68 of file modeendcall.c.
References netsnmpmibhandler, netsnmpmibhandlers::next, and
SNMPMALOCTYPEDEF.
modeendcall: at the end of a series4oJfareq0u0ests, call another handler hook.(3)
|