From owner-freebsd-net@FreeBSD.ORG Tue Jan 16 18:58:56 2007 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8BCF016A412 for ; Tue, 16 Jan 2007 18:58:56 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from mail-out4.apple.com (mail-out4.apple.com [17.254.13.23]) by mx1.freebsd.org (Postfix) with ESMTP id 5A90213C441 for ; Tue, 16 Jan 2007 18:58:56 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from relay6.apple.com (a17-128-113-36.apple.com [17.128.113.36]) by mail-out4.apple.com (8.13.8/8.13.8) with ESMTP id l0GIwuXj003078; Tue, 16 Jan 2007 10:58:56 -0800 (PST) Received: from relay6.apple.com (unknown [127.0.0.1]) by relay6.apple.com (Symantec Mail Security) with ESMTP id 28CF81004F; Tue, 16 Jan 2007 10:58:56 -0800 (PST) X-AuditID: 11807124-a4cefbb000006d75-06-45ad2070878c Received: from [17.214.13.96] (unknown [17.214.13.96]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by relay6.apple.com (Apple SCV relay) with ESMTP id 15D4610042; Tue, 16 Jan 2007 10:58:56 -0800 (PST) In-Reply-To: <45AD1C0F.7000701@cisco.com> References: <20070112163057.2a3ec8f0.rnsanchez@wait4.org> <45A807F8.7080603@FreeBSD.org> <45ACCFF4.4040709@cisco.com> <45AD1C0F.7000701@cisco.com> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Chuck Swiger Date: Tue, 16 Jan 2007 10:58:55 -0800 To: Randall Stewart X-Mailer: Apple Mail (2.752.2) X-Brightmail-Tracker: AAAAAA== Cc: freebsd-net Subject: Re: Problem with port 0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jan 2007 18:58:56 -0000 On Jan 16, 2007, at 10:40 AM, Randall Stewart wrote: >> "reserved" means one "SHOULD NOT" use that port, where the phrase >> in caps is defined in RFC-2119 (http://www.ietf.org/rfc/rfc2119.txt). [ ...format-flowed quoting trimmed... ] > So let me see if I understand the statements above.. > > We are using the SHOULD NOT.. which is YOU REALLY REALLY REALLY > REALLY REALLY REALLY should not do this unless you have some > very dramatic demonstrative need to do so and know the FULL > consequences of the action. Pretty much. :-) If you have a choice about solving the problem in a way that avoids doing something described as "SHOULD NOT", then one really ought to prefer that choice. > The bit from wikipedia, while not authoritative in my mind, says you > can send FROM the port, but don't expect an answer back.. which > implies > you cannot bind it and/or cannot read from it if your source > port is 0... Of course in TCP this is totally useless since you > have to get something back in order to setup the handshake. I don't consider wikipedia to be authoritative either, but it can be a useful reference or guideline in conjunction with other sources. Note that there are some uncommonly used TCP variants (T/TCP comes to mind) where you can short-circuit the 3-way handshake and put actual data in the initial SYN packet. I would agree that one SHOULD NOT listen on port 0. > In UDP I guess one could get a packet if the other O/S did not > have any bind restrictions.. or one were to use a raw socket. Sure, or use BPF/PCAP to generate the packets directly. > But why all this for something you SHOULD NOT DO.. one of the > consequences in my mind of this is that not all O/S's may be > able to read your data .. nor respond to it. > > Seems to me a lot of hassle when one can just use a different > port :-0 Well, yes-- there are another 65500+ ports available. -- -Chuck