[PATCH 17/27] libnetworking: Add ip_fw_chk_t and ip_fw_ctl_t.

Christian Mauderer christian.mauderer at embedded-brains.de
Fri Jun 24 09:38:36 UTC 2016


From: Christian Mauderer <Christian.Mauderer at embedded-brains.de>

Add the types and pointers for firewall.
---
 cpukit/libnetworking/netinet/ip_fw.c          | 1 +
 cpukit/libnetworking/netinet/ip_input.c       | 1 +
 cpukit/libnetworking/netinet/ip_output.c      | 1 +
 cpukit/libnetworking/netinet/raw_ip.c         | 1 +
 cpukit/libnetworking/rtems/rtems_netinet_in.h | 8 ++++++++
 5 files changed, 12 insertions(+)

diff --git a/cpukit/libnetworking/netinet/ip_fw.c b/cpukit/libnetworking/netinet/ip_fw.c
index 6a891df..89eff2a 100644
--- a/cpukit/libnetworking/netinet/ip_fw.c
+++ b/cpukit/libnetworking/netinet/ip_fw.c
@@ -37,6 +37,7 @@
 #include <net/if.h>
 #include <net/route.h>
 #include <netinet/in.h>
+#include <rtems/rtems_netinet_in.h>
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
diff --git a/cpukit/libnetworking/netinet/ip_input.c b/cpukit/libnetworking/netinet/ip_input.c
index 77b5045..a898bde 100644
--- a/cpukit/libnetworking/netinet/ip_input.c
+++ b/cpukit/libnetworking/netinet/ip_input.c
@@ -59,6 +59,7 @@
 #include <net/netisr.h>
 
 #include <netinet/in.h>
+#include <rtems/rtems_netinet_in.h>
 #include <netinet/in_systm.h>
 #include <netinet/in_var.h>
 #include <netinet/ip.h>
diff --git a/cpukit/libnetworking/netinet/ip_output.c b/cpukit/libnetworking/netinet/ip_output.c
index db81ccb..304a349 100644
--- a/cpukit/libnetworking/netinet/ip_output.c
+++ b/cpukit/libnetworking/netinet/ip_output.c
@@ -51,6 +51,7 @@
 #include <net/route.h>
 
 #include <netinet/in.h>
+#include <rtems/rtems_netinet_in.h>
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <netinet/in_pcb.h>
diff --git a/cpukit/libnetworking/netinet/raw_ip.c b/cpukit/libnetworking/netinet/raw_ip.c
index 746aed1..7647b8c 100644
--- a/cpukit/libnetworking/netinet/raw_ip.c
+++ b/cpukit/libnetworking/netinet/raw_ip.c
@@ -54,6 +54,7 @@
 
 #define _IP_VHL
 #include <netinet/in.h>
+#include <rtems/rtems_netinet_in.h>
 #include <netinet/in_systm.h>
 #include <netinet/in_pcb.h>
 #include <netinet/in_var.h>
diff --git a/cpukit/libnetworking/rtems/rtems_netinet_in.h b/cpukit/libnetworking/rtems/rtems_netinet_in.h
index 3c716df..3940d92 100644
--- a/cpukit/libnetworking/rtems/rtems_netinet_in.h
+++ b/cpukit/libnetworking/rtems/rtems_netinet_in.h
@@ -16,6 +16,7 @@
 #define RTEMS_NETINET_IN_H
 
 #include <rtems.h>
+#include <netinet/in.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -34,6 +35,13 @@ extern "C" {
 
 int	 in_cksum(struct mbuf *, int);
 
+/* Firewall hooks */
+struct ip;
+typedef	int ip_fw_chk_t(struct ip**, int, struct ifnet*, int, struct mbuf**);
+typedef	int ip_fw_ctl_t(int, struct mbuf**);
+extern	ip_fw_chk_t *ip_fw_chk_ptr;
+extern	ip_fw_ctl_t *ip_fw_ctl_ptr;
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
-- 
1.8.4.5




More information about the devel mailing list