[PATCH 13/27] libnetworking: Add prototype for in_cksum.

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


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

---
 cpukit/libnetworking/Makefile.am              |  1 +
 cpukit/libnetworking/netinet/igmp.c           |  1 +
 cpukit/libnetworking/netinet/in_cksum_sparc.h |  1 +
 cpukit/libnetworking/netinet/ip_icmp.c        |  1 +
 cpukit/libnetworking/netinet/tcp_input.c      |  1 +
 cpukit/libnetworking/netinet/tcp_output.c     |  1 +
 cpukit/libnetworking/netinet/tcp_subr.c       |  1 +
 cpukit/libnetworking/netinet/tcp_usrreq.c     |  1 +
 cpukit/libnetworking/netinet/udp_usrreq.c     |  1 +
 cpukit/libnetworking/preinstall.am            |  4 ++++
 cpukit/libnetworking/rtems/rtems_netinet_in.h | 30 +++++++++++++++++++++++++++
 11 files changed, 43 insertions(+)
 create mode 100644 cpukit/libnetworking/rtems/rtems_netinet_in.h

diff --git a/cpukit/libnetworking/Makefile.am b/cpukit/libnetworking/Makefile.am
index 6ef2f71..424bd25 100644
--- a/cpukit/libnetworking/Makefile.am
+++ b/cpukit/libnetworking/Makefile.am
@@ -156,6 +156,7 @@ include_rtems_HEADERS += rtems/ftpfs.h
 include_rtems_HEADERS += rtems/mkrootfs.h
 include_rtems_HEADERS += rtems/rtems_mii_ioctl.h
 include_rtems_HEADERS += rtems/rtems_netdb.h
+include_rtems_HEADERS += rtems/rtems_netinet_in.h
 
 libnetworking_a_SOURCES += rtems/sghostname.c \
     rtems/rtems_glue.c rtems/rtems_malloc_mbuf.c rtems/rtems_syscall.c \
diff --git a/cpukit/libnetworking/netinet/igmp.c b/cpukit/libnetworking/netinet/igmp.c
index 9372331..4ecd0ea 100644
--- a/cpukit/libnetworking/netinet/igmp.c
+++ b/cpukit/libnetworking/netinet/igmp.c
@@ -60,6 +60,7 @@
 #include <net/route.h>
 
 #include <netinet/in.h>
+#include <rtems/rtems_netinet_in.h>
 #include <netinet/in_var.h>
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
diff --git a/cpukit/libnetworking/netinet/in_cksum_sparc.h b/cpukit/libnetworking/netinet/in_cksum_sparc.h
index 5864b6a..b88ce92 100644
--- a/cpukit/libnetworking/netinet/in_cksum_sparc.h
+++ b/cpukit/libnetworking/netinet/in_cksum_sparc.h
@@ -82,6 +82,7 @@
 #include <sys/systm.h>
 #include <sys/mbuf.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_icmp.c b/cpukit/libnetworking/netinet/ip_icmp.c
index fd8f8da..001cd49 100644
--- a/cpukit/libnetworking/netinet/ip_icmp.c
+++ b/cpukit/libnetworking/netinet/ip_icmp.c
@@ -50,6 +50,7 @@
 
 #define _IP_VHL
 #include <netinet/in.h>
+#include <rtems/rtems_netinet_in.h>
 #include <netinet/in_pcb.h>
 #include <netinet/in_systm.h>
 #include <netinet/in_var.h>
diff --git a/cpukit/libnetworking/netinet/tcp_input.c b/cpukit/libnetworking/netinet/tcp_input.c
index a01a3d6..49144c2 100644
--- a/cpukit/libnetworking/netinet/tcp_input.c
+++ b/cpukit/libnetworking/netinet/tcp_input.c
@@ -55,6 +55,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/tcp_output.c b/cpukit/libnetworking/netinet/tcp_output.c
index d23656f..5cb0a25 100644
--- a/cpukit/libnetworking/netinet/tcp_output.c
+++ b/cpukit/libnetworking/netinet/tcp_output.c
@@ -48,6 +48,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/tcp_subr.c b/cpukit/libnetworking/netinet/tcp_subr.c
index 75f6657..f576e56 100644
--- a/cpukit/libnetworking/netinet/tcp_subr.c
+++ b/cpukit/libnetworking/netinet/tcp_subr.c
@@ -55,6 +55,7 @@
 
 #define _IP_VHL
 #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/tcp_usrreq.c b/cpukit/libnetworking/netinet/tcp_usrreq.c
index 03ed9f0..f288b68 100644
--- a/cpukit/libnetworking/netinet/tcp_usrreq.c
+++ b/cpukit/libnetworking/netinet/tcp_usrreq.c
@@ -54,6 +54,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/udp_usrreq.c b/cpukit/libnetworking/netinet/udp_usrreq.c
index e34f6c4..1125c45 100644
--- a/cpukit/libnetworking/netinet/udp_usrreq.c
+++ b/cpukit/libnetworking/netinet/udp_usrreq.c
@@ -52,6 +52,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/preinstall.am b/cpukit/libnetworking/preinstall.am
index feef3ff..468f379 100644
--- a/cpukit/libnetworking/preinstall.am
+++ b/cpukit/libnetworking/preinstall.am
@@ -323,6 +323,10 @@ $(PROJECT_INCLUDE)/rtems/rtems_netdb.h: rtems/rtems_netdb.h $(PROJECT_INCLUDE)/r
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems_netdb.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems_netdb.h
 
+$(PROJECT_INCLUDE)/rtems/rtems_netinet_in.h: rtems/rtems_netinet_in.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems_netinet_in.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems_netinet_in.h
+
 $(PROJECT_INCLUDE)/sys/$(dirstamp):
 	@$(MKDIR_P) $(PROJECT_INCLUDE)/sys
 	@: > $(PROJECT_INCLUDE)/sys/$(dirstamp)
diff --git a/cpukit/libnetworking/rtems/rtems_netinet_in.h b/cpukit/libnetworking/rtems/rtems_netinet_in.h
new file mode 100644
index 0000000..0f7b091
--- /dev/null
+++ b/cpukit/libnetworking/rtems/rtems_netinet_in.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2016 embedded brains GmbH.  All rights reserved.
+ *
+ *  embedded brains GmbH
+ *  Dornierstr. 4
+ *  82178 Puchheim
+ *  Germany
+ *  <rtems at embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#ifndef RTEMS_NETINET_IN_H
+#define RTEMS_NETINET_IN_H
+
+#include <rtems.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+int	 in_cksum(struct mbuf *, int);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* RTEMS_NETINET_IN_H */
-- 
1.8.4.5




More information about the devel mailing list