Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Aug 2007 16:30:17 GMT
From:      Marko Zec <zec@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 124837 for review
Message-ID:  <200708071630.l77GUHE6087418@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=124837

Change 124837 by zec@zec_tpx32 on 2007/08/07 16:30:15

	Initial netgraph wormhole implementation.
	
	A "worm" node can be used to establish a datapath between
	independent netgraph address spaces, i.e. between two virtual
	network stacks.  A wormhole path is defined by a pair of
	wormhole nodes each residing in a different stack instance.
	Each node accepts only a single arbitrarily named hook.  Once
	a wormhole datapath is established, all data messages received
	on the local hook will be forwarded to the hook connected to
	the remote node, and vice versa.
	
	"worm" nodes understand two node-specific messages: "peer" and
	"status".  The "peer" message is used to specify the remote
	endpoint in form of "remote_worm_node_name@remote_vnet_name",
	or to fetch the current peering configuration if invoked
	without arguments.  Both involved nodes must configure their
	peerings before the datapath will be established.  The "status"
	command can be used to check the current state of the wormhole
	path, which can be one of unconfigured, pending or active.

Affected files ...

.. //depot/projects/vimage/src/sys/modules/netgraph/Makefile#4 edit
.. //depot/projects/vimage/src/sys/netgraph/ng_wormhole.c#1 add
.. //depot/projects/vimage/src/sys/netgraph/vnetgraph.h#6 edit
.. //depot/projects/vimage/src/sys/sys/vimage.h#32 edit

Differences ...

==== //depot/projects/vimage/src/sys/modules/netgraph/Makefile#4 (text+ko) ====

@@ -51,7 +51,8 @@
 	tty \
 	UI \
 	vjc \
-	vlan
+	vlan \
+	wormhole
 
 .if ${MACHINE_ARCH} == "i386"
 _sync_ar=	sync_ar

==== //depot/projects/vimage/src/sys/netgraph/vnetgraph.h#6 (text+ko) ====

@@ -50,6 +50,7 @@
 	ng_ID_t		_nextID;
 	struct unrhdr	*_ng_iface_unit;
 	struct unrhdr	*_ng_eiface_unit;
+	struct unrhdr	*_ng_wormhole_unit;
 };
 #endif
 
@@ -59,5 +60,6 @@
 #define V_nextID		VNET_NETGRAPH(nextID)
 #define V_ng_iface_unit		VNET_NETGRAPH(ng_iface_unit)
 #define V_ng_eiface_unit	VNET_NETGRAPH(ng_eiface_unit)
+#define V_ng_wormhole_unit	VNET_NETGRAPH(ng_wormhole_unit)
 
 #endif /* !_NETGRAPH_VNETGRAPH_H_ */

==== //depot/projects/vimage/src/sys/sys/vimage.h#32 (text+ko) ====

@@ -68,6 +68,7 @@
 #define V_CPU		3
 
 #define VNET_MOD_NONE		-1 
+/*statefull modules */
 #define VNET_MOD_NET		 0
 #define VNET_MOD_NETGRAPH	 1
 #define VNET_MOD_INET		 2
@@ -79,7 +80,8 @@
 #define VNET_MOD_ALTQ		 8
 #define VNET_MOD_IPX		 9
 #define VNET_MOD_ATALK		10
-
+/* stateless modules */
+#define VNET_MOD_NG_WORMHOLE	19
 #define VNET_MOD_NG_ETHER	20
 #define VNET_MOD_NG_IFACE	21
 #define VNET_MOD_NG_EIFACE	22



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708071630.l77GUHE6087418>