[PATCH 27/27] libnetworking: Add rtems_socket.h

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


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

---
 cpukit/libfs/src/nfsclient/src/rpcio.c    |  1 +
 cpukit/libnetworking/Makefile.am          |  1 +
 cpukit/libnetworking/kern/uipc_socket.c   |  1 +
 cpukit/libnetworking/preinstall.am        |  4 ++++
 cpukit/libnetworking/rtems/rtems_socket.h | 28 ++++++++++++++++++++++++++++
 5 files changed, 35 insertions(+)
 create mode 100644 cpukit/libnetworking/rtems/rtems_socket.h

diff --git a/cpukit/libfs/src/nfsclient/src/rpcio.c b/cpukit/libfs/src/nfsclient/src/rpcio.c
index 2848225..598f4c9 100644
--- a/cpukit/libfs/src/nfsclient/src/rpcio.c
+++ b/cpukit/libfs/src/nfsclient/src/rpcio.c
@@ -72,6 +72,7 @@
 #include <rtems.h>
 #include <rtems/error.h>
 #include <rtems/rtems_bsdnet.h>
+#include <rtems/rtems_socket.h>
 #include <stdlib.h>
 #include <time.h>
 #include <rpc/rpc.h>
diff --git a/cpukit/libnetworking/Makefile.am b/cpukit/libnetworking/Makefile.am
index 5def014..58536bd 100644
--- a/cpukit/libnetworking/Makefile.am
+++ b/cpukit/libnetworking/Makefile.am
@@ -158,6 +158,7 @@ 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
+include_rtems_HEADERS += rtems/rtems_socket.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/kern/uipc_socket.c b/cpukit/libnetworking/kern/uipc_socket.c
index b221a37..0ec1972 100644
--- a/cpukit/libnetworking/kern/uipc_socket.c
+++ b/cpukit/libnetworking/kern/uipc_socket.c
@@ -45,6 +45,7 @@
 #include <sys/signalvar.h>
 #include <sys/sysctl.h>
 #include <limits.h>
+#include <rtems/rtems_socket.h>
 
 static int somaxconn = SOMAXCONN;
 SYSCTL_INT(_kern, KIPC_SOMAXCONN, somaxconn, CTLFLAG_RW, &somaxconn, 0, "");
diff --git a/cpukit/libnetworking/preinstall.am b/cpukit/libnetworking/preinstall.am
index 53f7026..53442d9 100644
--- a/cpukit/libnetworking/preinstall.am
+++ b/cpukit/libnetworking/preinstall.am
@@ -331,6 +331,10 @@ $(PROJECT_INCLUDE)/rtems/rtems_netinet_in.h: rtems/rtems_netinet_in.h $(PROJECT_
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems_netinet_in.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems_netinet_in.h
 
+$(PROJECT_INCLUDE)/rtems/rtems_socket.h: rtems/rtems_socket.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems_socket.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems_socket.h
+
 $(PROJECT_INCLUDE)/sys/$(dirstamp):
 	@$(MKDIR_P) $(PROJECT_INCLUDE)/sys
 	@: > $(PROJECT_INCLUDE)/sys/$(dirstamp)
diff --git a/cpukit/libnetworking/rtems/rtems_socket.h b/cpukit/libnetworking/rtems/rtems_socket.h
new file mode 100644
index 0000000..27a3f2b
--- /dev/null
+++ b/cpukit/libnetworking/rtems/rtems_socket.h
@@ -0,0 +1,28 @@
+/**
+ * @file rtems/rtems_socket.h
+ */
+
+#ifndef RTEMS_SOCKET_H
+#define RTEMS_SOCKET_H
+
+#include <rtems.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#define	SO_PRIVSTATE	0x1009		/* get/deny privileged state */
+#define SO_SNDWAKEUP	0x1020		/* wakeup when ready to send */
+#define SO_RCVWAKEUP	0x1021		/* wakeup when ready to receive */
+
+struct socket;
+struct	sockwakeup {
+	void	(*sw_pfn)(struct socket *, void *);
+	void	*sw_arg;
+};
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* RTEMS_SOCKET_H */
-- 
1.8.4.5




More information about the devel mailing list