From e8fabe3f6313a3b9050fe16458e4714d9dce426e Mon Sep 17 00:00:00 2001 From: Mauro Sardara Date: Fri, 1 Feb 2019 17:12:38 +0100 Subject: [HICN-10] Compile libtransport with libmemif support Change-Id: I81d1cb4d5f16a61c35f66fe347985f05d8c97383 Signed-off-by: Mauro Sardara --- .../src/hicn/transport/core/memif_connector.h | 27 +++------------------- 1 file changed, 3 insertions(+), 24 deletions(-) (limited to 'libtransport/src/hicn/transport/core/memif_connector.h') diff --git a/libtransport/src/hicn/transport/core/memif_connector.h b/libtransport/src/hicn/transport/core/memif_connector.h index 4667ec0b2..ff838930f 100644 --- a/libtransport/src/hicn/transport/core/memif_connector.h +++ b/libtransport/src/hicn/transport/core/memif_connector.h @@ -32,33 +32,11 @@ #define _Static_assert static_assert -extern "C" { -#include -}; - namespace transport { namespace core { -typedef struct { - uint16_t index; - /* memif conenction handle */ - memif_conn_handle_t conn; - /* transmit queue id */ - uint16_t tx_qid; - /* tx buffers */ - memif_buffer_t *tx_bufs; - /* allocated tx buffers counter */ - /* number of tx buffers pointing to shared memory */ - uint16_t tx_buf_num; - /* rx buffers */ - memif_buffer_t *rx_bufs; - /* allcoated rx buffers counter */ - /* number of rx buffers pointing to shared memory */ - uint16_t rx_buf_num; - /* interface ip address */ - uint8_t ip_addr[4]; -} memif_connection_t; +typedef struct memif_connection memif_connection_t; #define APP_NAME "libtransport" #define IF_NAME "vpp_connection" @@ -68,6 +46,7 @@ typedef struct { #define MEMIF_LOG2_RING_SIZE 11 class MemifConnector : public Connector { + typedef void *memif_conn_handle_t; public: MemifConnector(PacketReceivedCallback &&receive_callback, OnReconnect &&on_reconnect_callback, @@ -135,7 +114,7 @@ class MemifConnector : public Connector { asio::io_service &io_service_; std::unique_ptr work_; uint32_t packet_counter_; - memif_connection_t memif_connection_; + std::unique_ptr memif_connection_; uint16_t tx_buf_counter_; PacketRing input_buffer_; -- cgit 1.2.3-korg