From owner-freebsd-net Sat Oct 24 23:01:30 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA09806 for freebsd-net-outgoing; Sat, 24 Oct 1998 23:01:30 -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 XAA09801 for ; Sat, 24 Oct 1998 23:01:29 -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 XAA00197; Sat, 24 Oct 1998 23:00:48 -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 XAA01744; Sat, 24 Oct 1998 23:00:47 -0700 (PDT) Received: (from gdonl@localhost) by salsa.gv.tsc.tdk.com (8.8.5/8.8.5) id XAA24646; Sat, 24 Oct 1998 23:00:46 -0700 (PDT) From: Don Lewis Message-Id: <199810250600.XAA24646@salsa.gv.tsc.tdk.com> Date: Sat, 24 Oct 1998 23:00:46 -0700 In-Reply-To: Nicholas Charles Brawn "How does kernel assign local port?" (Oct 25, 4:03pm) X-Mailer: Mail User's Shell (7.2.6 alpha(3) 7/19/95) To: Nicholas Charles Brawn , freebsd-net@FreeBSD.ORG Subject: Re: How does kernel assign local port? Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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