]> git.puffer.fish Git - matthieu/frr.git/commit
zebra: Abstract the `netlink_socket()` API
authorCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Wed, 16 Nov 2022 23:08:21 +0000 (00:08 +0100)
committerCarmine Scarpitta <cscarpit@cisco.com>
Thu, 14 Dec 2023 13:56:44 +0000 (14:56 +0100)
commitf998057fb331b82484b55a7262dc44b33aebc453
tree7b81d1171853d3cc59c38bd3311903b9630a3379
parent0d57a9a9546c26021e70ba5986823f8520e581ea
zebra: Abstract the `netlink_socket()` API

The `netlink_socket()` function is used in many places to create and
initialize Netlink sockets. Currently, it can only create
`NETLINK_ROUTE` Netlink sockets.

This commit generalizes the behavior of the `netlink_socket()` function,
enabling it to generate Netlink sockets of any type. Specifically, it
extends the `netlink_socket()` function with a new argument `nl_family`,
which allows developers to specify the Netlink family of the socket to
be created.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
zebra/kernel_netlink.c