yumapro  24.10-1
YumaPro SDK
Loading...
Searching...
No Matches
SID Management

Support Experimental YANG to CBOR SID File. More...

Collaboration diagram for SID Management:

Typedefs

typedef yang_sid_status_t(* yang_sid_test_fn_t) (ncx_module_t *mod)
 function callback to test if module is external, internal, or should be skipped for SID assignment More...
 

Enumerations

enum  yang_sid_status_t {
  YANG_SID_STAT_NONE ,
  YANG_SID_STAT_EXTERNAL ,
  YANG_SID_STAT_INTERNAL ,
  YANG_SID_STAT_SKIP
}
 enum for the keep-module status returned by the test function Only used for LSID assignment at this time More...
 

Functions

status_t yang_sid_set_module (ncx_module_t *mod, ncx_yang_sid_mode_t yang_sid_mode)
 Attempt to assign SIDs for the module. More...
 
status_t yang_sid_set_all_modules (ncx_yang_sid_mode_t yang_sid_mode, boolean strict_mode, yang_sid_test_fn_t test_fn)
 Attempt to assign the YANG SIDs for all the loaded modules. More...
 
void yang_sid_init (void)
 Initialize the YANG SID module. More...
 
void yang_sid_cleanup (void)
 Cleanup the YANG SID module. More...
 
uint8 yang_sid_num_bits (void)
 Number of bits in the SID implementation. More...
 
const xmlChar * yang_sid_mode_str (ncx_yang_sid_mode_t sidmode)
 string for the yang_sid_mode enumeration More...
 

Detailed Description

Support Experimental YANG to CBOR SID File.

Manage SID assignment modes

Typedef Documentation

◆ yang_sid_test_fn_t

typedef yang_sid_status_t(* yang_sid_test_fn_t) (ncx_module_t *mod)

function callback to test if module is external, internal, or should be skipped for SID assignment

Parameters
modmodule to check
Returns
enum for the processing for this module

Enumeration Type Documentation

◆ yang_sid_status_t

enum for the keep-module status returned by the test function Only used for LSID assignment at this time

Enumerator
YANG_SID_STAT_NONE 

not set

YANG_SID_STAT_EXTERNAL 

keep module as externally visible

YANG_SID_STAT_INTERNAL 

keep module as internally visible

YANG_SID_STAT_SKIP 

do not assign SIDs to this module

Function Documentation

◆ yang_sid_cleanup()

void yang_sid_cleanup ( void  )

Cleanup the YANG SID module.

Here is the caller graph for this function:

◆ yang_sid_init()

void yang_sid_init ( void  )

Initialize the YANG SID module.

Here is the caller graph for this function:

◆ yang_sid_mode_str()

const xmlChar * yang_sid_mode_str ( ncx_yang_sid_mode_t  sidmode)

string for the yang_sid_mode enumeration

Parameters
sidmodeSID mode enumeration to convert to string
Returns
string value for the enum or NULL if none

◆ yang_sid_num_bits()

uint8 yang_sid_num_bits ( void  )

Number of bits in the SID implementation.

Expect 16, 32, or 64

DEFAULT IS 32, NOT 64!!!!

Returns
number

◆ yang_sid_set_all_modules()

status_t yang_sid_set_all_modules ( ncx_yang_sid_mode_t  yang_sid_mode,
boolean  strict_mode,
yang_sid_test_fn_t  test_fn 
)

Attempt to assign the YANG SIDs for all the loaded modules.

USED BY THE SERVER ONLY!! CLIENT USAGE DOES NOT SET ALL MODULES!!! The <get-yang-sid-data> operation is used to set YANG SID assignments on a client!!!

the function will attempt to set all modules even if an error occurred in 1 SID file. The return status is the overall status, set to the last error that occurred.
If true, Any missing or incomplete SID files will cause the function to stop and return an error

Parameters
yang_sid_modeSID assignment mode to use
Once set cannot be changed!!
strict_modeIf false,
test_fntest callback to check how module is handled if NULL, then all modules set as YANG_SID_STAT_EXTERNAL
Returns
status
Here is the call graph for this function:
Here is the caller graph for this function:

◆ yang_sid_set_module()

status_t yang_sid_set_module ( ncx_module_t mod,
ncx_yang_sid_mode_t  yang_sid_mode 
)

Attempt to assign SIDs for the module.

Parameters
modmodule to assign
yang_sid_modeSID assignment mode to use
Once set cannot be changed!!
Returns
status
Here is the call graph for this function:
Here is the caller graph for this function: