~ubuntu-branches/ubuntu/trusty/net-snmp/trusty

« back to all changes in this revision

Viewing changes to man/netsnmp_cache_handler.3

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2004-09-13 12:06:21 UTC
  • Revision ID: james.westby@ubuntu.com-20040913120621-g952ntonlleihcvm
Tags: upstream-5.1.1
ImportĀ upstreamĀ versionĀ 5.1.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.TH "cache_handler: Maintains a cache of data for use by lower level handlers." 3 "19 Mar 2004" "net-snmp" \" -*- nroff -*-
 
2
.ad l
 
3
.nh
 
4
.SH NAME
 
5
cache_handler: Maintains a cache of data for use by lower level handlers. \- This helper checks to see whether the data has been loaded 'recently' (according to the timeout for that particular cache) and calls the registered 'load_cache' routine if necessary. 
 
6
More...
 
7
.SS "Functions"
 
8
 
 
9
.in +1c
 
10
.ti -1c
 
11
.RI "\fBnetsnmp_mib_handler\fP * \fBnetsnmp_get_cache_handler\fP (int timeout, NetsnmpCacheLoad *load_hook, NetsnmpCacheFree *free_hook, oid *rootoid, int rootoid_len)"
 
12
.br
 
13
.RI "\fIreturns a cache handler that can be injected into a given handler chain.\fP"
 
14
.ti -1c
 
15
.RI "int \fBnetsnmp_register_cache_handler\fP (\fBnetsnmp_handler_registration\fP *reginfo, int timeout, NetsnmpCacheLoad *load_hook, NetsnmpCacheFree *free_hook)"
 
16
.br
 
17
.RI "\fIfunctionally the same as calling \fBnetsnmp_register_handler()\fP but also injects a cache handler at the same time for you.\fP"
 
18
.ti -1c
 
19
.RI "netsnmp_cache * \fBnetsnmp_extract_cache_info\fP (netsnmp_agent_request_info *reqinfo)"
 
20
.br
 
21
.RI "\fIExtract the cache information for a given request.\fP"
 
22
.ti -1c
 
23
.RI "int \fBnetsnmp_is_cache_valid\fP (netsnmp_agent_request_info *reqinfo)"
 
24
.br
 
25
.RI "\fIIs the cache valid for a given request?\fP"
 
26
.ti -1c
 
27
.RI "int \fBnetsnmp_cache_helper_handler\fP (\fBnetsnmp_mib_handler\fP *handler, \fBnetsnmp_handler_registration\fP *reginfo, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests)"
 
28
.br
 
29
.RI "\fIImplements the cache handler.\fP"
 
30
.ti -1c
 
31
.RI "void \fBrelease_cached_resources\fP (unsigned int regNo, void *clientargs)"
 
32
.br
 
33
.RI "\fIrun regularly to automatically release cached resources.\fP"
 
34
.in -1c
 
35
.SH "DETAILED DESCRIPTION"
 
36
.PP 
 
37
This helper checks to see whether the data has been loaded 'recently' (according to the timeout for that particular cache) and calls the registered 'load_cache' routine if necessary.
 
38
.PP
 
39
The lower handlers can then work with this local cached data. 
 
40
.SH "FUNCTION DOCUMENTATION"
 
41
.PP 
 
42
.SS "int netsnmp_cache_helper_handler (\fBnetsnmp_mib_handler\fP * handler, \fBnetsnmp_handler_registration\fP * reginfo, netsnmp_agent_request_info * reqinfo, netsnmp_request_info * requests)"
 
43
.PP
 
44
Implements the cache handler.
 
45
.PP
 
46
Definition at line 107 of file cache_handler.c.
 
47
.PP
 
48
References atime_newMarker(), atime_ready(), atime_setMarker(), netsnmp_agent_request_info_s::mode, netsnmp_mib_handler_s::myvoid, netsnmp_call_next_handler(), netsnmp_create_data_list(), release_cached_resources(), netsnmp_handler_registration_s::rootoid, netsnmp_handler_registration_s::rootoid_len, snmp_alarm_register(), and snmp_log().
 
49
.PP
 
50
Referenced by netsnmp_get_cache_handler().
 
51
.SS "netsnmp_cache* netsnmp_extract_cache_info (netsnmp_agent_request_info * reqinfo)"
 
52
.PP
 
53
Extract the cache information for a given request.
 
54
.PP
 
55
Definition at line 92 of file cache_handler.c.
 
56
.PP
 
57
Referenced by netsnmp_is_cache_valid().
 
58
.SS "\fBnetsnmp_mib_handler\fP* netsnmp_get_cache_handler (int timeout, NetsnmpCacheLoad * load_hook, NetsnmpCacheFree * free_hook, oid * rootoid, int rootoid_len)"
 
59
.PP
 
60
returns a cache handler that can be injected into a given handler chain.
 
61
.PP
 
62
Definition at line 39 of file cache_handler.c.
 
63
.PP
 
64
References netsnmp_mib_handler_s::myvoid, netsnmp_cache_helper_handler(), netsnmp_create_handler(), and SNMP_MALLOC_TYPEDEF.
 
65
.PP
 
66
Referenced by netsnmp_register_cache_handler().
 
67
.SS "int netsnmp_is_cache_valid (netsnmp_agent_request_info * reqinfo)"
 
68
.PP
 
69
Is the cache valid for a given request?
 
70
.PP
 
71
Definition at line 99 of file cache_handler.c.
 
72
.PP
 
73
References netsnmp_extract_cache_info().
 
74
.SS "int netsnmp_register_cache_handler (\fBnetsnmp_handler_registration\fP * reginfo, int timeout, NetsnmpCacheLoad * load_hook, NetsnmpCacheFree * free_hook)"
 
75
.PP
 
76
functionally the same as calling \fBnetsnmp_register_handler()\fP but also injects a cache handler at the same time for you.
 
77
.PP
 
78
Definition at line 78 of file cache_handler.c.
 
79
.PP
 
80
References netsnmp_get_cache_handler(), netsnmp_inject_handler(), netsnmp_register_handler(), netsnmp_handler_registration_s::rootoid, and netsnmp_handler_registration_s::rootoid_len.
 
81
.SS "void release_cached_resources (unsigned int regNo, void * clientargs)"
 
82
.PP
 
83
run regularly to automatically release cached resources.
 
84
.PP
 
85
Definition at line 206 of file cache_handler.c.
 
86
.PP
 
87
References atime_ready(), release_cached_resources(), and snmp_alarm_register().
 
88
.PP
 
89
Referenced by netsnmp_cache_helper_handler(), and release_cached_resources().