This repository provides a collection of practical examples for utilizing the Netlink protocol on FreeBSD.
The goal of this project is to offer a clear reference for developers looking to understand the FreeBSD-specific Netlink implementation and transition Linux-based Netlink knowledge to the FreeBSD environment.
How to register a new generic netlink family on FreeBSD.
$ cd example-01/kernel
$ make
$ cd example-01/kernel
$ doas make load
$ cd example-01/user
$ make
$ ./nl_echo_client
$ cd example-01/kernel
$ doas make unload
How to register a command, with no attributes (parameters), in the generic netlink family and call it from the userspace.
How to register a command, with attributes (parameters), in the generic netlink family and call it from the userspace.