[ECOS] routing sockets / far end address resolution
Mon Jan 21 22:04:00 GMT 2008
Someone asked a question
(http://sourceware.org/ml/ecos-discuss/2006-12/msg00137.html) about a
year ago regarding routing sockets. There was no response to the
question and I'm wondering whether someone might have a go at a
re-worded version. Does eCos support routing sockets? The individual
above was having difficulty with the fileio (read/write) calls
associated with a routing socket. Could one use sendmsg/recvmsg instead
(if they are indeed supported)? If so, how does one convey that the
second argument is a "rt_msghdr" rather than just a "msghdr" structure?
My ultimate goal is to resolve a far end IP address to its mac address
(it may be local or may be on the other side of the gateway). The
address probably isn't resident in the ARP table, so what I am in
essence attempting to do is to get the stack to do a synchronized ARP
request for me. A ping would (most likely) get the address into the ARP
table but I would really like to avoid an ICMP exchange. I've cobbled a
proprietary IOCTL into the stack and can get it to do a lookup and if
necessary send out the ARP request... but implementing a wait for the
response is going to be difficult.
Is there a better way?
Thanks for any help.
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss