1row_merge(3) net-snmp row_merge(3)
2
3
4
6 row_merge - Calls sub handlers with request for one row at a time.
7
8
9 Defines
10 #define ROW_MERGE_WAITING 0
11 #define ROW_MERGE_ACTIVE 1
12 #define ROW_MERGE_DONE 2
13 #define ROW_MERGE_HEAD 3
14
15 Functions
16 netsnmp_mib_handler * netsnmp_get_row_merge_handler (int prefix_len)
17 returns a row_merge handler that can be injected into a given
18 handler chain.
19 int netsnmp_register_row_merge (netsnmp_handler_registration *reginfo)
20 functionally the same as calling netsnmp_register_handler() but
21 also injects a row_merge handler at the same time for you.
22 netsnmp_row_merge_status * netsnmp_row_merge_status_get
23 (netsnmp_handler_registration *reginfo, netsnmp_agent_request_info
24 *reqinfo, int create_missing)
25 retrieve row_merge_status
26 int netsnmp_row_merge_status_first (netsnmp_handler_registration
27 *reginfo, netsnmp_agent_request_info *reqinfo)
28 Determine if this is the first row.
29 int netsnmp_row_merge_status_last (netsnmp_handler_registration
30 *reginfo, netsnmp_agent_request_info *reqinfo)
31 Determine if this is the last row.
32 int netsnmp_row_merge_helper_handler (netsnmp_mib_handler *handler,
33 netsnmp_handler_registration *reginfo, netsnmp_agent_request_info
34 *reqinfo, netsnmp_request_info *requests)
35 Implements the row_merge handler.
36 void netsnmp_init_row_merge (void)
37 initializes the row_merge helper which then registers a row_merge
38 handler as a run-time injectable handler for configuration file
39 use.
40
42 Calls sub handlers with request for one row at a time.
43
44 This helper splits a whole bunch of requests into chunks based on the
45 row index that they refer to, and passes all requests for a given row
46 to the lower handlers. This is useful for handlers that don't want to
47 process multiple rows at the same time, but are happy to iterate
48 through the request list for a single row.
49
51 netsnmp_mib_handler* netsnmp_get_row_merge_handler (int prefix_len)
52 returns a row_merge handler that can be injected into a given handler
53 chain.
54
55 Definition at line 28 of file row_merge.c.
56
57 References netsnmp_mib_handler_s::myvoid, netsnmp_create_handler(),
58 netsnmp_row_merge_helper_handler(), and NULL.
59
60 Referenced by netsnmp_init_row_merge(), and
61 netsnmp_register_row_merge().
62
63 void netsnmp_init_row_merge (void)
64 initializes the row_merge helper which then registers a row_merge
65 handler as a run-time injectable handler for configuration file use.
66
67 Definition at line 360 of file row_merge.c.
68
69 References netsnmp_get_row_merge_handler(), and
70 netsnmp_register_handler_by_name().
71
72 int netsnmp_register_row_merge (netsnmp_handler_registration * reginfo)
73 functionally the same as calling netsnmp_register_handler() but also
74 injects a row_merge handler at the same time for you.
75
76 Definition at line 42 of file row_merge.c.
77
78 References netsnmp_get_row_merge_handler(), netsnmp_inject_handler(),
79 netsnmp_register_handler(), and
80 netsnmp_handler_registration_s::rootoid_len.
81
82 int netsnmp_row_merge_helper_handler (netsnmp_mib_handler * handler,
83 netsnmp_handler_registration * reginfo, netsnmp_agent_request_info *
84 reqinfo, netsnmp_request_info * requests)
85 Implements the row_merge handler.
86
87 Definition at line 154 of file row_merge.c.
88
89 References netsnmp_mib_handler_s::myvoid, variable_list::name,
90 variable_list::name_length, netsnmp_row_merge_status_get(),
91 netsnmp_request_info_s::next, netsnmp_request_info_s::requestvb,
92 netsnmp_handler_registration_s::rootoid, and
93 netsnmp_handler_registration_s::rootoid_len.
94
95 Referenced by netsnmp_get_row_merge_handler().
96
97 int netsnmp_row_merge_status_first (netsnmp_handler_registration * reginfo,
98 netsnmp_agent_request_info * reqinfo)
99 Determine if this is the first row.
100
101 returns 1 if this is the first row for this pass of the handler.
102
103 Definition at line 110 of file row_merge.c.
104
105 References netsnmp_row_merge_status_x::count,
106 netsnmp_row_merge_status_x::current, netsnmp_row_merge_status_get(),
107 and NULL.
108
109 netsnmp_row_merge_status* netsnmp_row_merge_status_get
110 (netsnmp_handler_registration * reginfo, netsnmp_agent_request_info *
111 reqinfo, int create_missing)
112 retrieve row_merge_status
113
114 Definition at line 67 of file row_merge.c.
115
116 References netsnmp_agent_add_list_data(),
117 netsnmp_agent_get_list_data(), netsnmp_create_data_list(), NULL,
118 snmp_log(), and SNMP_MALLOC_TYPEDEF.
119
120 Referenced by netsnmp_row_merge_helper_handler(),
121 netsnmp_row_merge_status_first(), and netsnmp_row_merge_status_last().
122
123 int netsnmp_row_merge_status_last (netsnmp_handler_registration * reginfo,
124 netsnmp_agent_request_info * reqinfo)
125 Determine if this is the last row.
126
127 returns 1 if this is the last row for this pass of the handler.
128
129 Definition at line 130 of file row_merge.c.
130
131 References netsnmp_row_merge_status_x::count,
132 netsnmp_row_merge_status_x::current, netsnmp_row_merge_status_get(),
133 NULL, and netsnmp_row_merge_status_x::rows.
134
135
136
137Version 5.4 24 Nov 2006 row_merge(3)