yumapro
24.10-4
YumaPro SDK
|
NCX Module Library YANG Feature Utility Functions. More...
#include <xmlstring.h>
#include "dlq.h"
#include "ncxtypes.h"
#include "tk.h"
#include "typ.h"
#include "val.h"
#include "xmlns.h"
#include "yang.h"
Go to the source code of this file.
Macros | |
#define | SET_FEAT(F) (F) |= NCX_FL_FEAT_SET |
this flag is used in feature.feature_flags to indicate the cached final enable flag is OK to use. More... | |
#define | SET_FEAT_ENA(F) (F) |= NCX_FL_FEAT_ENABLED |
this flag is used in feature.feature_flags to indicate the final enabled value to use. More... | |
#define | SET_FEAT_XFER(F) (F) |= NCX_FL_FEAT_XFER |
this flag is used in feature.feature_flags to indicate the feature_entry with the saved settings has been transfered to the YANG feature entry | |
Functions | |
void | ncx_feature_init (void) |
Init the ncx_feature module. | |
void | ncx_feature_cleanup (void) |
Cleanup the ncx_feature module. | |
ncx_iffeature_t * | ncx_new_iffeature (void) |
Get a new ncx_iffeature_t struct. More... | |
void | ncx_free_iffeature (ncx_iffeature_t *iff) |
Free a malloced ncx_iffeature_t struct. More... | |
ncx_iff_ref_t * | ncx_new_iff_ref (const xmlChar *prefix, uint32 prefix_len, const xmlChar *featname) |
Get a new ncx_iff_ref_t struct. More... | |
void | ncx_free_iff_ref (ncx_iff_ref_t *iff_ref) |
Free a malloced ncx_iff_ref_t struct. More... | |
ncx_iff_ref_t * | ncx_find_iff_ref (dlq_hdr_t *iff_refQ, const xmlChar *prefix, uint32 prefix_len, const xmlChar *featname) |
Find a ncx_iff_ref_t struct. More... | |
ncx_iffeature_t * | ncx_clone_iffeature (ncx_iffeature_t *srciff) |
Clone a new ncx_iffeature_t struct. More... | |
void | ncx_clean_iffeatureQ (dlq_hdr_t *iffeatureQ) |
Clean a Q of malloced ncx_iffeature_t struct. More... | |
ncx_iffeature_t * | ncx_find_iffeature (dlq_hdr_t *iffeatureQ, const xmlChar *prefix, const xmlChar *name, const xmlChar *modprefix) |
Search a Q of ncx_iffeature_t structs for a match. More... | |
ncx_feature_t * | ncx_new_feature (void) |
Get a new ncx_feature_t struct. More... | |
void | ncx_free_feature (ncx_feature_t *feature) |
Free a malloced ncx_feature_t struct. More... | |
ncx_feature_t * | ncx_find_feature (ncx_module_t *mod, const xmlChar *name) |
Find a ncx_feature_t struct in the module and perhaps any of its submodules. More... | |
ncx_feature_t * | ncx_find_feature_que (dlq_hdr_t *featureQ, const xmlChar *name) |
Find a ncx_feature_t struct in the specified Q. More... | |
ncx_feature_t * | ncx_find_feature_all (ncx_module_t *mod, const xmlChar *name) |
Find a ncx_feature_t struct in the module and perhaps any of its submodules. More... | |
void | ncx_for_all_features (const ncx_module_t *mod, ncx_feature_cbfn_t cbfn, void *cookie, boolean enabledonly) |
Execute a callback function for all features in this module and any submodules. More... | |
uint32 | ncx_feature_count (const ncx_module_t *mod, boolean enabledonly) |
Get the total feature count for this module and any submodules. More... | |
boolean | ncx_feature_enabled (ncx_feature_t *feature) |
Check if the specified feature and any referenced if-features are enabled. More... | |
boolean | ncx_feature_enabled_str (const xmlChar *modname, const xmlChar *revision, const xmlChar *name) |
Find a ncx_feature_t struct and check if it is enabled. More... | |
void | ncx_set_feature_enable_default (boolean flag) |
Set the feature_enable_default flag. More... | |
void | ncx_set_feature_code_default (ncx_feature_code_t code) |
Set the feature_code_default enumeration (deprecated) More... | |
status_t | ncx_set_feature_code_entry (const xmlChar *featstr, ncx_feature_code_t featcode) |
Create or set a feature_entry struct for the specified feature code parameter (deprecated) More... | |
status_t | ncx_set_feature_enable_entry (const xmlChar *featstr, boolean flag) |
Create or set a feature_entry struct for the specified feature enabled parameter. More... | |
status_t | ncx_set_feature_enable (const xmlChar *modname, const xmlChar *name, boolean flag) |
Create or set a feature_entry struct for the specified feature enabled parameter. More... | |
status_t | ncx_set_feature_enable_ex (const xmlChar *modname, const xmlChar *name, boolean flag, boolean force) |
Create or set a feature_entry struct for the specified feature enabled parameter (extended) More... | |
void | ncx_set_feature_parms (ncx_feature_t *feature) |
Check if any feature parameters were set for the specified feature struct. More... | |
void | ncx_set_features_for_mod (ncx_module_t *mod) |
Check if any feature parameters were set for the specified feature struct for all features in a module. More... | |
ncx_feature_t * | ncx_first_feature_from_iff (ncx_iffeature_t *iff) |
Get the feature in the first ncx_iff_ref_t struct. More... | |
const xmlChar * | ncx_get_feature_modname (ncx_feature_t *feat) |
Get the module name string for the feature. More... | |
NCX Module Library YANG Feature Utility Functions.
#define SET_FEAT | ( | F | ) | (F) |= NCX_FL_FEAT_SET |
this flag is used in feature.feature_flags to indicate the cached final enable flag is OK to use.
It starts out false and can be forced to false in Bundle SIL code init fn when the feature flags are set for real. They can be set incorrectly if an implemented module imports the module
#define SET_FEAT_ENA | ( | F | ) | (F) |= NCX_FL_FEAT_ENABLED |
this flag is used in feature.feature_flags to indicate the final enabled value to use.
The enabled boolean in the feature is just the value set for the feature There could be if-feature-stmts inside the feature that force the end result to false. This end result is the value stored in this flag