@@ -112,7 +112,7 @@ void nc_client_init(void);
112112
113113/**
114114 * @brief Destroy all libssh and/or libssl/libcrypto dynamic memory and
115- * the client options, for both SSH and TLS, and for Call Home too.
115+ * the client options, for both SSH and TLS, and for Call Home too.
116116 */
117117void nc_client_destroy (void );
118118
@@ -135,13 +135,9 @@ void nc_client_destroy(void);
135135 *
136136 * @param[in] fdin Input file descriptor for reading (clear) data from NETCONF server.
137137 * @param[in] fdout Output file descriptor for writing (clear) data for NETCONF server.
138- * @param[in] ctx Optional parameter. If set, provides strict YANG context for the session
139- * (ignoring what is actually supported by the server side). If not set,
140- * YANG context is created for the session using \<get-schema\> (if supported
141- * by the server side) or/and by searching for YANG schemas in the searchpath
142- * (see nc_client_schema_searchpath()). In every case except not providing context
143- * to connect to a server supporting \<get-schema\> it is possible that
144- * the session context will not include all the models supported by the server.
138+ * @param[in] ctx Optional custom context to use for the session. Disregarding whether set or not, any YANG modules
139+ * not present and supported by the server are attempted to be loaded using \<get-schema\> (if supported) and/or by
140+ * searching the searchpath (see ::nc_client_set_schema_searchpath()).
145141 * @return Created NETCONF session object or NULL in case of error.
146142 */
147143struct nc_session * nc_connect_inout (int fdin , int fdout , struct ly_ctx * ctx );
@@ -154,13 +150,9 @@ struct nc_session *nc_connect_inout(int fdin, int fdout, struct ly_ctx *ctx);
154150 * by sending and processing NETCONF \<hello\> messages.
155151 *
156152 * @param[in] address Path to the unix socket.
157- * @param[in] ctx Optional parameter. If set, provides strict YANG context for the session
158- * (ignoring what is actually supported by the server side). If not set,
159- * YANG context is created for the session using \<get-schema\> (if supported
160- * by the server side) or/and by searching for YANG schemas in the searchpath
161- * (see nc_client_schema_searchpath()). In every case except not providing context
162- * to connect to a server supporting \<get-schema\> it is possible that
163- * the session context will not include all the models supported by the server.
153+ * @param[in] ctx Optional custom context to use for the session. Disregarding whether set or not, any YANG modules
154+ * not present and supported by the server are attempted to be loaded using \<get-schema\> (if supported) and/or by
155+ * searching the searchpath (see ::nc_client_set_schema_searchpath()).
164156 * @return Created NETCONF session object or NULL in case of error.
165157 */
166158struct nc_session * nc_connect_unix (const char * address , struct ly_ctx * ctx );
@@ -355,15 +347,11 @@ const char *nc_client_ssh_get_username(void);
355347 * they are supposed to use nc_connect_libssh().
356348 *
357349 * @param[in] host Hostname or address (both Ipv4 and IPv6 are accepted) of the target server.
358- * 'localhost' is used by default if NULL is specified.
350+ * 'localhost' is used by default if NULL is specified.
359351 * @param[in] port Port number of the target server. Default value 830 is used if 0 is specified.
360- * @param[in] ctx Optional parameter. If set, provides strict YANG context for the session
361- * (ignoring what is actually supported by the server side). If not set,
362- * YANG context is created for the session using \<get-schema\> (if supported
363- * by the server side) or/and by searching for YANG schemas in the searchpath
364- * (see nc_client_schema_searchpath()). In every case except not providing context
365- * to connect to a server supporting \<get-schema\> it is possible that
366- * the session context will not include all the models supported by the server.
352+ * @param[in] ctx Optional custom context to use for the session. Disregarding whether set or not, any YANG modules
353+ * not present and supported by the server are attempted to be loaded using \<get-schema\> (if supported) and/or by
354+ * searching the searchpath (see ::nc_client_set_schema_searchpath()).
367355 * @return Created NETCONF session object or NULL on error.
368356 */
369357struct nc_session * nc_connect_ssh (const char * host , uint16_t port , struct ly_ctx * ctx );
@@ -376,15 +364,11 @@ struct nc_session *nc_connect_ssh(const char *host, uint16_t port, struct ly_ctx
376364 * set and connected only the host and the username must be set/is detected. Or the @p ssh_session
377365 * can already be authenticated in which case it is used directly.
378366 *
379- * @param[in] ssh_session libssh structure representing SSH session object. After passing it
380- * to libnetconf2 this way, it is fully managed by it (including freeing!).
381- * @param[in] ctx Optional parameter. If set, provides strict YANG context for the session
382- * (ignoring what is actually supported by the server side). If not set,
383- * YANG context is created for the session using \<get-schema\> (if supported
384- * by the server side) or/and by searching for YANG schemas in the searchpath
385- * (see nc_client_schema_searchpath()). In every case except not providing context
386- * to connect to a server supporting \<get-schema\> it is possible that
387- * the session context will not include all the models supported by the server.
367+ * @param[in] ssh_session libssh structure representing SSH session object. It is fully managed by the created session
368+ * including freeing it.
369+ * @param[in] ctx Optional custom context to use for the session. Disregarding whether set or not, any YANG modules
370+ * not present and supported by the server are attempted to be loaded using \<get-schema\> (if supported) and/or by
371+ * searching the searchpath (see ::nc_client_set_schema_searchpath()).
388372 * @return Created NETCONF session object or NULL on error.
389373 */
390374struct nc_session * nc_connect_libssh (ssh_session ssh_session , struct ly_ctx * ctx );
@@ -393,14 +377,10 @@ struct nc_session *nc_connect_libssh(ssh_session ssh_session, struct ly_ctx *ctx
393377 * @brief Create another NETCONF session on existing SSH session using separated SSH channel.
394378 *
395379 * @param[in] session Existing NETCONF session. The session has to be created on SSH transport layer using libssh -
396- * it has to be created by nc_connect_ssh(), nc_connect_libssh() or nc_connect_ssh_channel().
397- * @param[in] ctx Optional parameter. If set, provides strict YANG context for the session
398- * (ignoring what is actually supported by the server side). If not set,
399- * YANG context is created for the session using \<get-schema\> (if supported
400- * by the server side) or/and by searching for YANG schemas in the searchpath
401- * (see nc_client_schema_searchpath()). In every case except not providing context
402- * to connect to a server supporting \<get-schema\> it is possible that
403- * the session context will not include all the models supported by the server.
380+ * it has to be created by nc_connect_ssh(), nc_connect_libssh() or nc_connect_ssh_channel().
381+ * @param[in] ctx Optional custom context to use for the session. Disregarding whether set or not, any YANG modules
382+ * not present and supported by the server are attempted to be loaded using \<get-schema\> (if supported) and/or by
383+ * searching the searchpath (see ::nc_client_set_schema_searchpath()).
404384 * @return Created NETCONF session object or NULL on error.
405385 */
406386struct nc_session * nc_connect_ssh_channel (struct nc_session * session , struct ly_ctx * ctx );
@@ -479,18 +459,14 @@ void nc_client_tls_get_crl_paths(const char **crl_file, const char **crl_dir);
479459 * @brief Connect to the NETCONF server using TLS transport (via libssl)
480460 *
481461 * TLS session is created with the certificates set using nc_client_tls_* functions, which must be called beforehand!
482- * If the caller needs to use specific TLS session properties, they are supposed to use nc_connect_libssl().
462+ * If the caller needs to use specific TLS session properties, they are supposed to use :: nc_connect_libssl().
483463 *
484464 * @param[in] host Hostname or address (both Ipv4 and IPv6 are accepted) of the target server.
485- * 'localhost' is used by default if NULL is specified.
465+ * 'localhost' is used by default if NULL is specified.
486466 * @param[in] port Port number of the target server. Default value 6513 is used if 0 is specified.
487- * @param[in] ctx Optional parameter. If set, provides strict YANG context for the session
488- * (ignoring what is actually supported by the server side). If not set,
489- * YANG context is created for the session using \<get-schema\> (if supported
490- * by the server side) or/and by searching for YANG schemas in the searchpath
491- * (see nc_client_schema_searchpath()). In every case except not providing context
492- * to connect to a server supporting \<get-schema\> it is possible that
493- * the session context will not include all the models supported by the server.
467+ * @param[in] ctx Optional custom context to use for the session. Disregarding whether set or not, any YANG modules
468+ * not present and supported by the server are attempted to be loaded using \<get-schema\> (if supported) and/or by
469+ * searching the searchpath (see ::nc_client_set_schema_searchpath()).
494470 * @return Created NETCONF session object or NULL on error.
495471 */
496472struct nc_session * nc_connect_tls (const char * host , uint16_t port , struct ly_ctx * ctx );
@@ -501,13 +477,9 @@ struct nc_session *nc_connect_tls(const char *host, uint16_t port, struct ly_ctx
501477 * The TLS session supplied is expected to be fully connected and authenticated!
502478 *
503479 * @param[in] tls libssl structure representing the TLS session object.
504- * @param[in] ctx Optional parameter. If set, provides strict YANG context for the session
505- * (ignoring what is actually supported by the server side). If not set,
506- * YANG context is created for the session using \<get-schema\> (if supported
507- * by the server side) or/and by searching for YANG schemas in the searchpath
508- * (see nc_client_schema_searchpath()). In every case except not providing context
509- * to connect to a server supporting \<get-schema\> it is possible that
510- * the session context will not include all the models supported by the server.
480+ * @param[in] ctx Optional custom context to use for the session. Disregarding whether set or not, any YANG modules
481+ * not present and supported by the server are attempted to be loaded using \<get-schema\> (if supported) and/or by
482+ * searching the searchpath (see ::nc_client_set_schema_searchpath()).
511483 * @return Created NETCONF session object or NULL on error.
512484 */
513485struct nc_session * nc_connect_libssl (SSL * tls , struct ly_ctx * ctx );
0 commit comments