This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
issue with raw bsd sockets
- From: Mandeep Sandhu <mandeepsandhu dot chd at gmail dot com>
- To: ecos-discuss <ecos-discuss at ecos dot sourceware dot org>
- Date: Fri, 7 Aug 2009 17:08:53 +0530
- Subject: [ECOS] issue with raw bsd sockets
Hi,
I'm using the FreeBSD stack on my Linux Synthetic target to implement
a tiny DHCP
server. I can receive DHCP REQUEST packets coming over the tap interface, but am
unable to send back the broadcast resp packet (DHCP Offer).
I'm using raw socket to send a UDP packet on the IP broadcast addr
255.255.255.255.
I'm setting the MSG_DONTROUTE flag while making the sendto() call.
Basically in ip_output, if dont route flag is set, it tries to find an
interface using the network
address. In this case it wont be available as there is no interface
for the broadcast IP (my
local eth0's IP addr is 10.1.1.1).
Is this a bug in the stack or is there something wrong in the way I'm
trying to send the UDP
packet?
Any hint's appreciated.
Thanks,
-mandeep
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss