yumapro  24.10-2
YumaPro SDK
Loading...
Searching...
No Matches
yangapi.h File Reference

YANG-API definitions (pre-RESTCONF) More...

#include <xmlreader.h>
#include "dlq.h"
#include "ncxtypes.h"
#include "op.h"
#include "obj.h"
#include "val.h"
#include "xpath.h"
Include dependency graph for yangapi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  yangapi_param_t
 YANG-API Query string parameter. More...
 
struct  yangapi_accept_t
 Restapi Accept header string entries. More...
 
struct  yangapi_snmp_cb_t
 Restapi SNMP Control Block Used by RESTCONF to hold parse and request processing state for an SNMP request. More...
 
struct  yangapi_cb_t
 Restapi Control Block Used by RESTCONF to hold parse and request processing state. More...
 

Macros

#define YANGAPI_RET_OK   200
 HTTP 200 OK return code.
 
#define YANGAPI_RET_CREATE_OK   201
 HTTP 201 Created return code.
 
#define YANGAPI_RET_BAD_METHOD   405
 HTTP 405 Method Not Allowed return code.
 

Enumerations

enum  yangapi_method_t {
  YANGAPI_METHOD_NONE ,
  YANGAPI_METHOD_OPTIONS ,
  YANGAPI_METHOD_HEAD ,
  YANGAPI_METHOD_GET ,
  YANGAPI_METHOD_POST ,
  YANGAPI_METHOD_PUT ,
  YANGAPI_METHOD_PATCH ,
  YANGAPI_METHOD_DELETE
}
 HTTP methods used by YANG-API and RESTCONF. More...
 
enum  yangapi_launchpt_t {
  YANGAPI_LAUNCHPT_NONE ,
  YANGAPI_LAUNCHPT_TOP ,
  YANGAPI_LAUNCHPT_DATASTORE ,
  YANGAPI_LAUNCHPT_DATA ,
  YANGAPI_LAUNCHPT_NEW_DATA ,
  YANGAPI_LAUNCHPT_MODULES ,
  YANGAPI_LAUNCHPT_MODULE ,
  YANGAPI_LAUNCHPT_OPERATIONS ,
  YANGAPI_LAUNCHPT_OPERATION ,
  YANGAPI_LAUNCHPT_YANG ,
  YANGAPI_LAUNCHPT_YANG_PLAIN ,
  YANGAPI_LAUNCHPT_VERSION ,
  YANGAPI_LAUNCHPT_STREAMS ,
  YANGAPI_LAUNCHPT_STREAM ,
  YANGAPI_LAUNCHPT_EVENTS ,
  YANGAPI_LAUNCHPT_YANGLIB_VERSION ,
  YANGAPI_LAUNCHPT_ACTION
}
 describes the type of node indicated by the RequestURI path Used internally in the server to process the target resource URI More...
 
enum  restconf_content_t {
  RESTCONF_CONTENT_NONE ,
  RESTCONF_CONTENT_CONFIG ,
  RESTCONF_CONTENT_NONCONFIG ,
  RESTCONF_CONTENT_ALL
}
 RESTCONF content query param enumeration. More...
 
enum  restconf_qparam_t {
}
 RESTCONF query param enumeration. More...
 

Functions

yangapi_param_tyangapi_new_param (const xmlChar *parmname, uint32 parmnamelen, const xmlChar *parmval, uint32 parmvallen)
 Create a new YANGAPI paramater. More...
 
void yangapi_free_param (yangapi_param_t *param)
 Free a YANG-API parameter. More...
 
yangapi_accept_tyangapi_new_accept (const xmlChar *mediatype, uint32 media_type_len, const xmlChar *submediatype, uint32 submediatype_len, const xmlChar *acc_format, uint32 acc_format_len, const xmlChar *qvalue, uint32 qvalue_len)
 Create a new YANGAPI paramater. More...
 
void yangapi_free_accept (yangapi_accept_t *accept_entry)
 Free a YANGAPI accept header entries. More...
 
void yangapi_clean_keyvalQ (yangapi_cb_t *rcb)
 Clean the key value Q in a request control block. More...
 
void yangapi_clean_getnext_listQ (yangapi_cb_t *rcb, ses_cb_t *scb)
 Free all the snmp getnext list entries. More...
 
void yangapi_clean_target_keyvalQ (yangapi_cb_t *rcb)
 Free all the snmp target keyval entries. More...
 
yangapi_cb_tyangapi_new_rcb (void)
 Create a new YANG-API control block. More...
 
void yangapi_free_rcb (yangapi_cb_t *rcb)
 Free a YANGAPI control block. More...
 
void yangapi_clean_rcb (yangapi_cb_t *rcb)
 Clean a YANGAPI/RESTCONF control block. More...
 
const xmlChar * yangapi_get_method_name (yangapi_method_t method_enum)
 Get the method name from its enum. More...
 
uint8 yangapi_cvt_method_coap (yangapi_method_t method_enum)
 Get the libcoap numeric value for the HTTP method enum. More...
 
restconf_content_t yangapi_get_content_enum (const xmlChar *content)
 Get the enum for the content query parameter from the query URI part. More...
 
const xmlChar * yangapi_get_content_name (restconf_content_t content)
 Get the keyword for the specified restconf_content_t enumeration. More...
 
restconf_qparam_t yangapi_get_restconf_qparam_enum (const xmlChar *param)
 Get the enum for a query parameter from the query URI part. More...
 

Detailed Description

YANG-API definitions (pre-RESTCONF)