diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:56:23 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:56:23 +0000 |
commit | c15d6efd40655f717841d00839a43df1ead5cb26 (patch) | |
tree | 35d579f9a19170e2b39085669ca92533c2d161b4 /mgmtd/mgmt_fe_adapter.h | |
parent | Adding upstream version 10.0.1. (diff) | |
download | frr-upstream.tar.xz frr-upstream.zip |
Adding upstream version 10.1.upstream/10.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mgmtd/mgmt_fe_adapter.h')
-rw-r--r-- | mgmtd/mgmt_fe_adapter.h | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/mgmtd/mgmt_fe_adapter.h b/mgmtd/mgmt_fe_adapter.h index 2150f86..61d6cfa 100644 --- a/mgmtd/mgmt_fe_adapter.h +++ b/mgmtd/mgmt_fe_adapter.h @@ -24,7 +24,6 @@ struct mgmt_commit_stats { #endif struct timeval prep_cfg_start; struct timeval txn_create_start; - struct timeval send_cfg_start; struct timeval apply_cfg_start; struct timeval apply_cfg_end; struct timeval txn_del_start; @@ -164,6 +163,46 @@ mgmt_fe_adapter_send_tree_data(uint64_t session_id, uint64_t txn_id, int partial_error, bool short_circuit_ok); /** + * Send RPC reply back to client. + * + * This also cleans up and frees the transaction. + * + * Args: + * session_id: the session. + * txn_id: the txn_id this data pertains to + * req_id: the req id for the rpc message + * result_type: the format of the result data. + * result: the results. + * + * Return: + * the return value from the underlying send function. + */ +extern int mgmt_fe_adapter_send_rpc_reply(uint64_t session_id, uint64_t txn_id, + uint64_t req_id, + LYD_FORMAT result_type, + const struct lyd_node *result); + +/** + * Send edit reply back to client. If error is not 0, a native error is sent. + * + * This also cleans up and frees the transaction. + * + * Args: + * session_id: the session. + * txn_id: the txn_id this data pertains to + * req_id: the req id for the edit message + * unlock: implicit-lock flag was set in the request + * commit: implicit-commit flag was set in the request + * xpath: the xpath of the data node that was created + * error: the error code, zero for successful request + * errstr: the error string, if error is non-zero + */ +extern int mgmt_fe_adapter_send_edit_reply(uint64_t session_id, uint64_t txn_id, + uint64_t req_id, bool unlock, + bool commit, const char *xpath, + int16_t error, const char *errstr); + +/** * Send an error back to the FE client using native messaging. * * This also cleans up and frees the transaction. |