From owner-freebsd-current@FreeBSD.ORG Mon Nov 10 03:06:09 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C534A16A4CE for ; Mon, 10 Nov 2003 03:06:09 -0800 (PST) Received: from mailhub.fokus.fraunhofer.de (mailhub.fokus.fraunhofer.de [193.174.154.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 332CE43FB1 for ; Mon, 10 Nov 2003 03:06:08 -0800 (PST) (envelope-from brandt@fokus.fraunhofer.de) Received: from beagle (beagle [193.175.132.100])hAAB67U15093 for ; Mon, 10 Nov 2003 12:06:07 +0100 (MET) Date: Mon, 10 Nov 2003 12:06:07 +0100 (CET) From: Harti Brandt To: current@freebsd.org Message-ID: <20031110115300.C29745@beagle.fokus.fraunhofer.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Bumping netgraph name sizes X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2003 11:06:09 -0000 Hi all, after some discussion among people working on netgraph (julian, archie, ru, brooks, emax and harti) it was decided that we need to bump several constants that define the size of names (node, hook, command string names) in netgraph because they turn out to be too short for several applications that need longer names. This change breaks the current netgraph ABI in the sense, that user programs and the kernel must be in sync and that externally maintained netgraph nodes and programs must be recompiled. Otherwise the functioning of netgraph should be unaffected (still some testing going on). We want to have this change in the tree before 5.2 for exactly this reason. If anybody has a reason why this would be a bad idea (and break something) we would like to hear that now. Attached is the corresponding patch. Regards, harti Index: sys/netgraph/ng_message.h =================================================================== RCS file: /export/cvs/freebsd/src/sys/netgraph/ng_message.h,v retrieving revision 1.18 diff -u -r1.18 ng_message.h --- sys/netgraph/ng_message.h 22 Oct 2003 07:35:05 -0000 1.18 +++ sys/netgraph/ng_message.h 10 Nov 2003 11:04:07 -0000 @@ -44,11 +44,21 @@ #define _NETGRAPH_NG_MESSAGE_H_ 1 /* ASCII string size limits */ -#define NG_TYPELEN 15 /* max type name len (16 with null) */ -#define NG_HOOKLEN 15 /* max hook name len (16 with null) */ -#define NG_NODELEN 15 /* max node name len (16 with null) */ -#define NG_PATHLEN 511 /* max path len (512 with null) */ -#define NG_CMDSTRLEN 15 /* max command string (16 with null) */ +#define NG_TYPESIZ 32 /* max type name len (including null) */ +#define NG_HOOKSIZ 32 /* max hook name len (including null) */ +#define NG_NODESIZ 32 /* max node name len (including null) */ +#define NG_PATHSIZ 512 /* max path len (including null) */ +#define NG_CMDSTRSIZ 32 /* max command string (including null) */ + +/* #ifndef BURN_BRIDGES */ +/* don't use these - they will go away */ +#define NG_TYPELEN (NG_TYPESIZ - 1) +#define NG_HOOKLEN (NG_HOOKSIZ - 1) +#define NG_NODELEN (NG_NODESIZ - 1) +#define NG_PATHLEN (NG_PATHSIZ - 1) +#define NG_CMDSTRLEN (NG_CMDSTRSIZ - 1) +/* #endif */ + #define NG_TEXTRESPONSE 1024 /* allow this length for a text response */ /* A netgraph message */ Index: sys/netgraph/netgraph.h =================================================================== RCS file: /export/cvs/freebsd/src/sys/netgraph/netgraph.h,v retrieving revision 1.35 diff -u -r1.35 netgraph.h --- sys/netgraph/netgraph.h 22 Aug 2002 00:30:03 -0000 1.35 +++ sys/netgraph/netgraph.h 10 Nov 2003 11:04:07 -0000 @@ -62,7 +62,7 @@ * Change it for NETGRAPH_DEBUG version so we cannot mix debug and non debug * modules. */ -#define _NG_ABI_VERSION 6 +#define _NG_ABI_VERSION 7 #ifdef NETGRAPH_DEBUG /*----------------------------------------------*/ #define NG_ABI_VERSION (_NG_ABI_VERSION + 0x10000) #else /* NETGRAPH_DEBUG */ /*----------------------------------------------*/ -- harti brandt, http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private brandt@fokus.fraunhofer.de, harti@freebsd.org