sending and receiving raw ethernet packet to/from embedded system
Dec 30, 2005 2 Replies
B
balajiyalam
Hi,
I am unable to find a function in MSDN which can send a raw ethernet packet to embedded system [ board ]. I used Send , SendTo , ReceiveFrom methods. which are able to send ICMP request only.
I need to implement GUI through which I have to send and receive raw ethernet packets to / from board. So, kindly send me the solution.
Please anybody knows about it , help me.
Didn't find your answer? Ask the community — no account required.
J
Jean Tabel
Since you mentioned MSDN, I am assuming you are working in a win32 environment,although I am somewhat confused by your "...to/from embedded system."
You can use winpcap for this purpose (this is a windows port of the famous libpcap library):
formatting link
You will need the developer's pack in order to get header files and libraries.
You will find an example here:
formatting link
I have read there were some limitations with this port, but this should not be an issue in your case.
If you are happy with winpcap, please take some time reading the original paper written by Van Jacobson and Steven McCanne: ftp://ftp.ee.lbl.gov/papers/bpf-usenix93.ps.Z
The original package for Unixes is available here:
formatting link
Jean Tabel
snipped-for-privacy@gmail.com wrote:
M
Markus Zingg
While the other poster mentioned a way to do what you want, your aproach IMHO is asking for trouble. Well, you may have good reasons (like testing only), but if this is the aproach choosen to operate a final product I would reconsider basing it on ethernet alone.
Consider using UDP, since by doing so you are not liekly to "violate" network setups in those envireonements your platform is suposed to operate. UDP does not actually mean you have to implement a lot of stuff on your embedded platform. In fact implementing it is straight foreward and lightweight. It generally will increase the interoperability of your system by a great deal. I.e. when it comes to routing etc. At the same time you also will be able to directly talk to the platform using normal socket functionality - on all platforms - including windows, unix systems apple etc. etc.
Just my 2¢ though
Markus
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.