@@ -757,10 +757,23 @@ struct nc_session {
757757 struct ly_ctx * ctx ; /**< libyang context of the session */
758758 void * data ; /**< arbitrary user data */
759759 uint8_t flags ; /**< various flags of the session */
760- #define NC_SESSION_SHAREDCTX 0x01
760+
761+ /* shared flags */
762+ #define NC_SESSION_SHAREDCTX 0x01 /**< context is shared */
761763#define NC_SESSION_CALLHOME 0x02 /**< session is Call Home and ch_lock is initialized */
762764#define NC_SESSION_CH_THREAD 0x04 /**< protected by ch_lock */
763765
766+ /* client flags */
767+ #define NC_SESSION_CLIENT_NOT_STRICT 0x08 /**< some server modules failed to load so the data from
768+ them will be ignored - not use strict flag for parsing */
769+ #define NC_SESSION_CLIENT_MONITORED 0x40 /**< session is being monitored by the client monitoring thread */
770+
771+ /* server flags */
772+ #ifdef NC_ENABLED_SSH_TLS
773+ #define NC_SESSION_SSH_AUTHENTICATED 0x10 /**< SSH session authenticated */
774+ #define NC_SESSION_SSH_SUBSYS_NETCONF 0x20 /**< netconf subsystem requested */
775+ #endif
776+
764777 union {
765778 struct {
766779 /* client side only data */
@@ -771,11 +784,6 @@ struct nc_session {
771784 ATOMIC_T ntf_thread_count ; /**< number of running notification threads */
772785 ATOMIC_T ntf_thread_running ; /**< flag whether there are notification threads for this session running or not */
773786 struct lyd_node * ext_data ; /**< LY ext data used in the context callback */
774-
775- /* client flags */
776- /* some server modules failed to load so the data from them will be ignored - not use strict flag for parsing */
777- # define NC_SESSION_CLIENT_NOT_STRICT 0x08
778- # define NC_SESSION_CLIENT_MONITORED 0x40 /**< session is being monitored by the client monitoring thread */
779787 } client ;
780788 struct {
781789 /* server side only data */
@@ -793,14 +801,8 @@ struct nc_session {
793801 pthread_mutex_t ch_lock ; /**< Call Home thread lock */
794802 pthread_cond_t ch_cond ; /**< Call Home thread condition */
795803
796- /* server flags */
797804#ifdef NC_ENABLED_SSH_TLS
798- /* SSH session authenticated */
799- # define NC_SESSION_SSH_AUTHENTICATED 0x10
800- /* netconf subsystem requested */
801- # define NC_SESSION_SSH_SUBSYS_NETCONF 0x20
802805 uint16_t ssh_auth_attempts ; /**< number of failed SSH authentication attempts */
803-
804806 void * client_cert ; /**< TLS client certificate if used for authentication */
805807#endif /* NC_ENABLED_SSH_TLS */
806808 } server ;
0 commit comments