Netlink in FreeBSD
Student: Sean Ng (seanngpengnam@gmail.com)
- Mentor: Alexander V. Chernikov (melifaro@)
Project description
Refer to https://github.com/pengnam/freebsd-netlink for project details
Netlink is a linux kernel interface used for communication between userspace and kernel processes.
This project aims to port Netlink over to FreeBSD. The goal is to implement NETLINK_ROUTE in FreeBSD, and eventually support NETLINK_GENERIC as well. Eventually, the project aims to have a program use netlink. Currently, systems in FreeBSD which use Netlink sockets in their equivalent implementations in linux are currently supported by routing sockets.
Approach to solving the problem
To implement Netlink for NETLINK_ROUTE, the development process will broken into three main stages:
- Constructing basic interfaces
- Registering handlers with socket: Register handler with socket API for AF_NETLINK address family
- Configuring code as a configurable module
- Interact with the routing subsystem
- Message passing, message translating to an internal format, passing the code into a route subsystem
- Replying with confirmation
- Hack net/frr or net/bird2 to use netlink support
Deliverables
- Implement basic interfaces for netlink socket connection and message sending [DONE]
- Interact with the routing subsystem to implement NETLINK_ROUTE functionalities [DONE]
- Extend to NETLINK_GENERIC [PARTIALLY DONE]
Milestones
- June 8th: Start of GSOC
- Check out previous work done, try compiling (X)
- Get a working example
- July 13th - July 17th: Mid-term Evaluations #1
- August 6th: End of coding (soft)
- Remaining time used for documentation
- August 14th: End of coding (hard)
The Code
Netlink: https://github.com/pengnam/freebsd-netlink (https://github.com/pengnam/freebsd-netlink/pull/1) Userspace Library: https://github.com/pengnam/libmnl-freebsd
Notes
https://docs.google.com/document/d/1oJSueoRWLDq9T9aLoYQzJGskPv7xiPCNG0iv8obwfGE/ https://github.com/pengnam/netlink-notes