X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Flibcollectdclient%2Fclient.h;h=11e7b13cc31575ee83d598a1f75984ae19b09e63;hb=552e81eebd54e4dc7a5d290a1ec4be769bef4a24;hp=e4aa759df1a8c0131bdc8fd155b0b3dd554ecc65;hpb=2090dc52cf05a0b05e5d31f1f47737a2be4006e5;p=collectd.git diff --git a/src/libcollectdclient/client.h b/src/libcollectdclient/client.h index e4aa759d..11e7b13c 100644 --- a/src/libcollectdclient/client.h +++ b/src/libcollectdclient/client.h @@ -22,30 +22,44 @@ #ifndef LIBCOLLECTD_COLLECTDCLIENT_H #define LIBCOLLECTD_COLLECTDCLIENT_H 1 +#include "lcc_features.h" + /* * Includes (for data types) */ -#include +#if HAVE_STDINT_H +# include +#endif #include #include /* * Defines */ -#define LCC_VERSION 0 #define LCC_NAME_LEN 64 #define LCC_DEFAULT_PORT "25826" /* * Types */ +#define LCC_TYPE_COUNTER 0 +#define LCC_TYPE_GAUGE 1 +#define LCC_TYPE_DERIVE 2 +#define LCC_TYPE_ABSOLUTE 3 + +LCC_BEGIN_DECLS + typedef uint64_t counter_t; typedef double gauge_t; +typedef uint64_t derive_t; +typedef uint64_t absolute_t; union value_u { counter_t counter; gauge_t gauge; + derive_t derive; + absolute_t absolute; }; typedef union value_u value_t; @@ -63,6 +77,7 @@ typedef struct lcc_identifier_s lcc_identifier_t; struct lcc_value_list_s { value_t *values; + int *values_types; size_t values_len; time_t time; int interval; @@ -86,7 +101,8 @@ int lcc_getval (lcc_connection_t *c, lcc_identifier_t *ident, int lcc_putval (lcc_connection_t *c, const lcc_value_list_t *vl); -int lcc_flush (lcc_connection_t *c, lcc_identifier_t *ident, int timeout); +int lcc_flush (lcc_connection_t *c, const char *plugin, + lcc_identifier_t *ident, int timeout); int lcc_listval (lcc_connection_t *c, lcc_identifier_t **ret_ident, size_t *ret_ident_num); @@ -100,5 +116,7 @@ int lcc_identifier_to_string (lcc_connection_t *c, int lcc_string_to_identifier (lcc_connection_t *c, lcc_identifier_t *ident, const char *string); +LCC_END_DECLS + /* vim: set sw=2 sts=2 et : */ #endif /* LIBCOLLECTD_COLLECTDCLIENT_H */