Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Oct 1998 23:00:46 -0700
From:      Don Lewis <Don.Lewis@tsc.tdk.com>
To:        Nicholas Charles Brawn <ncb05@uow.edu.au>, freebsd-net@FreeBSD.ORG
Subject:   Re: How does kernel assign local port?
Message-ID:  <199810250600.XAA24646@salsa.gv.tsc.tdk.com>
In-Reply-To: Nicholas Charles Brawn <ncb05@uow.edu.au> "How does kernel assign local port?" (Oct 25,  4:03pm)

next in thread | previous in thread | raw e-mail | index | archive | help
On Oct 25,  4:03pm, Nicholas Charles Brawn wrote:
} Subject: How does kernel assign local port?
} I've looked through uipc_syscalls.c and uipc_socket.c to try to
} determine how & where the kernel assigns the local port a client program
} (ie telnet(1)) binds to. I've specifically looked at connect() and
} soconnect() but weren't able to determine how they are assigned. Anyone
} able to give me a hand here?

It's done in in_pcbbind() in netinet/in_pcb.c.  In the case of telnet,
the call is done by tcp_connect() in netinet/tcp_usrreq.c.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810250600.XAA24646>