From owner-freebsd-net@FreeBSD.ORG Sun Apr 13 15:06:20 2008 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 C86E4106566B for ; Sun, 13 Apr 2008 15:06:20 +0000 (UTC) (envelope-from tmm@fastmail.fm) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id 888B48FC0C for ; Sun, 13 Apr 2008 15:06:20 +0000 (UTC) (envelope-from tmm@fastmail.fm) Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.messagingengine.com (Postfix) with ESMTP id DCCB7FEDF6; Sun, 13 Apr 2008 11:06:19 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute2.internal (MEProxy); Sun, 13 Apr 2008 11:06:19 -0400 X-Sasl-enc: rfQKP4W6LoMPaAQwtpFWGCk6nqeGJTWxbUtJCOgO7Elz 1208099179 Received: from [192.168.11.3] (bas4-toronto46-1279334009.dsl.bell.ca [76.65.22.121]) by mail.messagingengine.com (Postfix) with ESMTPSA id 6365E1769D; Sun, 13 Apr 2008 11:06:19 -0400 (EDT) Message-ID: <48022162.4030601@fastmail.fm> Date: Sun, 13 Apr 2008 11:06:10 -0400 From: tmm User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Boris Kochergin References: <4800E2D5.20107@fastmail.fm> <480147C7.6090107@FreeBSD.org> <48017958.8020302@fastmail.fm> <4801A0F8.1060002@acm.poly.edu> In-Reply-To: <4801A0F8.1060002@acm.poly.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: Howto send a limited broadcast? 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: Sun, 13 Apr 2008 15:06:20 -0000 Boris Kochergin wrote: > tmm wrote: >> >> >> Bruce M. Simpson wrote: >>> tmm wrote: >>>> So, can anyone suggest how I can send a limited broadcast (on an >>>> interface that has been initalized with an IP and a subnet)? >>> >>> Use the IP_ONESBCAST option and send to the network broadcast >>> address for that subnet. The stack will change it into >>> 255.255.255.255 on output. See man page ip(4) for details. >>> >>> It's a hack, but it's largely due to how the stack has worked >>> historically. >>> >>> BMS >> Thanks. I wasn't aware of that option. >> >> But now I find that this option is not present in my (eCos port of) >> FreeBSD stack. Either it was removed during the port, or the ported >> version is too old. >> >> Perhaps the best thing for me to do is to look at the 'normal' >> FreeBSD stack (as opposed to the eCos one) and see how IP_ONESBCAST >> is implemented. Then perhaps I could do the same thing in my FreeBSD >> stack. >> >> Is there a way for me to download the FreeBSD source code without >> actually downloading, burning, and installing FreeBSD? Looking >> around the FreeBSD website I don't see a source download link. >> >> thanks, >> Tom. >> _______________________________________________ >> freebsd-net@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-net >> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > You can get them via CVS: > http://www.freebsd.org/doc/en/books/handbook/cvsup.html. > > Also, although it, too, may be considered hacky, if the system you're > working on has pcap(3), you could just manually craft the broadcast > frame and send it out the interface yourself. I can provide some > sample code. > > -Boris Yes, that is what I was looking for - I'll use cvsup/csup to get the sources. I don't have pcap, but I do have access to the lower layers of the stack, so yes, I would be interested in seeing your code. Doing something like that might turn out to be a better solution for me. Thanks a lot. Tom.