Mon Jul 20 07:58:54 2009 UTC ()
Formatting nit.


(wiz)
diff -r1.29 -r1.30 src/share/man/man4/ip.4

cvs diff -r1.29 -r1.30 src/share/man/man4/ip.4 (expand / switch to unified diff)

--- src/share/man/man4/ip.4 2009/07/19 23:17:33 1.29
+++ src/share/man/man4/ip.4 2009/07/20 07:58:54 1.30
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: ip.4,v 1.29 2009/07/19 23:17:33 minskim Exp $ 1.\" $NetBSD: ip.4,v 1.30 2009/07/20 07:58:54 wiz Exp $
2.\" 2.\"
3.\" Copyright (c) 1983, 1991, 1993 3.\" Copyright (c) 1983, 1991, 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of the University nor the names of its contributors 14.\" 3. Neither the name of the University nor the names of its contributors
@@ -180,27 +180,29 @@ The msg_control field in the msghdr stru @@ -180,27 +180,29 @@ The msg_control field in the msghdr stru
180that contains a cmsghdr structure followed by the 180that contains a cmsghdr structure followed by the
181.Tn TTL 181.Tn TTL
182value. 182value.
183The cmsghdr fields have the following values: 183The cmsghdr fields have the following values:
184.Bd -literal 184.Bd -literal
185cmsg_len = sizeof(uint8_t) 185cmsg_len = sizeof(uint8_t)
186cmsg_level = IPPROTO_IP 186cmsg_level = IPPROTO_IP
187cmsg_type = IP_RECVTTL 187cmsg_type = IP_RECVTTL
188.Ed 188.Ed
189.Pp 189.Pp
190The 190The
191.Dv IP_MINTTL 191.Dv IP_MINTTL
192option may be used on 192option may be used on
193.Dv SOCK_DGRAM or SOCK_STREAM 193.Dv SOCK_DGRAM
 194or
 195.Dv SOCK_STREAM
194sockets to discard packets with a TTL lower than the option value. 196sockets to discard packets with a TTL lower than the option value.
195This can be used to implement the 197This can be used to implement the
196.Em Generalized TTL Security Mechanism (GTSM) 198.Em Generalized TTL Security Mechanism (GTSM)
197according to RFC 3682. 199according to RFC 3682.
198To discard all packets with a TTL lower than 255: 200To discard all packets with a TTL lower than 255:
199.Bd -literal -offset indent 201.Bd -literal -offset indent
200int minttl = 255; 202int minttl = 255;
201setsockopt(s, IPPROTO_IP, IP_MINTTL, \*[Am]minttl, sizeof(minttl)); 203setsockopt(s, IPPROTO_IP, IP_MINTTL, \*[Am]minttl, sizeof(minttl));
202.Ed 204.Ed
203.Ss MULTICAST OPTIONS 205.Ss MULTICAST OPTIONS
204.Tn IP 206.Tn IP
205multicasting is supported only on 207multicasting is supported only on
206.Dv AF_INET 208.Dv AF_INET