From owner-freebsd-questions Tue Jan 18 18:40:30 2000 Delivered-To: freebsd-questions@freebsd.org Received: from smtp7.atl.mindspring.net (smtp7.atl.mindspring.net [207.69.128.51]) by hub.freebsd.org (Postfix) with ESMTP id 7085A14A09 for ; Tue, 18 Jan 2000 18:40:28 -0800 (PST) (envelope-from stuyman@confusion.net) Received: from confusion.net (user-2ive6fq.dialup.mindspring.com [165.247.25.250]) by smtp7.atl.mindspring.net (8.9.3/8.8.5) with ESMTP id VAA01400 for ; Tue, 18 Jan 2000 21:38:36 -0500 (EST) Message-ID: <38852374.110B1FCB@confusion.net> Date: Tue, 18 Jan 2000 21:37:40 -0500 From: Laurence Berland Organization: B.R.A.T.T. X-Mailer: Mozilla 4.5 [en] (Win95; U) X-Accept-Language: en MIME-Version: 1.0 To: questions@freebsd.org Subject: Finding an open port. Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG As some may be aware (from the post that started the rather long volatile variable thread), I am attempting to write an ftp server for a computer science project. I've gotten most of the code done, only the actual data module needs to be written (the Server-DTP for those familiar with the protocol). I'm trying to figure out the best way to find a spare port for PASV connections, and was hoping there's a slightly more elegant solution than calling bind and checking for EAADDRINUSE on errno. I'm expecting my copy of the Stevens book any day now, so hopefully that'll stop my incessant babbling on these lists... Sorry for the inconvenience, thanks for the help. -- Laurence Berland, Stuyvesant HS Debate <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> Windows 98: n. useless extension to a minor patch release for 32-bit extensions and a graphical shell for a 16-bit patch to an 8-bit operating system originally coded for a 4-bit microprocessor, written by a 2-bit company that can't stand for 1 bit of competition. http://stuy.debate.net icq #7434346 aol imer E1101 The above email Copyright (C) 2000 Laurence Berland All rights reserved To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message