summaryrefslogtreecommitdiff
path: root/zebra/kernel_netlink.c
diff options
context:
space:
mode:
authorCarmine Scarpitta <carmine.scarpitta@uniroma2.it>2022-11-03 16:16:23 +0100
committerCarmine Scarpitta <cscarpit@cisco.com>2023-12-14 14:56:44 +0100
commit959267f7c201a84b90cc00ac2b7a0c0b3490c8b6 (patch)
treeedb6f39085e9feefc85ff1d70fcf59b4629eb87c /zebra/kernel_netlink.c
parente14d1dcdbc7c35481760d721b68fa6bcdcd8bf69 (diff)
zebra: Add function to resolve Generic Netlink family
Generic Netlink is an extension of Netlink meant for kernel-user space communications. It supports the dynamic allocation of communication channels. Kernel and user space applications register their services with a Generic Netlink controller. The Generic Netlink controller is responsible for assigning a unique channel number with each service. Clients who want to use a service query the controller to see if the service exists and to determine the correct channel number. The channel number is used to access the requested service. This commit adds the base functionality to get the channel number assigned to a specific service. More precisely, this commit adds a function `genl_resolve_family()` that takes the service name (called family in the Generic Netlink terminology) as an input parameter and queries the Generic Netlink controller to get the channel number assigned with the requested service. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
Diffstat (limited to 'zebra/kernel_netlink.c')
-rw-r--r--zebra/kernel_netlink.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c
index 424794135d..5aa509d116 100644
--- a/zebra/kernel_netlink.c
+++ b/zebra/kernel_netlink.c
@@ -38,6 +38,7 @@
#include "zebra/tc_netlink.h"
#include "zebra/netconf_netlink.h"
#include "zebra/zebra_errors.h"
+#include "zebra/ge_netlink.h"
#ifndef SO_RCVBUFFORCE
#define SO_RCVBUFFORCE (33)
@@ -1958,6 +1959,8 @@ void kernel_init(struct zebra_ns *zns)
&zns->t_netlink);
rt_netlink_init();
+
+ ge_netlink_init();
}
/* Helper to clean up an nlsock */