From owner-freebsd-net@FreeBSD.ORG Mon Feb 2 18:28:49 2009 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 399C3106564A for ; Mon, 2 Feb 2009 18:28:49 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 157098FC0A for ; Mon, 2 Feb 2009 18:28:49 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id C119046B0D; Mon, 2 Feb 2009 13:28:48 -0500 (EST) Date: Mon, 2 Feb 2009 18:28:48 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Derek Tattersall In-Reply-To: <20090201183057.GA47405@oriental.arm.org> Message-ID: References: <20090201183057.GA47405@oriental.arm.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-net@freebsd.org Subject: Re: Multicast source address in recvfrom() 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: Mon, 02 Feb 2009 18:28:49 -0000 On Sun, 1 Feb 2009, Derek Tattersall wrote: > In order to become familiar with multicast implementation using FreeBSD, I > found via Google a pair of test programs which multicast sent a simple text > message and received the text message. I added some code to report the > source address, because none of the references that I looked at specified > the source IP address in the frame. > > I ran the sender on A -current system, AMD64 vintage last week. The > receiver was on a -current system I386 vintage last week. TCPDUMP shows the > source IP address in the frame as (correctly) 192.168.0.15. The receiver > reports the source IP address as 200.231.191.191. I have also run the same > test with an OpenBSD 4.4 Release I386 system as the receiver. The openBSD > system reports the sender as 192.168.0.15. A Fedora 10 system reported the > source IP address as 0.0.0.0. > > Googling the RFCs and other information and referring to Comer's and > Stevens' books on TCPIP I can't determine what should be reported. Does > anybody have clue for me? Hi Derek: It might depend on how you're querying the source address. Could you post a code excerpt? Robert N M Watson Computer Laboratory University of Cambridge