libnetconf2  1.1.48
NETCONF library for clients and servers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
netconf.h File Reference

libnetconf2's general public functions and structures definitions. More...

#include <time.h>

Go to the source code of this file.

Macros

#define NC_NS_BASE   "urn:ietf:params:xml:ns:netconf:base:1.0"
 Base NETCONF namespace. More...
 
#define NC_NS_NOTIF   "urn:ietf:params:xml:ns:netconf:notification:1.0"
 Notifications namespace. More...
 
#define NC_PORT_SSH   830
 Default NETCONF over SSH port. More...
 
#define NC_PORT_CH_SSH   4334
 Default NETCONF over SSH Call Home port. More...
 
#define NC_PORT_TLS   6513
 Default NETCONF over TLS port. More...
 
#define NC_PORT_CH_TLS   4335
 Default NETCONF over TLS Call Home port. More...
 
#define nc_set_rpc_callback(node, cb)   lys_set_private(node, cb)
 Set RPC callback to a schema node. More...
 

Typedefs

typedef enum NC_SESSION_TERM_REASON NC_SESSION_TERM_REASON
 Enumeration of reasons of the NETCONF session termination as defined in RFC 6470. More...
 
typedef enum NC_MSG_TYPE NC_MSG_TYPE
 Enumeration of NETCONF message types. More...
 
typedef enum NC_DATASTORE_TYPE NC_DATASTORE
 Enumeration of the supported types of datastores defined by NETCONF. More...
 
typedef enum NC_WITHDEFAULTS_MODE NC_WD_MODE
 Enumeration of NETCONF with-defaults capability modes. More...
 
typedef enum NC_REPLY NC_RPL
 Enumeration of NETCONF (both server and client) rpc-reply types. More...
 
typedef enum NC_PARAMTYPE NC_PARAMTYPE
 Enumeration of function parameter treatments. More...
 

Enumerations

enum  NC_SESSION_TERM_REASON {
  NC_SESSION_TERM_ERR = -1, NC_SESSION_TERM_NONE = 0, NC_SESSION_TERM_CLOSED, NC_SESSION_TERM_KILLED,
  NC_SESSION_TERM_DROPPED, NC_SESSION_TERM_TIMEOUT, NC_SESSION_TERM_BADHELLO, NC_SESSION_TERM_OTHER
}
 Enumeration of reasons of the NETCONF session termination as defined in RFC 6470. More...
 
enum  NC_MSG_TYPE {
  NC_MSG_ERROR, NC_MSG_WOULDBLOCK, NC_MSG_NONE, NC_MSG_HELLO,
  NC_MSG_BAD_HELLO, NC_MSG_RPC, NC_MSG_REPLY, NC_MSG_REPLY_ERR_MSGID,
  NC_MSG_NOTIF
}
 Enumeration of NETCONF message types. More...
 
enum  NC_DATASTORE_TYPE {
  NC_DATASTORE_ERROR = 0, NC_DATASTORE_CONFIG, NC_DATASTORE_URL, NC_DATASTORE_RUNNING,
  NC_DATASTORE_STARTUP, NC_DATASTORE_CANDIDATE
}
 Enumeration of the supported types of datastores defined by NETCONF. More...
 
enum  NC_WITHDEFAULTS_MODE {
  NC_WD_UNKNOWN = 0, NC_WD_ALL, NC_WD_ALL_TAG, NC_WD_TRIM,
  NC_WD_EXPLICIT
}
 Enumeration of NETCONF with-defaults capability modes. More...
 
enum  NC_REPLY { NC_RPL_OK, NC_RPL_DATA, NC_RPL_ERROR, NC_RPL_NOTIF }
 Enumeration of NETCONF (both server and client) rpc-reply types. More...
 
enum  NC_PARAMTYPE { NC_PARAMTYPE_CONST, NC_PARAMTYPE_FREE, NC_PARAMTYPE_DUP_AND_FREE }
 Enumeration of function parameter treatments. More...
 

Functions

char * nc_time2datetime (time_t time, const char *tz, char *buf)
 Transform given time_t (seconds since the epoch) into the RFC 3339 format accepted by NETCONF functions. More...
 
time_t nc_datetime2time (const char *datetime)
 Transform given string in RFC 3339 compliant format to the time_t (seconds since the epoch) accepted by most Linux functions. More...
 

Variables

const char * nc_msgtype2str []
 Messages of NETCONF message type enum. More...
 

Detailed Description

libnetconf2's general public functions and structures definitions.

Author
Radek Krejci rkrej.nosp@m.ci@c.nosp@m.esnet.nosp@m..cz Copyright (c) 2015 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 netconf.h.