public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* RE: [ECOS]  Sending Raw Ethernet packets (ether_output, ether_output_frame, __enet_send ?)
@ 2003-11-20 17:52 kevin_lemay
  2003-11-20 18:44 ` Andrew Lunn
  0 siblings, 1 reply; 9+ messages in thread
From: kevin_lemay @ 2003-11-20 17:52 UTC (permalink / raw)
  To: sebastien.couret; +Cc: ecos-discuss

Oops,

You Said SERVER. I quick check of the DHCP request services from my linux box shows that it uses standard UDP using the assigned IP address for the destination.

It would appear that you could use the standard UDP socket routines if you could manually add the entry into the routing table. This would be easier to do that using a non-standard ethernet interface. Usually stacks have routines to add routes. 

Kevin 

-----Original Message-----
From: ecos-discuss-owner@sources.redhat.com
[mailto:ecos-discuss-owner@sources.redhat.com]On Behalf Of LEMAY,KEVIN
(A-Roseville,ex1)
Sent: Thursday, November 20, 2003 9:44 AM
To: sebastien.couret@elios-informatique.fr
Cc: ecos-discuss@sources.redhat.com
Subject: RE: [ECOS] Sending Raw Ethernet packets (ether_output,
ether_output_frame, __enet_send ?)


Why not use the current DHCP implementation that is available via anonymous CVS?

It appears to be using the standard socket calls.

Kevin

-----Original Message-----
From: ecos-discuss-owner@sources.redhat.com
[mailto:ecos-discuss-owner@sources.redhat.com]On Behalf Of Sebastien
Couret
Sent: Wednesday, November 19, 2003 12:14 PM
To: ecos-discuss@sources.redhat.com
Subject: [ECOS] Sending Raw Ethernet packets (ether_output,
ether_output_frame, __enet_send ?)


Hello,

I.m on my way to write a DHCP server for eCOS, but right now i.m stuck while trying to send an ethernet packet directly to an host (my DHCP client) which has, at first, only ethernet connectivity and is only reachable through network  via its MAC address(Let.s call it 0xde:0xad:0x00:0xbe:0xef:0x00) because IP adressing is not set.



I have choosed to use the FreeBSD TCP/IP stack port for eCOS.



And when trying to send such a packet with socket API and parameters PF_INET,SOCK_RAW, i.m not able to act on the ethernet header so , I cannot make ethernet destination adress point to 0xde:0xad:0x00:0xbe:0xef:0x00 and sendto() seems to only accept sockaddr_in targets.



So i have seek a another raw API to write ethernet packets directly . (Of course this API should be generic and not driver dependent )

I have found ether_output, ether_output_frame, __enet_send  but I cannot use them from my application because they are not compiled into the eCOS library , I have generated, and the linkage fails ...



May be , I don.t take the right approach... It should be simple ...



So to resume, my question is :

Could someone tell me how (a code example would be perfect !) , I could act , from my eCOS application , onto the ethernet header of a packet I.m going to send ? (In my case, I just which to change the destination MAC address)



Thanks a lot for your help.

Have a nice day.

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [ECOS]  Sending Raw Ethernet packets (ether_output, ether_output_frame, __enet_send ?)
@ 2003-11-20 17:22 Sebastien Couret
  0 siblings, 0 replies; 9+ messages in thread
From: Sebastien Couret @ 2003-11-20 17:22 UTC (permalink / raw)
  To: ecos-discuss

Hello,

I.m on my way to write a DHCP server for eCOS, but right now i.m stuck while trying to send an ethernet packet directly to an host (my DHCP client) which has, at first, only ethernet connectivity and is only reachable through network  via its MAC address(Let.s call it 0xde:0xad:0x00:0xbe:0xef:0x00) because IP adressing is not set.



I have choosed to use the FreeBSD TCP/IP stack port for eCOS.



And when trying to send such a packet with socket API and parameters PF_INET,SOCK_RAW, i.m not able to act on the ethernet header so , I cannot make ethernet destination adress point to 0xde:0xad:0x00:0xbe:0xef:0x00 and sendto() seems to only accept sockaddr_in targets.



So i have seek a another raw API to write ethernet packets directly . (Of course this API should be generic and not driver dependent )

I have found ether_output, ether_output_frame, __enet_send  but I cannot use them from my application because they are not compiled into the eCOS library , I have generated, and the linkage fails ...



May be , I don.t take the right approach... It should be simple ...



So to resume, my question is :

Could someone tell me how (a code example would be perfect !) , I could act , from my eCOS application , onto the ethernet header of a packet I.m going to send ? (In my case, I just which to change the destination MAC address)



Thanks a lot for your help.

Have a nice day.

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-11-20 22:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-20 17:52 [ECOS] Sending Raw Ethernet packets (ether_output, ether_output_frame, __enet_send ?) kevin_lemay
2003-11-20 18:44 ` Andrew Lunn
2003-11-20 21:47   ` [ECOS] how to link "gettimeofday" with arm-elf-gcc? Yusuke MATSUOKA
2003-11-20 22:06     ` Andrew Lunn
2003-11-20 22:34       ` Yusuke Matsuoka
2003-11-20 22:38         ` Gary Thomas
2003-11-20 22:40         ` Andrew Lunn
2003-11-20 22:09     ` Gary Thomas
  -- strict thread matches above, loose matches on Subject: below --
2003-11-20 17:22 [ECOS] Sending Raw Ethernet packets (ether_output, ether_output_frame, __enet_send ?) Sebastien Couret

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).