From 1ef65e7a7e5ffff77fb76ee3ff8e8f1b187f9953 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Mon, 5 Jun 2023 17:57:53 +0200 Subject: [PATCH] Additional CLI and TCP control sockets --- conf/conf.h | 5 ++ conf/confbase.Y | 1 + doc/bird.sgml | 8 +- sysdep/unix/conf.h | 49 ++++++++++++ sysdep/unix/config.Y | 27 +++++++ sysdep/unix/io.c | 4 +- sysdep/unix/main.c | 182 ++++++++++++++++++++++++++++++++++++------- sysdep/unix/unix.h | 16 +--- 8 files changed, 248 insertions(+), 44 deletions(-) create mode 100644 sysdep/unix/conf.h diff --git a/conf/conf.h b/conf/conf.h index d40f955e..4c28aae0 100644 --- a/conf/conf.h +++ b/conf/conf.h @@ -14,6 +14,9 @@ #include "lib/hash.h" #include "lib/resource.h" #include "lib/timer.h" +#include "lib/tlists.h" + +#include "sysdep/unix/conf.h" /* Configuration structure */ @@ -31,6 +34,8 @@ struct config { struct rtable_config *def_tables[NET_MAX]; /* Default routing tables for each network */ struct iface_patt *router_id_from; /* Configured list of router ID iface patterns */ + TLIST_LIST(control_socket_config) control_socket; /* Control socket definitions */ + u32 router_id; /* Our Router ID */ u32 proto_default_debug; /* Default protocol debug mask */ u32 proto_default_mrtdump; /* Default protocol mrtdump mask */ diff --git a/conf/confbase.Y b/conf/confbase.Y index 3e8f5807..ade8ea8a 100644 --- a/conf/confbase.Y +++ b/conf/confbase.Y @@ -95,6 +95,7 @@ CF_DECLS struct timeformat *tf; mpls_label_stack *mls; struct bytestring *bs; + struct control_socket_config *control_socket_config; } %token END CLI_MARKER INVALID_TOKEN ELSECOL DDOT diff --git a/doc/bird.sgml b/doc/bird.sgml index 8041faa9..0451795a 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -179,7 +179,8 @@ BIRD executable by configuring out routing protocols you don't use, and