This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Sending Raw Ethernet packets (ether_output, ether_output_frame, __enet_send ?)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]