summaryrefslogtreecommitdiffstats
path: root/lib/libnetgraph/netgraph.3
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2003-11-14 08:09:01 +0000
committerharti <harti@FreeBSD.org>2003-11-14 08:09:01 +0000
commit5afef437ec54d7ed580bdaa624ab0b12f3ee34cc (patch)
tree4d988635293cd2327c4c416a4d2f0a7470cb6301 /lib/libnetgraph/netgraph.3
parent1f9203cd5b28f620e81b7be1684d19b587cf56c3 (diff)
downloadFreeBSD-src-5afef437ec54d7ed580bdaa624ab0b12f3ee34cc.zip
FreeBSD-src-5afef437ec54d7ed580bdaa624ab0b12f3ee34cc.tar.gz
Use the new defines that include the trailing '\0' in the code.
Replace occurences of the magic constant 2 with an offsetof macro call that computes the size of the leading members of the sockaddr. Use strlcpy instead of sprintf where appropriate. Document the new changes in the man page.
Diffstat (limited to 'lib/libnetgraph/netgraph.3')
-rw-r--r--lib/libnetgraph/netgraph.34
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libnetgraph/netgraph.3 b/lib/libnetgraph/netgraph.3
index f847701..b50ccee 100644
--- a/lib/libnetgraph/netgraph.3
+++ b/lib/libnetgraph/netgraph.3
@@ -174,7 +174,7 @@ bytes.
If
.Fa "path"
is non-NULL, it must point to a buffer of at least
-.Dv "NG_PATHLEN + 1"
+.Dv "NG_PATHSIZ"
bytes, which will be filled in (and NUL terminated) with the path to
the node from which the message was received.
.Pp
@@ -216,7 +216,7 @@ and stores it in
which must be large enough to hold the entire packet. If
.Fa "hook"
is non-NULL, it must point to a buffer of at least
-.Dv "NG_HOOKLEN + 1"
+.Dv "NG_HOOKSIZ"
bytes, which will be filled in (and NUL terminated) with the name of
the hook on which the data was received.
.Pp
OpenPOWER on IntegriCloud