![]() |
libyang 6.4.3
libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
|
ietf-yang-semver API More...
Go to the source code of this file.
Data Structures | |
| struct | lys_ext_instance_semver |
| Structure with parsed semver version. More... | |
Enumerations | |
| enum | lys_ext_instance_semver_compat { LYS_EXT_SEMVER_COMPAT_NONE = 0 , LYS_EXT_SEMVER_COMPAT_COMPATIBLE , LYS_EXT_SEMVER_COMPAT_NON_COMPATIBLE } |
| COMPAT modifier of semver. More... | |
Functions | |
| LIBYANG_API_DECL int | lys_semver_cmp (const struct lys_ext_instance_semver *ver1, const struct lys_ext_instance_semver *ver2) |
| Compare semantic versions ignoring metadata. | |
| LIBYANG_API_DECL const struct lys_ext_instance_semver * | lys_semver_get (const struct lys_module *mod, const char **semver_str) |
| Get semantic version of a module. | |
| LIBYANG_API_DECL const struct lys_ext_instance_semver * | lysp_semver_get (const struct lysp_module *pmod, const char **semver_str) |
| Get semantic version of a parsed (sub)module. | |
ietf-yang-semver API
Copyright (c) 2026 CESNET, z.s.p.o.
This source code is licensed under BSD 3-Clause License (the "License"). You may not use this file except in compliance with the License. You may obtain a copy of the License at
https://opensource.org/licenses/BSD-3-Clause
Definition in file semver.h.
| struct lys_ext_instance_semver |
Structure with parsed semver version.
MAJOR.MINOR.PATCH(_COMPAT)(-PRE_RELEASE)(+BUILD)
| Data Fields | ||
|---|---|---|
| char * | build_meta |
Optional BUILD metadata. |
| enum lys_ext_instance_semver_compat | compat |
Optional COMPAT version modifier. |
| int32_t | major |
MAJOR version number. |
| int32_t | minor |
MINOR version number. |
| int32_t | patch |
PATCH version number. |
| char * | pre_release_meta |
Optional PRE_RELEASE matadata. |
| LIBYANG_API_DECL int lys_semver_cmp | ( | const struct lys_ext_instance_semver * | ver1, |
| const struct lys_ext_instance_semver * | ver2 | ||
| ) |
Compare semantic versions ignoring metadata.
| [in] | ver1 | First semantic version. |
| [in] | ver2 | Second semantic version. |
| LIBYANG_API_DECL const struct lys_ext_instance_semver * lys_semver_get | ( | const struct lys_module * | mod, |
| const char ** | semver_str | ||
| ) |
Get semantic version of a module.
To get version of a submodule, use lysp_semver_get().
| [in] | mod | Module to use. |
| [out] | semver_str | Optional string semantic version if defined for mod at its current revision. NULL otherwise. |
mod at its current revision. | LIBYANG_API_DECL const struct lys_ext_instance_semver * lysp_semver_get | ( | const struct lysp_module * | pmod, |
| const char ** | semver_str | ||
| ) |
Get semantic version of a parsed (sub)module.
| [in] | pmod | Parsed (sub)module to use. |
| [out] | semver_str | Optional string semantic version if defined for mod at its current revision. NULL otherwise. |
pmod at its current revision.