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 _at__at_ -44,11 +44,21 _at__at_ #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 _at__at_ -62,7 +62,7 _at__at_ * 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_at_fokus.fraunhofer.de, harti_at_freebsd.orgReceived on Mon Nov 10 2003 - 02:06:09 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:28 UTC