From owner-freebsd-net@FreeBSD.ORG Mon Oct 20 10:47:53 2003 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E8A9C16A4BF for ; Mon, 20 Oct 2003 10:47:52 -0700 (PDT) Received: from web20805.mail.yahoo.com (web20805.mail.yahoo.com [216.136.226.194]) by mx1.FreeBSD.org (Postfix) with SMTP id 007A143FDD for ; Mon, 20 Oct 2003 10:47:52 -0700 (PDT) (envelope-from saratchandra_a@yahoo.com) Message-ID: <20031020174751.60464.qmail@web20805.mail.yahoo.com> Received: from [61.95.178.129] by web20805.mail.yahoo.com via HTTP; Mon, 20 Oct 2003 10:47:51 PDT Date: Mon, 20 Oct 2003 10:47:51 -0700 (PDT) From: sarat chandra Annadata To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.1 cc: freebsd-net@freebsd.org cc: mgrooms@shrew.net cc: julian@elischer.org Subject: Help Broadcasting a UDP packet on the LAN:URGENT X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 20 Oct 2003 17:47:53 -0000 Hai, I am need of some urgent techinical help to pull me out of a little problem. I have been trying to broadcast a UDP packet(actually it is a DHCP offer packet) but havent' successfully done it sofar. The following is the descripttion about how I have been trying to do it. 1) I am creating a socket with sock_dgram option. 2)Next I am filling up the sockaddr_in structure, with IP address 255.255.255.255 and port number as DHCP client port number. 3)I am using the setsockopt call with at SOL_SOCKET level, with SO_BROADCAST FLAG. This call is not successfully returning. moreover I am successfully setting the flag at the IP-level in either case my send or sendto system calls fail. I want some guidance regarding this, I want to use only socket interface, in UNIX with C. Please pull me out of this, and I shall be grateful to you. A working piece of code will be of great help Thank you, Sincerely Sarat Chandra. --------------------------------- Do you Yahoo!? The New Yahoo! Shopping - with improved product search