hie all,
i needed to make a code in simple turbo c for ethernet packet injection as well as data reception.
I tried the code in windows but its not working. possibly due to linux based commands.
plz help me..

1) This is no easy task.
2) More information would be useful. What code?
3) Have you started to plan any of this? Any research?

yes.
i hv the code for same but in linux .
so it will work if i make the changes regarding raw socket programming.
possibly if i'm having the library for raw socket programming.
just like that in linux:
#include<linux/if_packet.h>
#include<linux/if_ether.h>

if anybody knws then plz guide...

You can't just recycle code like that. Packet injection needs access to the hardware layer and they differ between the 2 operating systems.

winsock.h is one windows libary for sockets, but you will also need the interface headers.

Packet injection is no easy task, maybe look at what the winpcap guys have done and see if you can work with what they have done.

You can't just recycle code like that. Packet injection needs access to the hardware layer and they differ between the 2 operating systems.

winsock.h is one windows libary for sockets, but you will also need the interface headers.

Packet injection is no easy task, maybe look at what the winpcap guys have done and see if you can work with what they have done.

yes thats true.
i have done it through PacketX library.
n also downloaded winpcap for that.
The code is working now.
But just the problem is how can i send my own packet/data on the pc?

This article has been dead for over six months. Start a new discussion instead.