mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 13:37:17 +02:00

This commit introduces the Frontend Interface which can be used by front-end management clients like Netconf server, Restconf Server and CLI to interact with new FRR Management daemon (MGMTd) to access and sometimes modify FRR management data. This commit includes the following functionalities in the changeset: 1. Add new Frontend server for clients connect to. 2. Add a C-based Frontend client library which can be used by Frontend clients to communicate with MGMTd via the Frontend interface. 3. Maintain a frontend adapter for each connection from an appropriate Frontend client to facilitate client requests and track one or more client sessions across it. 4. Define the protobuf message format for messages to be exchanged between MGMTd Frontend module and the Frontend client. 5. This changeset also introduces an instance of MGMT Frontend client embedded within the lib/vty module that can be leveraged by any FRR daemon to connect to MGMTd's Frontend interface. The same has been integrated with and initialized within the MGMTd daemon's process context to implement a bunch of 'set-config', 'commit-apply', 'get-config' and 'get-data' commands via VTYSH Co-authored-by: Pushpasis Sarkar <pushpasis@gmail.com> Co-authored-by: Abhinay Ramesh <rabhinay@vmware.com> Co-authored-by: Ujwal P <ujwalp@vmware.com> Signed-off-by: Yash Ranjan <ranjany@vmware.com>
41 lines
759 B
C
41 lines
759 B
C
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
/*
|
|
* MGMTD public defines.
|
|
*
|
|
* Copyright (C) 2021 Vmware, Inc.
|
|
* Pushpasis Sarkar <spushpasis@vmware.com>
|
|
*/
|
|
|
|
#ifndef _FRR_MGMTD_DEFINES_H
|
|
#define _FRR_MGMTD_DEFINES_H
|
|
|
|
#include "yang.h"
|
|
|
|
#define MGMTD_CLIENT_NAME_MAX_LEN 32
|
|
|
|
#define MGMTD_MAX_XPATH_LEN XPATH_MAXLEN
|
|
|
|
#define MGMTD_MAX_YANG_VALUE_LEN YANG_VALUE_MAXLEN
|
|
|
|
enum mgmt_result {
|
|
MGMTD_SUCCESS = 0,
|
|
MGMTD_INVALID_PARAM,
|
|
MGMTD_INTERNAL_ERROR,
|
|
MGMTD_NO_CFG_CHANGES,
|
|
MGMTD_DS_LOCK_FAILED,
|
|
MGMTD_DS_UNLOCK_FAILED,
|
|
MGMTD_UNKNOWN_FAILURE
|
|
};
|
|
|
|
enum mgmt_fe_event {
|
|
MGMTD_FE_SERVER = 1,
|
|
MGMTD_FE_CONN_READ,
|
|
MGMTD_FE_CONN_WRITE,
|
|
MGMTD_FE_CONN_WRITES_ON,
|
|
MGMTD_FE_PROC_MSG
|
|
};
|
|
|
|
#define MGMTD_TXN_ID_NONE 0
|
|
|
|
#endif /* _FRR_MGMTD_DEFINES_H */
|