security: use net library to include IP structs
authorTal Shnaiderman <talshn@nvidia.com>
Wed, 6 Oct 2021 22:35:41 +0000 (22:35 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 7 Oct 2021 12:47:35 +0000 (14:47 +0200)
Remove the netinet includes and replaces them
with rte_ip.h to support the in_addr/in6_addr structs
on all operating systems.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: William Tu <u9012063@gmail.com>
lib/net/rte_ip.h
lib/security/meson.build
lib/security/rte_security.h

index 05948b6..bbd8650 100644 (file)
@@ -25,6 +25,7 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <netinet/ip.h>
+#include <netinet/ip6.h>
 #endif
 
 #include <rte_byteorder.h>
index 5679c8b..1034a7a 100644 (file)
@@ -3,4 +3,4 @@
 
 sources = files('rte_security.c')
 headers = files('rte_security.h', 'rte_security_driver.h')
-deps += ['mempool', 'cryptodev']
+deps += ['mempool', 'cryptodev', 'net']
index a10c9b5..2013e65 100644 (file)
@@ -19,13 +19,10 @@ extern "C" {
 
 #include <sys/types.h>
 
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <netinet/ip6.h>
-
 #include <rte_compat.h>
 #include <rte_common.h>
 #include <rte_crypto.h>
+#include <rte_ip.h>
 #include <rte_mbuf.h>
 #include <rte_mbuf_dyn.h>
 #include <rte_memory.h>