39#define LY_LIST_FOR(START, ELEM) \
40 for ((ELEM) = (START); \
42 (ELEM) = (ELEM)->next)
53#define LY_LIST_FOR_SAFE(START, NEXT, ELEM) \
54 for ((ELEM) = (START); \
55 (ELEM) ? (NEXT = (ELEM)->next, 1) : 0; \
83#define LY_DATA_TYPE_COUNT 20
118 uint32_t str_len,
void **pat_comp);
LY_ERR
libyang's error codes returned by the libyang functions.
LIBYANG_API_DECL LY_ERR ly_time_ts2str(const struct timespec *ts, char **str)
Convert timespec into date-and-time string value.
LIBYANG_API_DECL LY_ERR ly_time_str2time(const char *value, time_t *time, char **fractions_s)
Convert date-and-time from string to UNIX timestamp and fractions of a second.
LY_DATA_TYPE
YANG built-in types.
LIBYANG_API_DECL int ly_time_tz_offset(void)
Get current timezone (including DST setting) UTC (GMT) time offset in seconds.
LIBYANG_API_DECL LY_ERR ly_time_str2ts(const char *value, struct timespec *ts)
Convert date-and-time from string to timespec.
const char * ly_data_type2str[20]
Stringfield YANG built-in data types.
#define LY_DATA_TYPE_COUNT
LIBYANG_API_DECL void ly_pattern_free(void *pat_comp)
Free a compiled XML Schema regex pattern.
LY_VALUE_FORMAT
All kinds of supported value formats and prefix mappings to modules.
@ LY_VALUE_SCHEMA_RESOLVED
LIBYANG_API_DECL int ly_time_tz_offset_at(time_t time)
Get UTC (GMT) timezone offset in seconds at a specific timestamp (including DST setting).
LIBYANG_API_DECL LY_ERR ly_time_time2str(time_t time, const char *fractions_s, char **str)
Convert UNIX timestamp and fractions of a second into canonical date-and-time string value.
LIBYANG_API_DECL LY_ERR ly_pattern_match(const struct ly_ctx *ctx, const char *pattern, const char *string, uint32_t str_len, void **pat_comp)
Check a string matches an XML Schema regex used in YANG.
LIBYANG_API_DECL LY_ERR ly_pattern_compile(const struct ly_ctx *ctx, const char *pattern, void **pat_comp)
Compile an XML Schema regex pattern prior to matching.