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.
精彩评论