Netlink in FreeBSD

Project description

Netlink is a linux kernel interface used for communication between userspace and kernel processed.

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:

  1. Constructing basic interfaces
    1. Registering handlers with socket: Register handler with socket API for AF_NETLINK address family
    2. Configuring code as a configurable module
  2. Interact with the routing subsystem
    1. Message passing, message translating to an internal format, passing the code into a route subsystem
    2. Replying with confirmation
  3. Hack net/frr or net/bird2 to use netlink support

Deliverables

  1. Implement basic interfaces for netlink socket connection and message sending
  2. Interact with the routing subsystem to implement NETLINK_ROUTE functionalities
  3. Extend to NETLINK_GENERIC
  4. Support

Milestones

Test Plan

TBC

The Code

TBC

Notes

https://docs.google.com/document/d/1oJSueoRWLDq9T9aLoYQzJGskPv7xiPCNG0iv8obwfGE/edit?usp=sharing https://github.com/pengnam/netlink-notes

https://github.com/luigirizzo/netlink-freebsd net/rtsock.c sys/netinet/raw_ip.c sys/netinet/ip_divert.c


CategoryGsoc

SummerOfCode2021Projects/NetlinkProposal (last edited 2021-06-14 11:30:36 by ChristosMargiolis)