netsnmp_stash_cache.3
上传用户:wxp200602
上传日期:2007-10-30
资源大小:4028k
文件大小:4k
- .TH "stash_cache: automatically caches data for certain handlers." 3 "28 Nov 2005" "Version 5.2.1.rc3" "net-snmp" " -*- nroff -*-
- .ad l
- .nh
- .SH NAME
- stash_cache: automatically caches data for certain handlers. - This handler caches data in an optimized way which may aleviate the need for the lower level handlers to perform as much optimization.
- .PP
- .SS "Functions"
- .in +1c
- .ti -1c
- .RI "fBnetsnmp_stash_cache_infofP * fBnetsnmp_get_new_stash_cachefP (void)"
- .br
- .ti -1c
- .RI "fBnetsnmp_mib_handlerfP * fBnetsnmp_get_stash_cache_handlerfP (void)"
- .br
- .RI "fIreturns a stash_cache handler that can be injected into a given handler chain. fP"
- .ti -1c
- .RI "fBnetsnmp_oid_stash_nodefP ** fBnetsnmp_extract_stash_cachefP (fBnetsnmp_agent_request_infofP *reqinfo)"
- .br
- .RI "fIextracts a pointer to the stash_cache info from the reqinfo structure. fP"
- .ti -1c
- .RI "int fBnetsnmp_stash_cache_helperfP (fBnetsnmp_mib_handlerfP *handler, fBnetsnmp_handler_registrationfP *reginfo, fBnetsnmp_agent_request_infofP *reqinfo, fBnetsnmp_request_infofP *requests)"
- .br
- .ti -1c
- .RI "int fBnetsnmp_stash_cache_updatefP (fBnetsnmp_mib_handlerfP *handler, fBnetsnmp_handler_registrationfP *reginfo, fBnetsnmp_agent_request_infofP *reqinfo, fBnetsnmp_request_infofP *requests, fBnetsnmp_stash_cache_infofP *cinfo)"
- .br
- .RI "fIupdates a given cache depending on whether it needs to or not. fP"
- .ti -1c
- .RI "void fBnetsnmp_init_stash_cache_helperfP (void)"
- .br
- .RI "fIinitializes the stash_cache helper which then registers a stash_cache handler as a run-time injectable handler for configuration file use. fP"
- .in -1c
- .SH "Detailed Description"
- .PP
- This handler caches data in an optimized way which may aleviate the need for the lower level handlers to perform as much optimization.
- .PP
- Specifically, somewhere in the lower level handlers must be a handler that supports the MODE_GET_STASH operation. Note that the table_iterator helper supports this.
- .SH "Function Documentation"
- .PP
- .SS "fBnetsnmp_oid_stash_nodefP** netsnmp_extract_stash_cache (fBnetsnmp_agent_request_infofP * reqinfo)"
- .PP
- extracts a pointer to the stash_cache info from the reqinfo structure.
- .PP
- Definition at line 64 of file stash_cache.c.
- .PP
- References netsnmp_agent_get_list_data().
- .PP
- Referenced by netsnmp_table_iterator_helper_handler().
- .SS "fBnetsnmp_mib_handlerfP* netsnmp_get_stash_cache_handler (void)"
- .PP
- returns a stash_cache handler that can be injected into a given handler chain.
- .PP
- Definition at line 42 of file stash_cache.c.
- .PP
- References netsnmp_mib_handler_s::myvoid, netsnmp_create_handler(), netsnmp_get_new_stash_cache(), netsnmp_stash_cache_helper(), and NULL.
- .PP
- Referenced by netsnmp_init_stash_cache_helper().
- .SS "void netsnmp_init_stash_cache_helper (void)"
- .PP
- initializes the stash_cache helper which then registers a stash_cache handler as a run-time injectable handler for configuration file use.
- .PP
- Definition at line 188 of file stash_cache.c.
- .PP
- References netsnmp_get_stash_cache_handler(), and netsnmp_register_handler_by_name().
- .PP
- Referenced by netsnmp_init_helpers().
- .SS "int netsnmp_stash_cache_update (fBnetsnmp_mib_handlerfP * handler, fBnetsnmp_handler_registrationfP * reginfo, fBnetsnmp_agent_request_infofP * reqinfo, fBnetsnmp_request_infofP * requests, fBnetsnmp_stash_cache_infofP * cinfo)"
- .PP
- updates a given cache depending on whether it needs to or not.
- .PP
- Definition at line 143 of file stash_cache.c.
- .PP
- References atime_newMarker(), atime_ready(), atime_setMarker(), netsnmp_stash_cache_info_s::cache, netsnmp_stash_cache_info_s::cache_length, netsnmp_stash_cache_info_s::cache_time, netsnmp_agent_request_info_s::mode, netsnmp_agent_add_list_data(), netsnmp_call_next_handler(), netsnmp_create_data_list(), netsnmp_oid_stash_free(), NULL, and snmp_free_var().
- .PP
- Referenced by netsnmp_stash_cache_helper().