Prepare for DPDK 19.08 support
[samplevnf.git] / VNFs / DPPD-PROX / prox_lua_types.c
index 7a0b6e0..3ef3d47 100644 (file)
@@ -39,6 +39,7 @@
 #include "handle_qinq_encap4.h"
 #include "toeplitz.h"
 #include "handle_lb_5tuple.h"
+#include "prox_compat.h"
 
 #if RTE_VERSION < RTE_VERSION_NUM(1,8,0,0)
 #define RTE_CACHE_LINE_SIZE CACHE_LINE_SIZE
@@ -182,7 +183,7 @@ int lua_to_ip6(struct lua_State *L, enum lua_place from, const char *name, uint8
        return 0;
 }
 
-int lua_to_mac(struct lua_State *L, enum lua_place from, const char *name, struct ether_addr *mac)
+int lua_to_mac(struct lua_State *L, enum lua_place from, const char *name, prox_rte_ether_addr *mac)
 {
        uint32_t n_entries;
        uint32_t mac_array[4];
@@ -345,7 +346,7 @@ int lua_to_string(struct lua_State *L, enum lua_place from, const char *name, ch
        }
        str = lua_tostring(L, -1);
 
-       strncpy(dst, str, size);
+       prox_strncpy(dst, str, size);
 
        lua_pop(L, pop);
        return 0;
@@ -418,7 +419,7 @@ int lua_to_next_hop(struct lua_State *L, enum lua_place from, const char *name,
        uint32_t port_id;
        uint32_t ip;
        uint32_t mpls;
-       struct ether_addr mac;
+       prox_rte_ether_addr mac;
        int pop;
 
        if ((pop = lua_getfrom(L, from, name)) < 0)
@@ -462,7 +463,7 @@ int lua_to_next_hop6(struct lua_State *L, enum lua_place from, const char *name,
 {
        struct next_hop6 *ret;
        uint32_t next_hop_index, port_id, mpls;
-       struct ether_addr mac;
+       prox_rte_ether_addr mac;
        uint8_t ip[16];
        int pop;
 
@@ -918,7 +919,7 @@ int lua_to_cpe_table_data(struct lua_State *L, enum lua_place from, const char *
        struct ip4_subnet cidr;
        uint32_t n_entries = 0;
        uint32_t port_idx, gre_id, svlan, cvlan, user;
-       struct ether_addr mac;
+       prox_rte_ether_addr mac;
        uint32_t idx = 0;
 
        lua_pushnil(L);