document IP_PORTRANGE
This commit is contained in:
parent
72f8e09db9
commit
59557ec934
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: ip.4,v 1.4 1997/01/12 00:59:51 thorpej Exp $
|
||||
.\" $NetBSD: ip.4,v 1.5 1998/01/07 23:39:49 lukem Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1983, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
|
@ -111,6 +111,17 @@ int ttl = 60; /* max = 255 */
|
|||
setsockopt(s, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl));
|
||||
.Ed
|
||||
.Pp
|
||||
.Dv IP_PORTRANGE
|
||||
controls how ephemeral ports are allocated for
|
||||
.Dv SOCK_STREAM
|
||||
and
|
||||
.Dv SOCK_DGRAM
|
||||
sockets. For example,
|
||||
.Bd -literal
|
||||
int range = IP_PORTRANGE_LOW; /* see <netinet/in.h> */
|
||||
setsockopt(s, IPPROTO_IP, IP_PORTRANGE, &range, sizeof(range));
|
||||
.Ed
|
||||
.Pp
|
||||
If the
|
||||
.Dv IP_RECVDSTADDR
|
||||
option is enabled on a
|
||||
|
|
Loading…
Reference in New Issue