index eb0d52883700bcbc1ffcb0dc194f6feaee3d8657..fd842c1b0caf8c6f48b64b03a7c7d1c2db9f5488 100644 (file)
const char *store_id; /* optional */
} sdb_proto_metric_t;
+typedef struct {
+ sdb_time_t last_update;
+ int parent_type;
+ const char *hostname; /* optional */
+ const char *parent;
+ const char *key;
+ const sdb_data_t *value;
+} sdb_proto_attribute_t;
+
/*
* sdb_proto_marshal:
* Encode the message into the wire format by adding an appropriate header.
* - a negative value else
*/
ssize_t
-sdb_proto_marshal_data(char *buf, size_t buf_len, sdb_data_t *datum);
+sdb_proto_marshal_data(char *buf, size_t buf_len, const sdb_data_t *datum);
/*
* sdb_proto_marshal_host, sdb_proto_marshal_service,
- * sdb_proto_marshal_metric:
+ * sdb_proto_marshal_metric, sdb_proto_marshal_attribute:
* Encode the basic information of a stored object into the wire format and
* write it to buf. These functions are similar to the sdb_store_<type>
* functions. See their documentation for details about the arguments.
ssize_t
sdb_proto_marshal_metric(char *buf, size_t buf_len,
const sdb_proto_metric_t *metric);
+ssize_t
+sdb_proto_marshal_attribute(char *buf, size_t buf_len,
+ const sdb_proto_attribute_t *attr);
/*
* sdb_proto_unmarshal_header: