Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Sep 2008 22:00:59 GMT
From:      Marko Zec <zec@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 150146 for review
Message-ID:  <200809192200.m8JM0xGJ000810@repoman.freebsd.org>

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

Change 150146 by zec@zec_tpx32 on 2008/09/19 22:00:31

	netgraph.h assimilates vnetgraph.h

Affected files ...

.. //depot/projects/vimage-commit2/src/sys/netgraph/netgraph.h#5 edit
.. //depot/projects/vimage-commit2/src/sys/netgraph/vnetgraph.h#2 delete

Differences ...

==== //depot/projects/vimage-commit2/src/sys/netgraph/netgraph.h#5 (text+ko) ====

@@ -1183,6 +1183,34 @@
 #define NGI_GET_META(i,m)
 #define	ng_copy_meta(meta) NULL
 
-#include <netgraph/vnetgraph.h>
+#define INIT_VNET_NETGRAPH(vnet) \
+	INIT_FROM_VNET(vnet, VNET_MOD_NETGRAPH, \
+	    struct vnet_netgraph, vnet_netgraph)
+
+#define VNET_NETGRAPH(sym)	VSYM(vnet_netgraph, sym)
+
+#define NG_ID_HASH_SIZE 32 /* most systems wont need even this many */
+#define NG_NAME_HASH_SIZE 128 /* most systems wont need even this many */
+
+#ifdef VIMAGE
+struct vnet_netgraph {
+	LIST_HEAD(, ng_node) _ng_ID_hash[NG_ID_HASH_SIZE];
+	LIST_HEAD(, ng_node) _ng_name_hash[NG_ID_HASH_SIZE];
+	LIST_HEAD(, ng_node) _ng_nodelist;
+	ng_ID_t		_nextID;
+	struct unrhdr	*_ng_iface_unit;
+	struct unrhdr	*_ng_eiface_unit;
+	struct unrhdr	*_ng_wormhole_unit;
+};
+#endif
+
+/* Symbol translation macros */
+#define V_ng_ID_hash		VNET_NETGRAPH(ng_ID_hash)
+#define V_ng_name_hash		VNET_NETGRAPH(ng_name_hash)
+#define V_ng_nodelist		VNET_NETGRAPH(ng_nodelist)
+#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_NETGRAPH_H_ */



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