ip.4 (50476) | ip.4 (57676) |
---|---|
1.\" Copyright (c) 1983, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 16 unchanged lines hidden (view full) --- 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)ip.4 8.2 (Berkeley) 11/30/93 | 1.\" Copyright (c) 1983, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 16 unchanged lines hidden (view full) --- 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)ip.4 8.2 (Berkeley) 11/30/93 |
33.\" $FreeBSD: head/share/man/man4/ip.4 50476 1999-08-28 00:22:10Z peter $ | 33.\" $FreeBSD: head/share/man/man4/ip.4 57676 2000-03-01 14:50:24Z sheldonh $ |
34.\" 35.Dd November 30, 1993 36.Dt IP 4 37.Os BSD 4.2 38.Sh NAME 39.Nm ip 40.Nd Internet Protocol 41.Sh SYNOPSIS --- 56 unchanged lines hidden (view full) --- 98.Dv IP_TTL 99may be used to set the type-of-service and time-to-live 100fields in the 101.Tn IP 102header for 103.Dv SOCK_STREAM 104and 105.Dv SOCK_DGRAM | 34.\" 35.Dd November 30, 1993 36.Dt IP 4 37.Os BSD 4.2 38.Sh NAME 39.Nm ip 40.Nd Internet Protocol 41.Sh SYNOPSIS --- 56 unchanged lines hidden (view full) --- 98.Dv IP_TTL 99may be used to set the type-of-service and time-to-live 100fields in the 101.Tn IP 102header for 103.Dv SOCK_STREAM 104and 105.Dv SOCK_DGRAM |
106sockets. For example, | 106sockets. 107For example, |
107.Bd -literal 108int tos = IPTOS_LOWDELAY; /* see <netinet/in.h> */ 109setsockopt(s, IPPROTO_IP, IP_TOS, &tos, sizeof(tos)); 110 111int ttl = 60; /* max = 255 */ 112setsockopt(s, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl)); 113.Ed 114.Pp --- 17 unchanged lines hidden (view full) --- 132.Bd -literal 133cmsg_len = sizeof(struct in_addr) 134cmsg_level = IPPROTO_IP 135cmsg_type = IP_RECVDSTADDR 136.Ed 137.Pp 138.Dv IP_PORTRANGE 139may be used to set the port range used for selecting a local port number | 108.Bd -literal 109int tos = IPTOS_LOWDELAY; /* see <netinet/in.h> */ 110setsockopt(s, IPPROTO_IP, IP_TOS, &tos, sizeof(tos)); 111 112int ttl = 60; /* max = 255 */ 113setsockopt(s, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl)); 114.Ed 115.Pp --- 17 unchanged lines hidden (view full) --- 133.Bd -literal 134cmsg_len = sizeof(struct in_addr) 135cmsg_level = IPPROTO_IP 136cmsg_type = IP_RECVDSTADDR 137.Ed 138.Pp 139.Dv IP_PORTRANGE 140may be used to set the port range used for selecting a local port number |
140on a socket with an unspecified (zero) port number. It has the following | 141on a socket with an unspecified (zero) port number. 142It has the following |
141possible values: 142.Bl -tag -width IP_PORTRANGE_DEFAULT 143.It Dv IP_PORTRANGE_DEFAULT 144use the default range of values, normally 145.Dv IPPORT_RESERVED 146through 147.Dv IPPORT_USERRESERVED . 148This is adjustable through the sysctl setting: --- 268 unchanged lines hidden --- | 143possible values: 144.Bl -tag -width IP_PORTRANGE_DEFAULT 145.It Dv IP_PORTRANGE_DEFAULT 146use the default range of values, normally 147.Dv IPPORT_RESERVED 148through 149.Dv IPPORT_USERRESERVED . 150This is adjustable through the sysctl setting: --- 268 unchanged lines hidden --- |