github.com/asavie/xdp (go): Package xdp allows to use XDP sockets from Go.  An XDP socket allows to get packets from a network interface driver into a userspace process very fast, bypassing the Linux kernel's network stack, see https://lwn.net/Articles/750845/ for more information.  NOTE:  * If your network link device supports multiple queues - you might not see all of the incoming traffic because it might be e.g. load-balanced between multiple queues. You can use the `ethtool -L` command to control the load-balancing behaviour or even make it so that all of the incoming traffic is put on a single queue.  * On recent versions of Linux kernel, the eBPF map memory counts towards the "locked memory" user limit, so most likely you'll have to increase it. On Fedora Linux, this can be done by running `ulimit -l <new-limit>` command, or to make it permanent, by creating a file at `/etc/security/limits.d/50-lockedmem.conf` with e.g. the following contents (1MiB should be enough for this package):  logging out and logging back in. When you hit this limit, you'll get an error that looks like this:  Here is a minimal example of a program which receives network frames, modifies their destination MAC address in-place to broadcast address and transmits them back out the same network link:
Keywords: dataplane|go|golang|golang-package|linux|network|network-programming|networking|packet-capture|packet-generator|packet-processing|packet-sniffer|packets|sdn|sdn-network|sdn-switch|software-defined-network|software-defined-networking|xdp|xdp-sockets