sysrepo  2.11.7
YANG-based system repository for all-around configuration management.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
sysrepo.h File Reference

public API sysrepo header More...

#include <stdint.h>
#include <stdlib.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
#include <libyang/libyang.h>
#include "sysrepo_types.h"
Include dependency graph for sysrepo.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SRP_CLEANUP_CB   "sr_plugin_cleanup_cb"
 sysrepo-plugind plugin cleanup callback name that must exist in every plugin. More...
 
#define SRP_INIT_CB   "sr_plugin_init_cb"
 sysrepo-plugind plugin initialization callback name that must exist in every plugin. More...
 
#define SRPLG_LOG_DBG(plg_name,...)   srplg_log(plg_name, SR_LL_DBG, __VA_ARGS__)
 Log a plugin debug message with format arguments. More...
 
#define SRPLG_LOG_ERR(plg_name,...)   srplg_log(plg_name, SR_LL_ERR, __VA_ARGS__)
 Deprecated, use srplg_log_errinfo() instead. More...
 
#define SRPLG_LOG_INF(plg_name,...)   srplg_log(plg_name, SR_LL_INF, __VA_ARGS__)
 Log a plugin info message with format arguments. More...
 
#define SRPLG_LOG_WRN(plg_name,...)   srplg_log(plg_name, SR_LL_WRN, __VA_ARGS__)
 Log a plugin warning message with format arguments. More...
 

Functions

struct ly_ctx * sr_acquire_context (sr_conn_ctx_t *conn)
 Get the libyang context used by a connection. Can be used in an application for working with data and schemas. More...
 
int sr_acquire_data (sr_conn_ctx_t *conn, struct lyd_node *tree, sr_data_t **data)
 Acquire libyang data tree together with its context lock in a SR data structure. More...
 
int sr_apply_changes (sr_session_ctx_t *session, uint32_t timeout_ms)
 Apply changes made in the current session. In case the changes could not be applied successfully for any reason, they remain intact in the session. More...
 
int sr_check_module_ds_access (sr_conn_ctx_t *conn, const char *module_name, int mod_ds, int *read, int *write)
 Check whether the current application has read/write access to a module. More...
 
int sr_connect (const sr_conn_options_t opts, sr_conn_ctx_t **conn)
 Connects to the sysrepo datastore. More...
 
int sr_copy_config (sr_session_ctx_t *session, const char *module_name, sr_datastore_t src_datastore, uint32_t timeout_ms)
 Replaces a conventional datastore with the contents of another conventional datastore. If the module is specified, limits the operation only to the specified module. If it is not specified, the operation is performed on all modules. More...
 
int sr_delete_item (sr_session_ctx_t *session, const char *path, const sr_edit_options_t opts)
 Prepare to delete the nodes matching the specified xpath. These changes are applied only after calling sr_apply_changes(). The accepted values are the same as for sr_set_item_str. More...
 
int sr_disable_module_feature (sr_conn_ctx_t *conn, const char *module_name, const char *feature_name)
 Disable a module feature. More...
 
int sr_discard_changes (sr_session_ctx_t *session)
 Discard prepared changes made in the current session. More...
 
int sr_discard_items (sr_session_ctx_t *session, const char *xpath)
 Prepare to discard nodes matching the specified xpath (or all if not set) previously set by the session connection. Usable only for SR_DS_OPERATIONAL datastore. These changes are applied only after calling sr_apply_changes(). More...
 
int sr_discard_oper_changes (sr_conn_ctx_t *conn, sr_session_ctx_t *session, const char *xpath, uint32_t timeout_ms)
 Deprecated, use sr_discard_items(). More...
 
int sr_disconnect (sr_conn_ctx_t *conn)
 Disconnect from the sysrepo datastore. More...
 
int sr_dup_changes_iter (sr_session_ctx_t *session, const char *xpath, sr_change_iter_t **iter)
 Create an iterator for retrieving the changes (list of newly added / removed / modified nodes) in module-change callbacks. It can be used even outside the callback. More...
 
int sr_edit_batch (sr_session_ctx_t *session, const struct lyd_node *edit, const char *default_operation)
 Provide a prepared edit data tree to be applied. These changes are applied only after calling sr_apply_changes(). More...
 
int sr_enable_module_feature (sr_conn_ctx_t *conn, const char *module_name, const char *feature_name)
 Enable a module feature. More...
 
void sr_free_change_iter (sr_change_iter_t *iter)
 Frees sr_change_iter_t iterator and all memory allocated within it. More...
 
void sr_free_val (sr_val_t *value)
 Free sr_val_t structure and all memory allocated within it. More...
 
void sr_free_values (sr_val_t *values, size_t count)
 Free array of sr_val_t structures (and all memory allocated within of each array element). More...
 
struct lyd_node * sr_get_change_diff (sr_session_ctx_t *session)
 Get the changes directly in the form of a diff in module-change callbacks. It cannot be used outside the callback. More...
 
int sr_get_change_next (sr_session_ctx_t *session, sr_change_iter_t *iter, sr_change_oper_t *operation, sr_val_t **old_value, sr_val_t **new_value)
 Return the next change from the provided iterator created by sr_get_changes_iter call. Data are represented as sr_val_t structures. More...
 
int sr_get_change_tree_next (sr_session_ctx_t *session, sr_change_iter_t *iter, sr_change_oper_t *operation, const struct lyd_node **node, const char **prev_value, const char **prev_list, int *prev_dflt)
 Returns the next change from the provided iterator created by sr_get_changes_iter call. Data are represented as libyang subtrees. More...
 
struct lyd_node * sr_get_changes (sr_session_ctx_t *session)
 Retrieve stored changes (prepared, not yet applied). More...
 
int sr_get_changes_iter (sr_session_ctx_t *session, const char *xpath, sr_change_iter_t **iter)
 Create an iterator for retrieving the changes (list of newly added / removed / modified nodes) in module-change callbacks. It cannot be used outside the callback. More...
 
uint32_t sr_get_content_id (sr_conn_ctx_t *conn)
 Get content ID of the current YANG module set. It conforms to the requirements for ietf-yang-library "content-id" node value. More...
 
int sr_get_data (sr_session_ctx_t *session, const char *xpath, uint32_t max_depth, uint32_t timeout_ms, const sr_get_options_t opts, sr_data_t **data)
 Retrieve a tree whose root nodes match the provided XPath. Data are represented as libyang subtrees. More...
 
int sr_get_error_data (const sr_error_info_err_t *err, uint32_t idx, uint32_t *size, const void **data)
 Get a specific chunk of error data. More...
 
int sr_get_event_pipe (sr_subscription_ctx_t *subscription, int *event_pipe)
 Get the event pipe of a subscription. Do not call unless SR_SUBSCR_NO_THREAD flag was used when subscribing! Event pipe can be used in select(), poll(), or similar functions to listen for new events. It will then be ready for reading. More...
 
int sr_get_item (sr_session_ctx_t *session, const char *path, uint32_t timeout_ms, sr_val_t **value)
 Retrieve a single data element selected by the provided path. Data are represented as sr_val_t structures. More...
 
int sr_get_items (sr_session_ctx_t *session, const char *xpath, uint32_t timeout_ms, const sr_get_options_t opts, sr_val_t **values, size_t *value_cnt)
 Retrieve an array of data elements selected by the provided XPath. Data are represented as sr_val_t structures. More...
 
int sr_get_lock (sr_conn_ctx_t *conn, sr_datastore_t datastore, const char *module_name, int *is_locked, uint32_t *id, struct timespec *timestamp)
 Check whether the data of the specified module or the whole datastore are locked. More...
 
int sr_get_module_ds_access (sr_conn_ctx_t *conn, const char *module_name, int mod_ds, char **owner, char **group, mode_t *perm)
 Learn about module permissions. More...
 
const sr_module_ds_tsr_get_module_ds_default (void)
 Get the default datastore plugins. More...
 
int sr_get_module_info (sr_conn_ctx_t *conn, sr_data_t **sysrepo_data)
 Get internal sysrepo data tree, which holds detailed information about installed modules. It should not be needed except for some specific use-cases. These data are from the sysrepo module found in modules/sysrepo.yang. More...
 
int sr_get_module_replay_support (sr_conn_ctx_t *conn, const char *module_name, struct timespec *earliest_notif, int *enabled)
 Learn replay support of a module. More...
 
int sr_get_node (sr_session_ctx_t *session, const char *path, uint32_t timeout_ms, sr_data_t **node)
 Retrieve a single value matching the provided XPath. Data are represented as a single libyang node. More...
 
int sr_get_plugins (sr_conn_ctx_t *conn, const char ***ds_plugins, const char ***ntf_plugins)
 Get loaded plugins of a connection. More...
 
const char * sr_get_repo_path (void)
 Get the common path prefix for all sysrepo files. More...
 
uid_t sr_get_su_uid (void)
 Get the sysrepo SUPERUSER UID. More...
 
int sr_get_subtree (sr_session_ctx_t *session, const char *path, uint32_t timeout_ms, sr_data_t **subtree)
 Retrieve a single subtree whose root node is selected by the provided path. Data are represented as libyang subtrees. More...
 
int sr_has_changes (sr_session_ctx_t *session)
 Learn whether there are any prepared non-applied changes in the session. More...
 
int sr_install_module (sr_conn_ctx_t *conn, const char *schema_path, const char *search_dirs, const char **features)
 Install a new schema (module) into sysrepo. More...
 
int sr_install_module2 (sr_conn_ctx_t *conn, const char *schema_path, const char *search_dirs, const char **features, const sr_module_ds_t *module_ds, const char *owner, const char *group, mode_t perm, const char *data, const char *data_path, LYD_FORMAT format)
 Install a new schema (module) into sysrepo with all the available options. More...
 
int sr_install_modules (sr_conn_ctx_t *conn, const char **schema_paths, const char *search_dirs, const char ***features)
 Install new schemas (modules) into sysrepo in a batch. More...
 
int sr_install_modules2 (sr_conn_ctx_t *conn, const sr_install_mod_t *modules, uint32_t module_count, const char *search_dirs, const char *data, const char *data_path, LYD_FORMAT format)
 Install new schemas (modules) into sysrepo in a batch with all the available options. More...
 
int sr_is_module_internal (const struct lys_module *ly_mod)
 Check whether a module is an internal libyang or sysrepo module. Evaluates to true for all the modules that are installed by default when no modules were explicitly added. More...
 
int sr_lock (sr_session_ctx_t *session, const char *module_name, uint32_t timeout_ms)
 Locks the data of the specified module or the whole datastore. More...
 
sr_log_level_t sr_log_get_stderr (void)
 Learn current standard error output log level. More...
 
sr_log_level_t sr_log_get_syslog (void)
 Learn current system log log level. More...
 
void sr_log_set_cb (sr_log_cb log_callback)
 Sets callback that will be called when a log entry would be populated. Callback will be called for every message regardless of any log level. More...
 
void sr_log_stderr (sr_log_level_t log_level)
 Enables / disables / changes log level (verbosity) of logging to standard error output. More...
 
void sr_log_syslog (const char *app_name, sr_log_level_t log_level)
 Enables / disables / changes log level (verbosity) of logging to system log. More...
 
int sr_module_change_get_order (sr_conn_ctx_t *conn, const char *module_name, sr_datastore_t ds, uint32_t *priority)
 Get the current global priority of change subscriptions of a module. More...
 
int sr_module_change_set_order (sr_conn_ctx_t *conn, const char *module_name, sr_datastore_t ds, uint32_t priority)
 Change the global priority of modules being notified about their changes. The default priority of every module is 0 and modules with the same priority have their callbacks notified simultaneously. More...
 
int sr_module_change_sub_get_info (sr_subscription_ctx_t *subscription, uint32_t sub_id, const char **module_name, sr_datastore_t *ds, const char **xpath, uint32_t *filtered_out)
 Get information about an existing change subscription. More...
 
int sr_module_change_sub_modify_xpath (sr_subscription_ctx_t *subscription, uint32_t sub_id, const char *xpath)
 Modify an existing change subscription by changing its XPath filter. More...
 
int sr_module_change_subscribe (sr_session_ctx_t *session, const char *module_name, const char *xpath, sr_module_change_cb callback, void *private_data, uint32_t priority, sr_subscr_options_t opts, sr_subscription_ctx_t **subscription)
 Subscribe for changes made in the specified module. More...
 
int sr_move_item (sr_session_ctx_t *session, const char *path, const sr_move_position_t position, const char *list_keys, const char *leaflist_value, const char *origin, const sr_edit_options_t opts)
 Prepare to move/create the instance of an user-ordered list or leaf-list to the specified position. These changes are applied only after calling sr_apply_changes(). More...
 
int sr_notif_send (sr_session_ctx_t *session, const char *path, const sr_val_t *values, const size_t values_cnt, uint32_t timeout_ms, int wait)
 Send a notification. Data are represented as sr_val_t structures. In case there are particularly many notifications send on a session (100 notif/s or more) and all of them are stored for replay, consider using sr_session_notif_buffer(). More...
 
int sr_notif_send_tree (sr_session_ctx_t *session, struct lyd_node *notif, uint32_t timeout_ms, int wait)
 Send a notification. Data are represented as libyang subtrees. In case there are particularly many notifications send on a session (100 notif/s or more) and all of them are stored for replay, consider using sr_session_notif_buffer(). More...
 
int sr_notif_sub_get_info (sr_subscription_ctx_t *subscription, uint32_t sub_id, const char **module_name, const char **xpath, struct timespec *start_time, struct timespec *stop_time, uint32_t *filtered_out)
 Get information about an existing notification subscription. More...
 
int sr_notif_sub_modify_stop_time (sr_subscription_ctx_t *subscription, uint32_t sub_id, const struct timespec *stop_time)
 Modify an existing notification subscription by changing its stop time. Special SR_EV_NOTIF_MODIFIED notification is delivered. More...
 
int sr_notif_sub_modify_xpath (sr_subscription_ctx_t *subscription, uint32_t sub_id, const char *xpath)
 Modify an existing notification subscription by changing its XPath filter. Special SR_EV_NOTIF_MODIFIED notification is delivered. More...
 
int sr_notif_subscribe (sr_session_ctx_t *session, const char *module_name, const char *xpath, const struct timespec *start_time, const struct timespec *stop_time, sr_event_notif_cb callback, void *private_data, sr_subscr_options_t opts, sr_subscription_ctx_t **subscription)
 Subscribe for the delivery of a notification(s). Data are represented as sr_val_t structures. More...
 
int sr_notif_subscribe_tree (sr_session_ctx_t *session, const char *module_name, const char *xpath, const struct timespec *start_time, const struct timespec *stop_time, sr_event_notif_tree_cb callback, void *private_data, sr_subscr_options_t opts, sr_subscription_ctx_t **subscription)
 Subscribes for the delivery of a notification(s). Data are represented as libyang subtrees. More...
 
int sr_oper_delete_item_str (sr_session_ctx_t *session, const char *path, const char *value, const sr_edit_options_t opts)
 Deprecated, use sr_delete_item(). More...
 
int sr_oper_get_subscribe (sr_session_ctx_t *session, const char *module_name, const char *path, sr_oper_get_items_cb callback, void *private_data, sr_subscr_options_t opts, sr_subscription_ctx_t **subscription)
 Register for providing operational data at the given path. More...
 
int sr_oper_poll_subscribe (sr_session_ctx_t *session, const char *module_name, const char *path, uint32_t valid_ms, sr_subscr_options_t opts, sr_subscription_ctx_t **subscription)
 Start periodic retrieval and caching of operational data at the given path. More...
 
void sr_release_context (sr_conn_ctx_t *conn)
 Release libyang context obtained from a session/connection. More...
 
void sr_release_data (sr_data_t *data)
 Release SR data structure, whoch consists of freeing the data tree, releasing the context, and freeing the structure itself. More...
 
int sr_remove_module (sr_conn_ctx_t *conn, const char *module_name, int force)
 Remove an installed module from sysrepo. More...
 
int sr_remove_modules (sr_conn_ctx_t *conn, const char **module_names, int force)
 Remove installed modules from sysrepo. More...
 
int sr_replace_config (sr_session_ctx_t *session, const char *module_name, struct lyd_node *src_config, uint32_t timeout_ms)
 Replace a datastore with the contents of a data tree. If the module is specified, limit the operation only to the specified module. If it is not specified, the operation is performed on all modules. More...
 
int sr_rpc_send (sr_session_ctx_t *session, const char *path, const sr_val_t *input, const size_t input_cnt, uint32_t timeout_ms, sr_val_t **output, size_t *output_cnt)
 Send an RPC/action and wait for the result. Data are represented as sr_val_t structures. More...
 
int sr_rpc_send_tree (sr_session_ctx_t *session, struct lyd_node *input, uint32_t timeout_ms, sr_data_t **output)
 Send an RPC/action and wait for the result. Data are represented as libyang subtrees. More...
 
int sr_rpc_subscribe (sr_session_ctx_t *session, const char *xpath, sr_rpc_cb callback, void *private_data, uint32_t priority, sr_subscr_options_t opts, sr_subscription_ctx_t **subscription)
 Subscribe for the delivery of an RPC/action. Data are represented as sr_val_t structures. More...
 
int sr_rpc_subscribe_tree (sr_session_ctx_t *session, const char *xpath, sr_rpc_tree_cb callback, void *private_data, uint32_t priority, sr_subscr_options_t opts, sr_subscription_ctx_t **subscription)
 Subscribe for the delivery of an RPC/action. Data are represented as libyang subtrees. More...
 
struct ly_ctx * sr_session_acquire_context (sr_session_ctx_t *session)
 Get the libyang context used by a connection. Can be used in an application for working with data and schemas. More...
 
int sr_session_acquire_data (sr_session_ctx_t *session, struct lyd_node *tree, sr_data_t **data)
 Acquire libyang data tree together with its context lock in a SR data structure. More...
 
void sr_session_del_orig_data (sr_session_ctx_t *session)
 Remove all pushed event originator data. More...
 
int sr_session_dup_error (sr_session_ctx_t *src_session, sr_session_ctx_t *trg_session)
 Copy the first error (if any) from a session to a callback session. More...
 
sr_conn_ctx_tsr_session_get_connection (sr_session_ctx_t *session)
 Get the connection the session was created on. More...
 
sr_datastore_t sr_session_get_ds (sr_session_ctx_t *session)
 Learn the datastore a session operates on. More...
 
int sr_session_get_error (sr_session_ctx_t *session, const sr_error_info_t **error_info)
 Retrieve information about the error that has occurred during the last operation executed within provided session. More...
 
uint32_t sr_session_get_id (sr_session_ctx_t *session)
 Return the assigned session ID of the sysrepo session. More...
 
int sr_session_get_orig_data (sr_session_ctx_t *session, uint32_t idx, uint32_t *size, const void **data)
 Get a specific chunk of event originator data in a callback. More...
 
const char * sr_session_get_orig_name (sr_session_ctx_t *session)
 Get event originator name. More...
 
const char * sr_session_get_user (sr_session_ctx_t *session)
 Get the effective user of a session. More...
 
int sr_session_notif_buffer (sr_session_ctx_t *session)
 Use notification buffering for the session. More...
 
int sr_session_push_error_data (sr_session_ctx_t *session, uint32_t size, const void *data)
 Push (add) another chunk of error data for a failed callback communicated back to the originator. Its meaning is specific to the error data format (which must be set prior to calling this function) identifier and can be read from the error structure by the originator using sr_get_error_data(). More...
 
int sr_session_push_orig_data (sr_session_ctx_t *session, uint32_t size, const void *data)
 Push (add) another chunk of event originator data used for all events sent on this session. Its meaning is specific to the originator name (which must be set prior to calling this function) and can be read from the implicit event session in the callbacks using sr_session_get_orig_data(). More...
 
void sr_session_release_context (sr_session_ctx_t *session)
 Release libyang context obtained from a session/connection. More...
 
int sr_session_set_error (sr_session_ctx_t *session, const char *err_format_name, sr_error_t err_code, const char *err_msg_format,...)
 Set an error for a failed callback communicated back to the originator. Does not print the message. More...
 
int sr_session_set_error_format (sr_session_ctx_t *session, const char *error_format)
 Deprecated, use sr_session_set_error(). More...
 
int sr_session_set_error_message (sr_session_ctx_t *session, const char *format,...)
 Deprecated, use sr_session_set_error(). More...
 
int sr_session_set_orig_name (sr_session_ctx_t *session, const char *orig_name)
 Set event originator name used for all events sent on this session. It can then be read from the implicit event session in the callbacks using sr_session_get_orig_name(). This name should be used for interpreting the data set by sr_session_push_orig_data(). More...
 
int sr_session_set_user (sr_session_ctx_t *session, const char *user)
 Set the effective user of a session to a different one than the process owner. More...
 
int sr_session_start (sr_conn_ctx_t *conn, const sr_datastore_t datastore, sr_session_ctx_t **session)
 Start a new session. More...
 
int sr_session_stop (sr_session_ctx_t *session)
 Stop the session and releases resources tied to it. More...
 
int sr_session_switch_ds (sr_session_ctx_t *session, sr_datastore_t ds)
 Change datastore which the session operates on. All subsequent calls will be issued on the chosen datastore. Previous calls are not affected. More...
 
int sr_session_unsubscribe (sr_session_ctx_t *session)
 Unsubscribe all subscriptions created by this session. More...
 
int sr_set_item (sr_session_ctx_t *session, const char *path, const sr_val_t *value, const sr_edit_options_t opts)
 Prepare to set (create) the value of a leaf, leaf-list, list, or presence container. These changes are applied only after calling sr_apply_changes(). Data are represented as sr_val_t structures. More...
 
int sr_set_item_str (sr_session_ctx_t *session, const char *path, const char *value, const char *origin, const sr_edit_options_t opts)
 Prepare to set (create) the value of a leaf, leaf-list, list, or presence container. These changes are applied only after calling sr_apply_changes(). Data are represented as pairs of a path and string value. More...
 
int sr_set_module_ds_access (sr_conn_ctx_t *conn, const char *module_name, int mod_ds, const char *owner, const char *group, mode_t perm)
 Change module permissions. More...
 
int sr_set_module_replay_support (sr_conn_ctx_t *conn, const char *module_name, int enable)
 Change module replay support. More...
 
const char * sr_strerror (int err_code)
 Returns the error message corresponding to the error code. More...
 
uint32_t sr_subscription_get_last_sub_id (const sr_subscription_ctx_t *subscription)
 Get the subscription ID of the last created subscription. More...
 
int sr_subscription_get_suspended (sr_subscription_ctx_t *subscription, uint32_t sub_id, int *suspended)
 Learn the suspend state of a specific subscription. More...
 
int sr_subscription_process_events (sr_subscription_ctx_t *subscription, sr_session_ctx_t *session, struct timespec *wake_up_in)
 Process any pending new events on a subscription. Should not be called unless SR_SUBSCR_NO_THREAD flag was used when subscribing! Usually called after this subscription's event pipe is ready for reading but can also be called periodically. More...
 
int sr_subscription_resume (sr_subscription_ctx_t *subscription, uint32_t sub_id)
 Resume a previously suspended subscription. Special SR_EV_NOTIF_RESUMED notification is delivered for resumed notification subscriptions. More...
 
int sr_subscription_suspend (sr_subscription_ctx_t *subscription, uint32_t sub_id)
 Suspend a specific subscription. Special SR_EV_NOTIF_SUSPENDED notification is delivered for suspended notification subscriptions. More...
 
int sr_subscription_thread_resume (sr_subscription_ctx_t *subscription)
 Resume the default handler thread of a subscription structure that was suspended previously. More...
 
int sr_subscription_thread_suspend (sr_subscription_ctx_t *subscription)
 Suspend the default handler thread of a subscription structure. Meaning it will stop handling any events on the subscription until it is resumed. More...
 
int sr_unlock (sr_session_ctx_t *session, const char *module_name)
 Unlocks the data of the specified module or the whole datastore. More...
 
int sr_unsubscribe (sr_subscription_ctx_t *subscription)
 Unsubscribe all the subscriptions in a subscription structure and free it. More...
 
int sr_unsubscribe_sub (sr_subscription_ctx_t *subscription, uint32_t sub_id)
 Unsubscribe a specific or all the subscriptions in a subscription structure. More...
 
int sr_update_module (sr_conn_ctx_t *conn, const char *schema_path, const char *search_dirs)
 Update an installed schema (module) to a new revision. More...
 
int sr_update_modules (sr_conn_ctx_t *conn, const char **schema_paths, const char *search_dirs)
 Update installed schemas (modules) to new revisions in a batch. More...
 
int sr_validate (sr_session_ctx_t *session, const char *module_name, uint32_t timeout_ms)
 Perform the validation a datastore and any changes made in the current session, but do not apply nor discard them. More...
 
void srplg_errinfo_free (sr_error_info_t **err_info)
 Free a superfluous error info. More...
 
void int srplg_errinfo_push_error_data (sr_error_info_t *err_info, uint32_t size, const void *data)
 Push (add) another chunk of error data for a failed plugin callback. Its meaning is specific to the error data format name (which must be set prior to calling this function) identifier and can be read from the error structure by the originator using sr_get_error_data(). More...
 
void srplg_log (const char *plg_name, sr_log_level_t ll, const char *format,...) _FORMAT_PRINTF(3
 
void srplg_log_errinfo (sr_error_info_t **err_info, const char *plg_name, const char *err_format_name, sr_error_t err_code, const char *format,...) _FORMAT_PRINTF(5
 Log a plugin error message and add the error into an error info structure. More...
 

Detailed Description

public API sysrepo header

Author
Michal Vasko mvask.nosp@m.o@ce.nosp@m.snet..nosp@m.cz

This source code is licensed under BSD 3-Clause License (the "License"). You may not use this file except in compliance with the License. You may obtain a copy of the License at

https://opensource.org/licenses/BSD-3-Clause

Definition in file sysrepo.h.

Function Documentation

void srplg_log ( const char *  plg_name,
sr_log_level_t  ll,
const char *  format,
  ... 
)