How to send packet without link-layer header using Npcap?

83 Views Asked by At

How can I send a packet with Npcap, without having to create link-layer header yourself?

1

There are 1 best solutions below

0
user16139739 On

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.