How can I send a packet with Npcap, without having to create link-layer header yourself?
How can I send a packet with Npcap, without having to create link-layer header yourself?
By using a higher-level library that runs atop libpcap/WinPcap/Npcap and that constructs link-layer headers for you. There are such libraries, at least for UN*Xes, and some might have Windows binary versions; I don't know their names offhand.
libpcap/WinPcap/Npcap themselves don't provide a general mechanism for doing that; they leave the job of parsing and generating packet headers to code that uses them.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.