From 59557ec9340e1405dbcae81b21ace72cb7145357 Mon Sep 17 00:00:00 2001 From: lukem Date: Wed, 7 Jan 1998 23:39:49 +0000 Subject: [PATCH] document IP_PORTRANGE --- share/man/man4/ip.4 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/share/man/man4/ip.4 b/share/man/man4/ip.4 index d7bee9fe647f..722eabb6f14a 100644 --- a/share/man/man4/ip.4 +++ b/share/man/man4/ip.4 @@ -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 */ +setsockopt(s, IPPROTO_IP, IP_PORTRANGE, &range, sizeof(range)); +.Ed +.Pp If the .Dv IP_RECVDSTADDR option is enabled on a