[PATCH 07/29] libnetworking: Add prototype for in_cksum.

Christian Mauderer christian.mauderer at embedded-brains.de
Mon Apr 25 15:06:41 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.c             |  1 +
 cpukit/libnetworking/netinet/in_cksum_sparc.h |  1 +
 cpukit/libnetworking/preinstall.am            |  4 ++++
 cpukit/libnetworking/rtems/rtems_netinet_in.h | 30 +++++++++++++++++++++++++++
 6 files changed, 38 insertions(+)
 create mode 100644 cpukit/libnetworking/rtems/rtems_netinet_in.h

diff --git a/cpukit/libnetworking/Makefile.am b/cpukit/libnetworking/Makefile.am
index cf14ef0..ef00f40 100644
--- a/cpukit/libnetworking/Makefile.am
+++ b/cpukit/libnetworking/Makefile.am
@@ -145,6 +145,7 @@ include_rtems_HEADERS += rtems/mkrootfs.h
 include_rtems_HEADERS += rtems/rtems_mii_ioctl.h
 include_rtems_HEADERS += rtems/rtems_socket.h
 include_rtems_HEADERS += rtems/rtems_net_if.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.c b/cpukit/libnetworking/netinet/in.c
index a23d4f5..2173418 100644
--- a/cpukit/libnetworking/netinet/in.c
+++ b/cpukit/libnetworking/netinet/in.c
@@ -46,6 +46,7 @@
 #include <sys/sysctl.h>
 
 #include <net/if.h>
+#include <rtems/rtems_net_if.h>
 #include <net/route.h>
 
 #include <netinet/in_systm.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/preinstall.am b/cpukit/libnetworking/preinstall.am
index a92eb67..dcaa5d2 100644
--- a/cpukit/libnetworking/preinstall.am
+++ b/cpukit/libnetworking/preinstall.am
@@ -294,6 +294,10 @@ $(PROJECT_INCLUDE)/rtems/rtems_net_if.h: rtems/rtems_net_if.h $(PROJECT_INCLUDE)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems_net_if.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems_net_if.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