0fe3a37924
This patch adds functionality to create a JSON message in order to send it to a client socket. When stats are requested by a client, they are retrieved from the metrics library and encoded in JSON format. Signed-off-by: Ciara Power <ciara.power@intel.com> Signed-off-by: Brian Archbold <brian.archbold@intel.com> Signed-off-by: Kevin Laatz <kevin.laatz@intel.com> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
37 lines
879 B
C
37 lines
879 B
C
/* SPDX-License-Identifier: BSD-3-Clause
|
|
* Copyright(c) 2018 Intel Corporation
|
|
*/
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include "rte_telemetry_internal.h"
|
|
|
|
#ifndef _RTE_TELEMETRY_SOCKET_TESTING_H_
|
|
#define _RTE_TELEMETRY_SOCKET_TESTING_H_
|
|
|
|
int32_t
|
|
rte_telemetry_json_socket_message_test(struct telemetry_impl *telemetry,
|
|
int fd);
|
|
|
|
int32_t
|
|
rte_telemetry_invalid_json_test(struct telemetry_impl *telemetry, int fd);
|
|
|
|
int32_t
|
|
rte_telemetry_valid_json_test(struct telemetry_impl *telemetry, int fd);
|
|
|
|
int32_t
|
|
rte_telemetry_json_contents_test(struct telemetry_impl *telemetry, int fd);
|
|
|
|
int32_t
|
|
rte_telemetry_json_empty_test(struct telemetry_impl *telemetry, int fd);
|
|
|
|
int32_t
|
|
rte_telemetry_socket_register_test(struct telemetry_impl *telemetry, int *fd,
|
|
int send_fd, int recv_fd);
|
|
|
|
int32_t
|
|
rte_telemetry_socket_test_setup(struct telemetry_impl *telemetry, int *send_fd,
|
|
int *recv_fd);
|
|
|
|
#endif
|