libyang  3.7.1
libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
printer_schema.h File Reference

Schema printers for libyang. More...

#include <stdint.h>
#include <stdio.h>
#include "log.h"
#include "out.h"
Include dependency graph for printer_schema.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define LYS_PRINT_NO_SUBSTMT   0x10
 
#define LYS_PRINT_SHRINK   LY_PRINT_SHRINK
 

Enumerations

enum  LYS_OUTFORMAT {
  LYS_OUT_UNKNOWN = 0, LYS_OUT_YANG = 1, LYS_OUT_YANG_COMPILED = 2, LYS_OUT_YIN = 3,
  LYS_OUT_TREE
}
 Schema output formats accepted by libyang printer functions. More...
 

Functions

LIBYANG_API_DECL LY_ERR lys_print_clb (ly_write_clb writeclb, void *user_data, const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options)
 Print schema tree in the specified format using a provided callback. More...
 
LIBYANG_API_DECL LY_ERR lys_print_fd (int fd, const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options)
 Print schema tree in the specified format into a file descriptor. More...
 
LIBYANG_API_DECL LY_ERR lys_print_file (FILE *f, const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options)
 Print schema tree in the specified format into a file stream. More...
 
LIBYANG_API_DECL LY_ERR lys_print_mem (char **strp, const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options)
 Print schema tree in the specified format into a memory block. It is up to caller to free the returned string by free(). More...
 
LIBYANG_API_DECL LY_ERR lys_print_module (struct ly_out *out, const struct lys_module *module, LYS_OUTFORMAT format, size_t line_length, uint32_t options)
 Schema module printer. More...
 
LIBYANG_API_DECL LY_ERR lys_print_node (struct ly_out *out, const struct lysc_node *node, LYS_OUTFORMAT format, size_t line_length, uint32_t options)
 Schema node printer. More...
 
LIBYANG_API_DECL LY_ERR lys_print_path (const char *path, const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options)
 Print schema tree in the specified format into a file. More...
 
LIBYANG_API_DECL LY_ERR lys_print_submodule (struct ly_out *out, const struct lysp_submodule *submodule, LYS_OUTFORMAT format, size_t line_length, uint32_t options)
 Schema submodule printer. More...
 

Detailed Description

Schema printers for libyang.

Author
Radek Krejci rkrej.nosp@m.ci@c.nosp@m.esnet.nosp@m..cz
Michal Vasko mvask.nosp@m.o@ce.nosp@m.snet..nosp@m.cz Copyright (c) 2015-2022 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 printer_schema.h.