lib, mgmtd: move common header to lib

The common header included from lib and other daemons should be located
in lib, not in mgmt directory.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
Igor Ryzhov 2023-11-16 20:31:52 +01:00
parent c599ed56fc
commit c0568d4f9e
11 changed files with 9 additions and 36 deletions

View file

@ -14,7 +14,7 @@ extern "C" {
#include "northbound.h" #include "northbound.h"
#include "mgmt_pb.h" #include "mgmt_pb.h"
#include "mgmtd/mgmt_defines.h" #include "mgmt_defines.h"
/*************************************************************** /***************************************************************
* Constants * Constants

View file

@ -32,27 +32,4 @@ enum mgmt_result {
MGMTD_UNKNOWN_FAILURE MGMTD_UNKNOWN_FAILURE
}; };
enum mgmt_fe_event {
MGMTD_FE_SERVER = 1,
MGMTD_FE_CONN_READ,
MGMTD_FE_CONN_WRITE,
MGMTD_FE_PROC_MSG
};
enum mgmt_be_event {
MGMTD_BE_SERVER = 1,
MGMTD_BE_CONN_INIT,
MGMTD_BE_CONN_READ,
MGMTD_BE_CONN_WRITE,
MGMTD_BE_PROC_MSG,
MGMTD_BE_SCHED_CFG_PREPARE,
MGMTD_BE_RESCHED_CFG_PREPARE,
MGMTD_BE_SCHED_CFG_APPLY,
MGMTD_BE_RESCHED_CFG_APPLY,
};
#define MGMTD_TXN_ID_NONE 0
#define MGMTD_TXN_BATCH_ID_NONE 0
#endif /* _FRR_MGMTD_DEFINES_H */ #endif /* _FRR_MGMTD_DEFINES_H */

View file

@ -14,7 +14,7 @@ extern "C" {
#include "mgmt_pb.h" #include "mgmt_pb.h"
#include "frrevent.h" #include "frrevent.h"
#include "mgmtd/mgmt_defines.h" #include "mgmt_defines.h"
/*************************************************************** /***************************************************************
* Macros * Macros

View file

@ -253,6 +253,7 @@ pkginclude_HEADERS += \
lib/memory.h \ lib/memory.h \
lib/mgmt.pb-c.h \ lib/mgmt.pb-c.h \
lib/mgmt_be_client.h \ lib/mgmt_be_client.h \
lib/mgmt_defines.h \
lib/mgmt_fe_client.h \ lib/mgmt_fe_client.h \
lib/mgmt_msg.h \ lib/mgmt_msg.h \
lib/mgmt_pb.h \ lib/mgmt_pb.h \

View file

@ -13,9 +13,9 @@
#include "vrf.h" #include "vrf.h"
#include "defaults.h" #include "defaults.h"
#include "stream.h" #include "stream.h"
#include "mgmt_defines.h"
#include "mgmtd/mgmt_memory.h" #include "mgmtd/mgmt_memory.h"
#include "mgmtd/mgmt_defines.h"
#include "mgmtd/mgmt_history.h" #include "mgmtd/mgmt_history.h"
#include "mgmtd/mgmt_txn.h" #include "mgmtd/mgmt_txn.h"
#include "mgmtd/mgmt_ds.h" #include "mgmtd/mgmt_ds.h"

View file

@ -12,7 +12,7 @@
#include "mgmt_be_client.h" #include "mgmt_be_client.h"
#include "mgmt_msg.h" #include "mgmt_msg.h"
#include "mgmtd/mgmt_defines.h" #include "mgmt_defines.h"
#include "mgmtd/mgmt_ds.h" #include "mgmtd/mgmt_ds.h"
#define MGMTD_BE_CONN_INIT_DELAY_MSEC 50 #define MGMTD_BE_CONN_INIT_DELAY_MSEC 50

View file

@ -11,8 +11,8 @@
#include "mgmt_fe_client.h" #include "mgmt_fe_client.h"
#include "northbound.h" #include "northbound.h"
#include "mgmt_defines.h"
#include "mgmtd/mgmt_defines.h"
#include "mgmtd/mgmt_be_adapter.h" #include "mgmtd/mgmt_be_adapter.h"
#include "mgmtd/mgmt_fe_adapter.h" #include "mgmtd/mgmt_fe_adapter.h"

View file

@ -12,7 +12,7 @@
#include "mgmt_fe_client.h" #include "mgmt_fe_client.h"
#include "mgmt_msg.h" #include "mgmt_msg.h"
#include "mgmtd/mgmt_defines.h" #include "mgmt_defines.h"
struct mgmt_fe_client_adapter; struct mgmt_fe_client_adapter;
struct mgmt_master; struct mgmt_master;

View file

@ -26,6 +26,8 @@
#define MGMTD_TXN_CLEANUP_DELAY_MSEC 100 #define MGMTD_TXN_CLEANUP_DELAY_MSEC 100
#define MGMTD_TXN_CLEANUP_DELAY_USEC 10 #define MGMTD_TXN_CLEANUP_DELAY_USEC 10
#define MGMTD_TXN_ID_NONE 0
/* /*
* The following definition enables local validation of config * The following definition enables local validation of config
* on the MGMTD process by loading client-defined NB callbacks * on the MGMTD process by loading client-defined NB callbacks

View file

@ -33,11 +33,6 @@ mgmtd_libmgmtd_a_SOURCES = \
mgmtd/mgmt_vty.c \ mgmtd/mgmt_vty.c \
# end # end
mgmtdheaderdir = $(pkgincludedir)/mgmtd
mgmtdheader_HEADERS = \
mgmtd/mgmt_defines.h \
# end
noinst_HEADERS += \ noinst_HEADERS += \
mgmtd/mgmt.h \ mgmtd/mgmt.h \
mgmtd/mgmt_be_adapter.h \ mgmtd/mgmt_be_adapter.h \

View file

@ -779,8 +779,6 @@ sed -i 's/ -M rpki//' %{_sysconfdir}/frr/daemons
%{_libdir}/lib*.so %{_libdir}/lib*.so
%dir %{_includedir}/%{name} %dir %{_includedir}/%{name}
%{_includedir}/%{name}/*.h %{_includedir}/%{name}/*.h
%dir %{_includedir}/%{name}/mgmtd
%{_includedir}/%{name}/mgmtd/*.h
%dir %{_includedir}/%{name}/ospfd %dir %{_includedir}/%{name}/ospfd
%{_includedir}/%{name}/ospfd/*.h %{_includedir}/%{name}/ospfd/*.h
%if %{with_bfdd} %if %{with_bfdd}