1stash_cache(3)                     net-snmp                     stash_cache(3)
2
3
4

NAME

6       stash_cache - Automatically caches data for certain handlers.
7
8
9   Functions
10       netsnmp_stash_cache_info * netsnmp_get_new_stash_cache (void)
11       netsnmp_mib_handler * netsnmp_get_timed_bare_stash_cache_handler (int
12           timeout, oid *rootoid, size_t rootoid_len)
13           returns a stash_cache handler that can be injected into a given
14           handler chain (with the specified timeout and root OID values), but
15           *only* if that handler chain explicitly supports stash cache
16           processing.
17       netsnmp_mib_handler * netsnmp_get_bare_stash_cache_handler (void)
18           returns a single stash_cache handler that can be injected into a
19           given handler chain (with a fixed timeout), but *only* if that
20           handler chain explicitly supports stash cache processing.
21       netsnmp_mib_handler * netsnmp_get_stash_cache_handler (void)
22           returns a stash_cache handler sub-chain that can be injected into a
23           given (arbitrary) handler chain, using a fixed cache timeout.
24       netsnmp_mib_handler * netsnmp_get_timed_stash_cache_handler (int
25           timeout, oid *rootoid, size_t rootoid_len)
26           returns a stash_cache handler sub-chain that can be injected into a
27           given (arbitrary) handler chain, using a configurable cache
28           timeout.
29       netsnmp_oid_stash_node ** netsnmp_extract_stash_cache
30           (netsnmp_agent_request_info *reqinfo)
31           extracts a pointer to the stash_cache info from the reqinfo
32           structure.
33       int netsnmp_stash_cache_helper (netsnmp_mib_handler *handler,
34           netsnmp_handler_registration *reginfo, netsnmp_agent_request_info
35           *reqinfo, netsnmp_request_info *requests)
36       int _netsnmp_stash_cache_load (netsnmp_cache *cache, void *magic)
37           updates a given cache depending on whether it needs to or not.
38       void _netsnmp_stash_cache_free (netsnmp_cache *cache, void *magic)
39       void netsnmp_init_stash_cache_helper (void)
40           initializes the stash_cache helper which then registers a
41           stash_cache handler as a run-time injectable handler for
42           configuration file use.
43

Detailed Description

45       Automatically caches data for certain handlers.
46
47       This handler caches data in an optimized way which may aleviate the
48       need for the lower level handlers to perform as much optimization.
49       Specifically, somewhere in the lower level handlers must be a handler
50       that supports the MODE_GET_STASH operation. Note that the
51       table_iterator helper supports this.
52

Function Documentation

54   int _netsnmp_stash_cache_load (netsnmp_cache * cache, void * magic)
55       updates a given cache depending on whether it needs to or not.
56
57       Definition at line 190 of file stash_cache.c.
58
59       References netsnmp_stash_cache_info_s::cache,
60       netsnmp_cache_s::cache_hint, netsnmp_handler_args_s::handler,
61       netsnmp_cache_s::magic, netsnmp_agent_request_info_s::mode,
62       netsnmp_agent_add_list_data(), netsnmp_call_next_handler(),
63       netsnmp_create_data_list(), netsnmp_get_new_stash_cache(),
64       netsnmp_mib_handler_s::next, NULL, netsnmp_handler_args_s::reginfo,
65       netsnmp_handler_args_s::reqinfo, and netsnmp_handler_args_s::requests.
66
67       Referenced by netsnmp_get_timed_bare_stash_cache_handler().
68
69   netsnmp_oid_stash_node** netsnmp_extract_stash_cache
70       (netsnmp_agent_request_info * reqinfo)
71       extracts a pointer to the stash_cache info from the reqinfo structure.
72
73       Definition at line 112 of file stash_cache.c.
74
75       References netsnmp_agent_get_list_data().
76
77       Referenced by netsnmp_stash_to_next_helper(), and
78       netsnmp_table_iterator_helper_handler().
79
80   netsnmp_mib_handler* netsnmp_get_bare_stash_cache_handler (void)
81       returns a single stash_cache handler that can be injected into a given
82       handler chain (with a fixed timeout), but *only* if that handler chain
83       explicitly supports stash cache processing.
84
85       Definition at line 78 of file stash_cache.c.
86
87       References netsnmp_get_timed_bare_stash_cache_handler(), and NULL.
88
89       Referenced by netsnmp_get_stash_cache_handler().
90
91   netsnmp_mib_handler* netsnmp_get_stash_cache_handler (void)
92       returns a stash_cache handler sub-chain that can be injected into a
93       given (arbitrary) handler chain, using a fixed cache timeout.
94
95       Definition at line 87 of file stash_cache.c.
96
97       References netsnmp_get_bare_stash_cache_handler(),
98       netsnmp_get_stash_to_next_handler(), and netsnmp_mib_handler_s::next.
99
100       Referenced by netsnmp_init_stash_cache_helper().
101
102   netsnmp_mib_handler* netsnmp_get_timed_bare_stash_cache_handler (int
103       timeout, oid * rootoid, size_t rootoid_len)
104       returns a stash_cache handler that can be injected into a given handler
105       chain (with the specified timeout and root OID values), but *only* if
106       that handler chain explicitly supports stash cache processing.
107
108       Definition at line 44 of file stash_cache.c.
109
110       References _netsnmp_stash_cache_free(), _netsnmp_stash_cache_load(),
111       netsnmp_mib_handler_s::myvoid, netsnmp_cache_create(),
112       netsnmp_cache_handler_get(), netsnmp_create_handler(),
113       netsnmp_handler_free(), netsnmp_stash_cache_helper(),
114       netsnmp_mib_handler_s::next, and NULL.
115
116       Referenced by netsnmp_get_bare_stash_cache_handler(), and
117       netsnmp_get_timed_stash_cache_handler().
118
119   netsnmp_mib_handler* netsnmp_get_timed_stash_cache_handler (int timeout,
120       oid * rootoid, size_t rootoid_len)
121       returns a stash_cache handler sub-chain that can be injected into a
122       given (arbitrary) handler chain, using a configurable cache timeout.
123
124       Definition at line 100 of file stash_cache.c.
125
126       References netsnmp_get_stash_to_next_handler(),
127       netsnmp_get_timed_bare_stash_cache_handler(), and
128       netsnmp_mib_handler_s::next.
129
130   void netsnmp_init_stash_cache_helper (void)
131       initializes the stash_cache helper which then registers a stash_cache
132       handler as a run-time injectable handler for configuration file use.
133
134       Definition at line 233 of file stash_cache.c.
135
136       References netsnmp_get_stash_cache_handler(), and
137       netsnmp_register_handler_by_name().
138
139       Referenced by netsnmp_init_helpers().
140
141
142
143Version 5.4                       24 Nov 2006                   stash_cache(3)
Impressum