Skip to content
Advertisement

Ethernet frames from NIC

I’m searching for help and an opinion-advice for a network project, in which I’m working lately. This requires a Linux machine to be a passive network appliance.

Network packets come in from one network interface and come out from another interface ( net–eth0–>Linux PC–eth1–>net) without making any modifications on data.

The application, which is going to run on the Linux system, will change only the order of the packets. It is going to be a “silly” network emulator application.

The first implementation was made with RAW sockets, where read() is called every time a packet arrives to user space and write() is called when an Ethernet packet should be sent down to the NIC.

I would like to know if there is a more practical and direct way than RAW sockets, bypassing Linux’s network stack.

Advertisement

Answer

If what you want is to bypass the kernel, DPDK in Linux and NetMap in FreeBSD are options to do just that.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement