From owner-freebsd-net Sat Oct 24 23:23:15 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA11466 for freebsd-net-outgoing; Sat, 24 Oct 1998 23:23:15 -0700 (PDT) (envelope-from owner-freebsd-net@FreeBSD.ORG) Received: from gatekeeper.tsc.tdk.com (gatekeeper.tsc.tdk.com [207.113.159.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA11456 for ; Sat, 24 Oct 1998 23:23:14 -0700 (PDT) (envelope-from gdonl@tsc.tdk.com) Received: from sunrise.gv.tsc.tdk.com (root@sunrise.gv.tsc.tdk.com [192.168.241.191]) by gatekeeper.tsc.tdk.com (8.8.8/8.8.8) with ESMTP id XAA00365; Sat, 24 Oct 1998 23:22:36 -0700 (PDT) (envelope-from gdonl@tsc.tdk.com) Received: from salsa.gv.tsc.tdk.com (salsa.gv.tsc.tdk.com [192.168.241.194]) by sunrise.gv.tsc.tdk.com (8.8.5/8.8.5) with ESMTP id XAA02039; Sat, 24 Oct 1998 23:22:34 -0700 (PDT) Received: (from gdonl@localhost) by salsa.gv.tsc.tdk.com (8.8.5/8.8.5) id XAA24753; Sat, 24 Oct 1998 23:22:33 -0700 (PDT) From: Don Lewis Message-Id: <199810250622.XAA24753@salsa.gv.tsc.tdk.com> Date: Sat, 24 Oct 1998 23:22:33 -0700 In-Reply-To: Nicholas Charles Brawn "Re: How does kernel assign local port?" (Oct 25, 5:18pm) X-Mailer: Mail User's Shell (7.2.6 alpha(3) 7/19/95) To: Nicholas Charles Brawn , Don Lewis Subject: Re: How does kernel assign local port? Cc: freebsd-net@FreeBSD.ORG Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Oct 25, 5:18pm, Nicholas Charles Brawn wrote: } Subject: Re: How does kernel assign local port? } On Sat, 24 Oct 1998, Don Lewis wrote: } } > 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. } > } } I have yet to look at the source (not at work box), but why are there } two different functions to assign the local port, instead of just one? There is only one, tcp_connect() calls in_pcbbind(). There are lots of other places in the code that also call in_pcbbind(), but the call in tcp_connect() is the one that does the trick for telnet. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message