X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Flibcollectdclient%2Fcollectd%2Fclient.h;h=ea812c1b6774971239c2259760ed9aa78197bedc;hp=8604ff6b2b2762ec20fcce0f9dd7705e62322a05;hb=1159cb5d383c55a80a0db100b8f7aadcf44740a5;hpb=c3d354c58d56c4b2bb4138a227f3546928bd84f2 diff --git a/src/libcollectdclient/collectd/client.h b/src/libcollectdclient/collectd/client.h index 8604ff6b..ea812c1b 100644 --- a/src/libcollectdclient/collectd/client.h +++ b/src/libcollectdclient/collectd/client.h @@ -27,7 +27,8 @@ #ifndef LIBCOLLECTD_COLLECTDCLIENT_H #define LIBCOLLECTD_COLLECTDCLIENT_H 1 -#include "lcc_features.h" +#include "collectd/lcc_features.h" +#include "collectd/types.h" /* COLLECTD_TRACE is the environment variable used to control trace output. When * set to something non-zero, all lines sent to / received from the daemon are @@ -39,62 +40,12 @@ /* * Includes (for data types) */ -#include #include +#include #include -/* - * Defines - */ -#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; - -struct lcc_identifier_s { - char host[LCC_NAME_LEN]; - char plugin[LCC_NAME_LEN]; - char plugin_instance[LCC_NAME_LEN]; - char type[LCC_NAME_LEN]; - char type_instance[LCC_NAME_LEN]; -}; -typedef struct lcc_identifier_s lcc_identifier_t; -#define LCC_IDENTIFIER_INIT \ - { "localhost", "", "", "", "" } - -struct lcc_value_list_s { - value_t *values; - int *values_types; - size_t values_len; - double time; - double interval; - lcc_identifier_t identifier; -}; -typedef struct lcc_value_list_s lcc_value_list_t; -#define LCC_VALUE_LIST_INIT \ - { NULL, NULL, 0, 0, 0, LCC_IDENTIFIER_INIT } - struct lcc_connection_s; typedef struct lcc_connection_s lcc_connection_t;