summaryrefslogtreecommitdiff
path: root/lib/librte_telemetry/rte_telemetry_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/librte_telemetry/rte_telemetry_internal.h')
-rw-r--r--lib/librte_telemetry/rte_telemetry_internal.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/librte_telemetry/rte_telemetry_internal.h b/lib/librte_telemetry/rte_telemetry_internal.h
index 569d56a..e3292cf 100644
--- a/lib/librte_telemetry/rte_telemetry_internal.h
+++ b/lib/librte_telemetry/rte_telemetry_internal.h
@@ -3,6 +3,7 @@
*/
#include <rte_log.h>
+#include <rte_tailq.h>
#ifndef _RTE_TELEMETRY_INTERNAL_H_
#define _RTE_TELEMETRY_INTERNAL_H_
@@ -23,6 +24,12 @@ extern int telemetry_log_level;
#define TELEMETRY_LOG_INFO(fmt, args...) \
TELEMETRY_LOG(INFO, fmt, ## args)
+typedef struct telemetry_client {
+ char *file_path;
+ int fd;
+ TAILQ_ENTRY(telemetry_client) client_list;
+} telemetry_client;
+
typedef struct telemetry_impl {
int accept_fd;
int server_fd;
@@ -31,6 +38,24 @@ typedef struct telemetry_impl {
uint32_t socket_id;
int reg_index;
int metrics_register_done;
+ TAILQ_HEAD(, telemetry_client) client_list_head;
+ struct telemetry_client *request_client;
+ int register_fail_count;
} telemetry_impl;
+int32_t
+rte_telemetry_parse_client_message(struct telemetry_impl *telemetry, char *buf);
+
+int32_t
+rte_telemetry_send_error_response(struct telemetry_impl *telemetry,
+ int error_type);
+
+int32_t
+rte_telemetry_register_client(struct telemetry_impl *telemetry,
+ const char *client_path);
+
+int32_t
+rte_telemetry_unregister_client(struct telemetry_impl *telemetry,
+ const char *client_path);
+
#endif