multiplemul:tiplexer:msplitsqmodesrequestslintoocallsetondifferentshandlers.(3)
NAME
netsnmpmultiplexer - splits mode requests into calls to different
handlers.
Functions
netsnmpmibhandler * netsnmpgetmultiplexerhandler
(netsnmpmibhandlermethods *req)
returns a multiplixer handler given a netsnmpmibhandlermethods
structure of subhandlers.
int netsnmpmultiplexerhelperhandler (netsnmpmibhandler **handler,,
netsnmphandlerregistration **reginfo,, netsnmpagentrequestinfo
**reqinfo,, netsnmprequestinfo **requests)
implements the multiplexer helper
Detailed Description
The multiplexer helper lets you split the calling chain depending on
the calling mode (get vs getnext vs set). Useful if you want different
routines to handle different aspects of SNMP requests, which is very
common for GET vs SET type actions.
Functionally:
1. GET requests call the getmethod
2. GETNEXT requests call the getnextmethod, or if not present, the
getmethod.
3. GETBULK requests call the getbulkmethod, or if not present, the
getnextmethod, or if even that isn't present the getmethod.
4. SET requests call the setmethod, or if not present return a
SNMPERNOTWRITABLE error.
Function Documentation
netsnmpmibhandler** netsnmpgetmultiplexerhandler
(netsnmpmibhandlermethods ** req)
returns a multiplixer handler given a netsnmpmibhandlermethods
structure of subhandlers. Definition at line 36 of file multiplexer.c.
References netsnmpmibhandlers::myvoid, netsnmpcreatehandler(),
netsnmpmibhandler, and snmplog().
int netsnmpmultiplexerhelperhandler (netsnmpmibhandler ** handler,,
netsnmphandlerregistration ** reginfo,, netsnmpagentrequestinfo **
reqinfo,, netsnmprequestinfo ** requests)
implements the multiplexer helper Definition at line 57 of file
multiplexer.c.
References netsnmpagentrequestinfos::mode,
netsnmpmibhandlers::myvoid, netsnmpcallhandler(),
netsnmphandlerregistration, netsnmpmibhandler,
netsnmpsetallrequestserror(), and snmplog().
net-snmpmultiplexer: splits mode requJests20i0nto calls to different handlers.(3)
|