/*****************************************************************************
- * RRDtool 1.2.23 Copyright by Tobi Oetiker, 1997-2007
+ * RRDtool 1.3rc7 Copyright by Tobi Oetiker, 1997-2008
*****************************************************************************
* rrdlib.h Public header file for librrd
*****************************************************************************
#include <time.h>
#include <stdio.h> /* for FILE */
+
+/* Formerly rrd_nan_inf.h */
+#ifndef DNAN
+# define DNAN set_to_DNAN()
+#endif
+
+#ifndef DINF
+# define DINF set_to_DINF()
+#endif
+ double set_to_DNAN(
+ void);
+ double set_to_DINF(
+ void);
+/* end of rrd_nan_inf.h */
+
/* Transplanted from rrd_format.h */
typedef double rrd_value_t; /* the data storage type is
* double */
off_t pos; /* current pos in file */
} rrd_file_t;
+/* rrd info interface */
+ typedef struct rrd_blob_t {
+ unsigned long size; /* size of the blob */
+ unsigned char *ptr; /* pointer */
+ } rrd_blob_t;
+
+ enum info_type { RD_I_VAL = 0,
+ RD_I_CNT,
+ RD_I_STR,
+ RD_I_INT,
+ RD_I_BLO
+ };
+
+ typedef union infoval {
+ unsigned long u_cnt;
+ rrd_value_t u_val;
+ char *u_str;
+ int u_int;
+ struct rrd_blob_t u_blo;
+ } infoval;
+
+ typedef struct info_t {
+ char *key;
+ enum info_type type;
+ union infoval value;
+ struct info_t *next;
+ } info_t;
+
+
/* main function blocks */
int rrd_create(
int,
FILE *,
double *,
double *);
+ info_t *rrd_graph_v(
+ int,
+ char **);
+
int rrd_fetch(
int,
char **,
unsigned long *step,
unsigned long *ds_cnt,
char ***ds_namv,
- rrd_value_t ** data);
+ rrd_value_t **data);
int rrd_dump_r(
const char *filename,
char *outname);
/* END parsetime.h */
struct rrd_context {
- int len;
- int errlen;
- char *lib_errstr;
- char *rrd_error;
+ char lib_errstr[256];
+ char rrd_error[4096];
};
/* returns the current per-thread rrd_context */