summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSebastian Benoit <benno@cvs.openbsd.org>2015-10-20 20:22:43 +0000
committerSebastian Benoit <benno@cvs.openbsd.org>2015-10-20 20:22:43 +0000
commit88ab0d0c810f11565e2824074aeaa22271362d2b (patch)
tree7f8afa300de5e1b2210cf5ad9e2de9573bff4acc /share
parentd0745ab1593a099ccda19b36e5f94bc6bb482393 (diff)
add a new getsockopt option IP_IPDEFTTL to retrieve the default ttl.
this can be used as an alternative to sysctl net.inet.ip.ttl, in programs that use pledge(). ok reyk@, "Like this" deraadt@
Diffstat (limited to 'share')
-rw-r--r--share/man/man4/ip.411
1 files changed, 8 insertions, 3 deletions
diff --git a/share/man/man4/ip.4 b/share/man/man4/ip.4
index 537d6e7226b..72b60dc7545 100644
--- a/share/man/man4/ip.4
+++ b/share/man/man4/ip.4
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ip.4,v 1.36 2015/09/10 17:55:21 schwarze Exp $
+.\" $OpenBSD: ip.4,v 1.37 2015/10/20 20:22:42 benno Exp $
.\" $NetBSD: ip.4,v 1.3 1994/11/30 16:22:19 jtc Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
@@ -30,7 +30,7 @@
.\"
.\" @(#)ip.4 8.2 (Berkeley) 11/30/93
.\"
-.Dd $Mdocdate: September 10 2015 $
+.Dd $Mdocdate: October 20 2015 $
.Dt IP 4
.Os
.Sh NAME
@@ -97,8 +97,10 @@ fields in the
.Tn IP
header for
.Dv SOCK_STREAM
-and
+,
.Dv SOCK_DGRAM
+and
+.Dv SOCK_RAW
sockets.
For example,
.Bd -literal -offset indent
@@ -109,6 +111,9 @@ int ttl = 60; /* max = 255 */
setsockopt(s, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl));
.Ed
.Pp
+.Dv IP_IPDEFTTL
+can be used to retrieve the system wide default ttl.
+.Pp
If the
.Dv IP_RECVDSTADDR
option is enabled on a