public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Sebastien Couret <sebastien.couret@elios-informatique.fr>
To: ecos-discuss@sources.redhat.com
Subject: [ECOS]  Sending Raw Ethernet packets (ether_output, ether_output_frame, __enet_send ?)
Date: Thu, 20 Nov 2003 17:22:00 -0000	[thread overview]
Message-ID: <E1AMYiN-000047-00@ECoSyst3m3> (raw)

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

             reply	other threads:[~2003-11-20 17:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-20 17:22 Sebastien Couret [this message]
2003-11-20 17:52 kevin_lemay
2003-11-20 18:44 ` Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1AMYiN-000047-00@ECoSyst3m3 \
    --to=sebastien.couret@elios-informatique.fr \
    --cc=ecos-discuss@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).