Netlink in FreeBSD

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:

  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 [DONE]
  2. Interact with the routing subsystem to implement NETLINK_ROUTE functionalities [DONE]
  3. Extend to NETLINK_GENERIC [PARTIALLY DONE]

Milestones

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


CategoryGsoc

SummerOfCode2021Projects/NetlinkProposal (last edited 2021-08-18T03:53:40+0000 by SeanNg)