| 1 |
#ifndef UCD_SNMP_PROXY_H |
| 2 |
#define UCD_SNMP_PROXY_H |
| 3 |
|
| 4 |
/* |
| 5 |
* @name: OID of the tree that is being proxied. |
| 6 |
* @name_len: Length of @name. |
| 7 |
* @base: Optional. If specified, the OID that @name is replaced with before |
| 8 |
* an SNMP request is forwarded. |
| 9 |
* @base_len: Length of @base. |
| 10 |
* @context: Context string specified via <-Cn [contextname]>. |
| 11 |
* @sess: Session associated with this proxy. |
| 12 |
* @next: Next proxy in the single-linked proxy list. |
| 13 |
* |
| 14 |
* See also the Proxy Support section in the snmpd.conf(5) man page. |
| 15 |
*/ |
| 16 |
struct simple_proxy { |
| 17 |
oid name[MAX_OID_LEN]; |
| 18 |
size_t name_len; |
| 19 |
oid base[MAX_OID_LEN]; |
| 20 |
size_t base_len; |
| 21 |
char *context; |
| 22 |
netsnmp_session *sess; |
| 23 |
struct simple_proxy *next; |
| 24 |
}; |
| 25 |
|
| 26 |
int proxy_got_response(int, netsnmp_session *, int, |
| 27 |
netsnmp_pdu *, void *); |
| 28 |
void proxy_parse_config(const char *, char *); |
| 29 |
void init_proxy(void); |
| 30 |
void shutdown_proxy(void); |
| 31 |
Netsnmp_Node_Handler proxy_handler; |
| 32 |
|
| 33 |
#endif /* UCD_SNMP_PROXY_H */ |