How can I send data packets to the network without using sockets?

I want to send data packets to the network, bypassing the Linux network stack. I mean, is there a way I can interrupt the network card driver and place a frame in the network card buffer directly to send it to the network? I'm new to hacking the Linux kernel, so any tutorial on how I can get started will be very helpful.

+4
source share
1 answer

You would be better off using a virtual device like TAP . You can easily hack the management interface into the TAP kernel module, through which you can transfer frames ready to be sent to the driver. This approach can be compared to the performance of a regular socket application as a baseline. Since the TAP device will eventually โ€œsendโ€ output frames through the personal device, you can easily write a test application that measures performance and latency.

0
source

Source: https://habr.com/ru/post/1479157/


All Articles