Skip to contentSkip to conversation

: Add AF_IUCV socket support

PATCH In review Frank Pavlic 2 participants 2 messages Feb 5, 2007 – Feb 6, 2007

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 7/7 : Add AF_IUCV socket support

From: Jennifer Hunt<[email protected]>

This patch adds AF_IUCV socket support.

---

 arch/s390/defconfig        |    1 
 include/linux/net.h        |    2 
 include/linux/socket.h     |    4 
 include/net/iucv/af_iucv.h |  106 ++++
 net/iucv/Kconfig           |    8 
 net/iucv/Makefile          |    1 
 net/iucv/af_iucv.c         | 1077 ++++++++++++++++++++++++++++++++++++++++++++
 7 files changed, 1197 insertions(+), 2 deletions(-)
arch/s390/defconfig +1 -0
index 56fe005..11a8049 100644
@@ -178,6 +178,7 @@ # CONFIG_XFRM_USER is not set
 # CONFIG_XFRM_SUB_POLICY is not set
 CONFIG_NET_KEY=y
 CONFIG_IUCV=m
+CONFIG_AFIUCV=m
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
include/linux/net.h +1 -1
index f28d8a2..4db21e6 100644
@@ -24,7 +24,7 @@ #include <asm/socket.h>
 struct poll_table_struct;
 struct inode;
 
-#define NPROTO		32		/* should be enough for now..	*/
+#define NPROTO		33		/* should be enough for now..	*/
 
 #define SYS_SOCKET	1		/* sys_socket(2)		*/
 #define SYS_BIND	2		/* sys_bind(2)			*/
include/linux/socket.h +3 -1
index 92cd38e..fcd35a2 100644
@@ -187,7 +187,8 @@ #define AF_WANPIPE	25	/* Wanpipe API Soc
 #define AF_LLC		26	/* Linux LLC			*/
 #define AF_TIPC		30	/* TIPC sockets			*/
 #define AF_BLUETOOTH	31	/* Bluetooth sockets 		*/
-#define AF_MAX		32	/* For now.. */
+#define AF_IUCV		32	/* IUCV sockets			*/
+#define AF_MAX		33	/* For now.. */
 
 /* Protocol families, same as address families. */
 #define PF_UNSPEC	AF_UNSPEC
@@ -220,6 +221,7 @@ #define PF_WANPIPE	AF_WANPIPE
 #define PF_LLC		AF_LLC
 #define PF_TIPC		AF_TIPC
 #define PF_BLUETOOTH	AF_BLUETOOTH
+#define PF_IUCV		AF_IUCV
 #define PF_MAX		AF_MAX
 
 /* Maximum queue length specifiable by listen.  */
include/net/iucv/af_iucv.h new file +106 -0

106 lines not on this page · raw message

net/iucv/Kconfig +8 -0
index 45ecf0b..f8fcc3d 100644
@@ -5,3 +5,11 @@ config IUCV
 	  Select this option if you want to use inter-user communication under
 	  VM or VIF sockets. If you run on z/VM, say "Y" to enable a fast
 	  communication link between VM guests.
+
+config AFIUCV
+	tristate "AF_IUCV support (VM only)"
+	depends on IUCV
+	help
+	  Select this option if you want to use inter-user communication under
+	  VM or VIF sockets. If you run on z/VM, say "Y" to enable a fast
+	  communication link between VM guests.
net/iucv/Makefile +1 -0
index 8759417..7bfdc85 100644
@@ -3,3 +3,4 @@ # Makefile for IUCV
 #
 
 obj-$(CONFIG_IUCV)	+= iucv.o
+obj-$(CONFIG_AFIUCV)	+= af_iucv.o
net/iucv/af_iucv.c new file +1077 -0

1,077 lines not on this page · raw message

Signature · 1 line
1.4.2.3
#1 lore raw

include/linux/net.h #include <asm/socket.h> · line 27

Quoted 2 lines
include/linux/net.h +1 -1
-#define NPROTO		32		/* should be enough for now..	*/
+#define NPROTO		33		/* should be enough for now..	*/

You can't simply increase NPROTO, but there should be holes left. Ask DaveM for a proper allocation.