From owner-p4-projects@FreeBSD.ORG Fri Sep 19 22:01:00 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B97481065672; Fri, 19 Sep 2008 22:01:00 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CC25106566C for ; Fri, 19 Sep 2008 22:01:00 +0000 (UTC) (envelope-from zec@tel.fer.hr) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6E03F8FC19 for ; Fri, 19 Sep 2008 22:01:00 +0000 (UTC) (envelope-from zec@tel.fer.hr) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id m8JM10Lb000890 for ; Fri, 19 Sep 2008 22:01:00 GMT (envelope-from zec@tel.fer.hr) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m8JM0xGJ000810 for perforce@freebsd.org; Fri, 19 Sep 2008 22:00:59 GMT (envelope-from zec@tel.fer.hr) Date: Fri, 19 Sep 2008 22:00:59 GMT Message-Id: <200809192200.m8JM0xGJ000810@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zec@tel.fer.hr using -f From: Marko Zec To: Perforce Change Reviews Cc: Subject: PERFORCE change 150146 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Sep 2008 22:01:01 -0000 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 +#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_ */