summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_message.h
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2003-11-12 09:10:11 +0000
committerharti <harti@FreeBSD.org>2003-11-12 09:10:11 +0000
commit62ca2026d2904877a58af7213da132cee00309c6 (patch)
tree7ae274ce8beede36b0266914a1c3165d07953af2 /sys/netgraph/ng_message.h
parent7a8b48f087c4a62a12071799a28207667b63a16b (diff)
downloadFreeBSD-src-62ca2026d2904877a58af7213da132cee00309c6.zip
FreeBSD-src-62ca2026d2904877a58af7213da132cee00309c6.tar.gz
Double length of node names, hook names, command strings and types. Add
defines for these constants that include the trailing NUL byte. These new constants have SIZ in their name instead of LEN. As soon as all consumers in the tree are converted to use the new defines the old defines will be put under BURN_BRIDGES. Reviewed by: archie, julian, ru Approved by: re (in principle)
Diffstat (limited to 'sys/netgraph/ng_message.h')
-rw-r--r--sys/netgraph/ng_message.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/sys/netgraph/ng_message.h b/sys/netgraph/ng_message.h
index 637d494..ded9eb9 100644
--- a/sys/netgraph/ng_message.h
+++ b/sys/netgraph/ng_message.h
@@ -44,11 +44,21 @@
#define _NETGRAPH_NG_MESSAGE_H_
/* 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 */
OpenPOWER on IntegriCloud