00001
00002
00003
00004
00005 #if !defined(_INCLUDED_SUL_SNMP_H_HEADER__)
00006 #define _INCLUDED_SUL_SNMP_H_HEADER__
00007
00008 #if defined(WITH_LIBNETSNMP)
00009
00010 #include <net-snmp/net-snmp-config.h>
00011 #include <net-snmp/net-snmp-includes.h>
00012
00016 typedef struct snmp_query_t
00017 {
00018 apr_pool_t *pool;
00019 netsnmp_session *ss;
00020 netsnmp_pdu *response;
00021 netsnmp_pdu *pdu;
00022 netsnmp_variable_list *vars;
00023 netsnmp_variable_list *iter;
00024 apr_array_header_t *paths;
00025 oid rname[MAX_OID_LEN];
00026 size_t rlen;
00027 } snmp_query_t;
00028
00032 SUL_DECLARE(sul_error_t *)
00033 snmp_initialize(signed argc, char **argv, apr_pool_t *pool);
00034
00038 SUL_DECLARE(sul_error_t *)
00039 snmp_query_create(snmp_query_t **query, const char *server,
00040 const char *community, apr_pool_t *pool);
00041
00045 SUL_DECLARE(sul_error_t *)
00046 snmp_query_add(snmp_query_t *query, const char *key, const char *path);
00047
00051 SUL_DECLARE(sul_error_t *)
00052 snmp_query_walk(snmp_query_t *query, const char *path);
00053
00057 SUL_DECLARE(sul_error_t *)
00058 snmp_query_iterate(snmp_query_t *query, netsnmp_variable_list **var);
00059
00063 SUL_DECLARE(sul_error_t *)
00064 snmp_query_execute(snmp_query_t *query);
00065
00066 #endif
00067
00068 #endif