summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1997-02-05 14:40:40 +0000
committerderaadt <deraadt@openbsd.org>1997-02-05 14:40:40 +0000
commit0fb161b79ba356c92db8e774fcf3c15038440229 (patch)
treecde87de0e82ecf33bf89fda3a56cbbdbd928b2bb
parentmv comment to proper place (diff)
downloadwireguard-openbsd-0fb161b79ba356c92db8e774fcf3c15038440229.tar.xz
wireguard-openbsd-0fb161b79ba356c92db8e774fcf3c15038440229.zip
document that ip_off and ip_len are now in network byte order
-rw-r--r--share/man/man4/ip.46
1 files changed, 5 insertions, 1 deletions
diff --git a/share/man/man4/ip.4 b/share/man/man4/ip.4
index cfb7cfdf7c7..c351178e1c1 100644
--- a/share/man/man4/ip.4
+++ b/share/man/man4/ip.4
@@ -324,9 +324,13 @@ the fields of the IP header, including the following:
ip->ip_v = IPVERSION;
ip->ip_hl = hlen >> 2;
ip->ip_id = 0; /* 0 means kernel set appropriate value */
-ip->ip_off = offset;
+ip->ip_off = htons(offset);
+ip->ip_len = htons(len);
.Ed
.sp .5
+Additionally note that starting with
+.Tn OpenBSD 2.1
+the ip_off and ip_len fields are in network byte order.
If the header source address is set to
.Dv INADDR_ANY,
the kernel will choose an appropriate address.