summaryrefslogtreecommitdiff
path: root/src/rrdbotd.h
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2006-01-26 09:54:31 +0000
committerStef Walter <stef@memberwebs.com>2006-01-26 09:54:31 +0000
commit1ded2732d4c290dbff64d8091def1f70b76f6282 (patch)
tree4aa4dfa403304e9ee59cce693263ca607b36502f /src/rrdbotd.h
parent7fcead4473bc224bc8c6a66e2db3b3ee87f751d4 (diff)
SNMP support coded in.
Diffstat (limited to 'src/rrdbotd.h')
-rw-r--r--src/rrdbotd.h31
1 files changed, 26 insertions, 5 deletions
diff --git a/src/rrdbotd.h b/src/rrdbotd.h
index 9c4f2b4..974c8f4 100644
--- a/src/rrdbotd.h
+++ b/src/rrdbotd.h
@@ -39,18 +39,23 @@
#ifndef __RRDBOTD_H__
#define __RRDBOTD_H__
+#include <values.h>
+
#include "asn1.h"
#include "snmp.h"
-#include "sock_any.h"
+#include "sock-any.h"
#include "hash.h"
/* -----------------------------------------------------------------------------
* DATA
*/
+#define RB_UNKNOWN -DBL_MAX
+
struct _rb_item;
struct _rb_poller;
struct _rb_host;
+struct _rb_request;
/*
* Note that all the members are either in the config memory
@@ -59,10 +64,14 @@ struct _rb_host;
typedef struct _rb_item
{
+ struct _rb_request* req;
+
/* Specific to this item */
const char* rrdfield;
- struct snmp_value value;
- const char* community;
+ struct snmp_value snmpfield;
+
+ /* The last value / current request */
+ double value;
/* Pointers to related */
const struct _rb_poller* poller;
@@ -76,6 +85,8 @@ rb_item;
typedef struct _rb_host
{
const char* name;
+ const char* community;
+ int version;
/* Host resolving and book keeping */
struct sockaddr_any address;
@@ -89,13 +100,14 @@ rb_host;
typedef struct _rb_poller
{
- /* The hash key is interval-rrdname */
+ /* The hash key is interval-timeout:rrdname */
char key[MAXPATHLEN];
/* This points into the memory above */
const char* rrdname;
uint32_t interval;
+ uint32_t timeout;
/* The things to poll. rb_poller owns this list */
rb_item* items;
@@ -113,6 +125,8 @@ typedef struct _rb_state
/* Settings from command line */
const char* confdir;
const char* rrddir;
+ uint retries;
+ uint timeout;
/* All the pollers/hosts */
rb_poller* polls;
@@ -148,6 +162,13 @@ void rb_config_free();
* SNMP HELPERS (snmp-help.c)
*/
-int rb_parse_mib(const char* oid, struct snmp_value* value);
+int rb_snmp_parse_mib(const char* oid, struct snmp_value* value);
+
+/* -----------------------------------------------------------------------------
+ * SNMP ENGINE (snmp-engine.c)
+ */
+
+void rb_snmp_engine_init();
+void rb_snmp_engine_uninit();
#endif /* __RRDBOTD_H__ */