开发者

Can I send non-IP packets using Winsock?

开发者 https://www.devze.com 2023-03-15 04:34 出处:网络
I\'m trying to create a small PPPoE Access Concentrator to learn the inner workings of PPPoE. This requires me to send non-IP packets, I need to be able to set the ETHER_TYPE and eventualy the destina

I'm trying to create a small PPPoE Access Concentrator to learn the inner workings of PPPoE. This requires me to send non-IP packets, I need to be able to set the ETHER_TYPE and eventualy the destination mac fields in the ethernet frame header, but as far as I can tell, raw WinSock sockets give me the ability to supply my own IP header, but not the ethernet header.

Is this true? And if so, is th开发者_Python百科ere any way of circumventing this?

I am well aware of WinPcap, and will use it ONLY as a last resort.


I believe that you are correct. Winsock will allow a raw IP socket but does not allow you to get beneath layer 3 and send non-IP packets. For this I believe you would need to pursue the WinPcap / TDI option . More information.

0

精彩评论

暂无评论...
验证码 换一张
取 消