[Winpcap-users] Sending raw packets through libpcap for VPN implementation

Никита Лесников nlo_one at mail.ru
Wed Aug 22 21:19:56 GMT 2007


Hello everyone,

 In my application I need to send an IP packet to a _specific_ network interface. The solution has to be highly portable between Linux and Windows at least, and Mac OS X in the distant perspective, so I naturally tried to adopt pcap_sendpacket(...). However, it requires a packet in Layer-2 representation. This is bearable in case of Ethernet, where the additional burden is to do some ARPing and form a very simple Ethernet header, but in case of 802.11b the protocol becomes very complex, and reimplementing it seems a paramount task for me. And the very idea of having special code for each datalink seems not very portability-friendly.

 So, is there a workaround for this (or maybe some ready code for 802.11b case),  that can help to solve the declared task?

 I will greatly appreciate any help.

 Regards,
  Nikita Lesnikov


More information about the Winpcap-users mailing list