client session CHANGE allow to make client sessions not strict on request
diff --git a/src/session_client.c b/src/session_client.c
index 4608b5e..030964d 100644
--- a/src/session_client.c
+++ b/src/session_client.c
@@ -1811,3 +1811,14 @@
*msgid = cur_msgid;
return NC_MSG_RPC;
}
+
+API void
+nc_client_session_set_not_strict(struct nc_session *session)
+{
+ if (session->side != NC_CLIENT) {
+ ERRARG("session");
+ return;
+ }
+
+ session->flags |= NC_SESSION_CLIENT_NOT_STRICT;
+}
diff --git a/src/session_client.h b/src/session_client.h
index 40fcc02..7330393 100644
--- a/src/session_client.h
+++ b/src/session_client.h
@@ -436,4 +436,15 @@
*/
NC_MSG_TYPE nc_send_rpc(struct nc_session *session, struct nc_rpc *rpc, int timeout, uint64_t *msgid);
+/**
+ * @brief Make a session not strict when sending RPCs and receiving RPC replies. In other words,
+ * it will silently skip unknown nodes without an error.
+ *
+ * Generally, no such data should be worked with, so use this function only when you know what you
+ * are doing and you understand the consequences.
+ *
+ * @param[in] session NETCONF client session.
+ */
+void nc_client_session_set_not_strict(struct nc_session *session);
+
#endif /* NC_SESSION_CLIENT_H_ */