Mark sockets where the kernel chose the port# for.
This can be used by netstat to behave more intelligently.
This commit is contained in:
parent
5f87a4a8a6
commit
321a284625
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)in_pcb.c 8.4 (Berkeley) 5/24/95
|
||||
* $Id: in_pcb.c,v 1.19 1996/05/31 05:11:22 peter Exp $
|
||||
* $Id: in_pcb.c,v 1.20 1996/08/12 14:05:54 peter Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -202,6 +202,8 @@ in_pcbbind(inp, nam)
|
||||
ushort first, last;
|
||||
int count;
|
||||
|
||||
inp->inp_flags |= INP_ANONPORT;
|
||||
|
||||
if (inp->inp_flags & INP_HIGHPORT) {
|
||||
first = ipport_hifirstauto; /* sysctl */
|
||||
last = ipport_hilastauto;
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)in_pcb.h 8.1 (Berkeley) 6/10/93
|
||||
* $Id: in_pcb.h,v 1.10 1995/12/05 21:26:34 bde Exp $
|
||||
* $Id: in_pcb.h,v 1.11 1996/02/22 21:32:22 peter Exp $
|
||||
*/
|
||||
|
||||
#ifndef _NETINET_IN_PCB_H_
|
||||
@ -80,6 +80,7 @@ struct inpcbinfo {
|
||||
#define INP_HDRINCL 0x08 /* user supplies entire IP header */
|
||||
#define INP_HIGHPORT 0x10 /* user wants "high" port binding */
|
||||
#define INP_LOWPORT 0x20 /* user wants "low" port binding */
|
||||
#define INP_ANONPORT 0x40 /* port chosen for user */
|
||||
|
||||
#define INPLOOKUP_WILDCARD 1
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user