开发者

Can one use PF_PACKET sockets on Linux to send raw packets without filling Ethernet data?

Looking at tcpreplay's source, found the idea of using PF_PACKET instead of AF_INET+SOCK_RAW.

However, can't tell from existing documentation if it's possible for PF_PACKET to send raw IP packet without filling Ethernet part of packet.

It's a question of performance - a long-living application will get lost with large ARP cache lookup and/or requests, so the pr开发者_如何学运维ofit of expected performance gain will get lost; yet I want to send raw packets faster than allowed by SOCK_RAW family - which is a huge troublemaker with its TCP_NODELAY handling.


As far as I can see you can't do PF_PACKET without filling in the ethernet header.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜