FRR GSoC

Logo

← Projects

C - Lua - Linux - Systems design

Lua Hook Points

Implement hook system to call Lua scripts


Details

FRR has fledgling infrastructure for calling Lua scripts to perform designated tasks. There is currently a proof-of-concept implementation for one limited use case. This project would see that capability generalized and extended to provide an internal API allowing developers to specify points in the program to call Lua scripts.

A feature of the Linux kernel called eBPF provides anchor or hook points within the kernel to which eBPF programs can be attached. When the kernel reaches those hook points, the attached programs are executed. This allows users and other programs to change the behavior of the kernel at those hook points. FRR will do the same thing with Lua scripts. When complete this project will provide the same capability to FRR, except that the attached programs will be Lua scripts and not eBPF.

Currently FRR has infrastructure for calling Lua and getting results back, but we lack a cohesive and ergonomic internal API to use this feature, so each site where we want to provide users with a Lua hook needs to be implemented largely by hand. This project will fix that by providing a clean way to define hooks, their arguments, and their results. It also will provide users with a way to view available hooks and choose what scripts to attach.

This will be a challenging project, but if you enjoy architecting programs, designing interfaces, and improving developer experience you’ll have fun with this one. It will lay the groundwork for FRR developers to provide users with the capability to have deep programmable control over FRR, and have a large impact on FRR’s userbase.

Quick Start

Mentors

Stephen Worley (@sworleys)
Quentin Young (@qlyoung)

Helpful Links

FRR dev guide
FRR user guide

tags: lib - configuration - lua