libnetconf  0.10.0-146_trunk
NETCONF Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
With-defaults capability

libnetconf's settings for NETCONF :with-defaults capability as defined in RFC 6243. More...

Macros

#define NCDFLT_DISABLE   ncdflt_set_basic_mode(NCWD_MODE_DISABLED)
 Disable support for the with-defaults capability. This can be done on either a client or a server. More...
 

Enumerations

enum  NCWD_MODE {
  NCWD_MODE_NOTSET = 0, NCWD_MODE_ALL = 1, NCWD_MODE_TRIM = 2, NCWD_MODE_EXPLICIT = 4,
  NCWD_MODE_ALL_TAGGED = 8, NCWD_MODE_IMPL_TAGGED = 16
}
 Enumeration of <with-defaults> element values. More...
 

Functions

NCWD_MODE ncdflt_get_basic_mode (void)
 Get the current set basic mode of the with-defaults capability. More...
 
NCWD_MODE ncdflt_get_supported (void)
 Get ORed value containing the currently supported with-defaults modes. More...
 
NCWD_MODE ncdflt_rpc_get_withdefaults (const nc_rpc *rpc)
 Get value of the <with-defaults> element from the rpc message. More...
 
void ncdflt_set_basic_mode (NCWD_MODE mode)
 Set the basic mode of the with-defaults capability for a NETCONF server. More...
 
void ncdflt_set_supported (NCWD_MODE modes)
 Set with-defaults modes that are supported. More...
 

Detailed Description

libnetconf's settings for NETCONF :with-defaults capability as defined in RFC 6243.

libnetconf's implementation of NETCONF with-defaults capability as defined in RFC 6243.

Macro Definition Documentation

#define NCDFLT_DISABLE   ncdflt_set_basic_mode(NCWD_MODE_DISABLED)

Disable support for the with-defaults capability. This can be done on either a client or a server.

This is an alternative for ncdflt_set_basic_mode(NCDFLT_MODE_DISABLED). To enable the with-defaults capability, use ncdflt_set_basic_mode() to set the with-defaults' basic mode.

Enumeration Type Documentation

enum NCWD_MODE

Enumeration of <with-defaults> element values.

Valid only with enabled :with-defaults capability

Enumerator
NCWD_MODE_NOTSET 

follow NETCONF defined default behavior (mode selected by server as its basic mode)

NCWD_MODE_ALL 

report-all mode (RFC 6243, sec. 3.1)

NCWD_MODE_TRIM 

trim mode (RFC 6243, sec. 3.2)

NCWD_MODE_EXPLICIT 

explicit mode (RFC 6243, sec. 3.3)

NCWD_MODE_ALL_TAGGED 

report-all-tagged mode (RFC 6243, sec. 3.4)

NCWD_MODE_IMPL_TAGGED 

non-standard mode, tags are added only to implicit default nodes

Function Documentation

NCWD_MODE ncdflt_get_basic_mode ( void  )

Get the current set basic mode of the with-defaults capability.

Returns
Current value of the with-defaults' basic mode.
NCWD_MODE ncdflt_get_supported ( void  )

Get ORed value containing the currently supported with-defaults modes.

Returns
ORed value containing the currently supported with-defaults modes.
NCWD_MODE ncdflt_rpc_get_withdefaults ( const nc_rpc rpc)

Get value of the <with-defaults> element from the rpc message.

Parameters
[in]rpcRPC message to be parsed.
Returns
with-defaults mode of the NETCONF rpc message.
void ncdflt_set_basic_mode ( NCWD_MODE  mode)

Set the basic mode of the with-defaults capability for a NETCONF server.

The default basic mode used by libnetconf is 'explicit'. This function should be used before establishing a NETCONF session to settle on a common set of capabilities between a client and a server.

On the client side, this function does not have any effect of setting up a specific mode. It only disables (NCDFLT_MODE_DISABLED) or enables (any other valid value) support for the with-defaults capability.

Parameters
[in]modeOne of the with-defaults capability basic modes, NCDFLT_MODE_ALL_TAGGED is not a basic mode and such value is ignored.
void ncdflt_set_supported ( NCWD_MODE  modes)

Set with-defaults modes that are supported.

This function should be used before establishing a NETCONF session to settle on a common set of capabilities between a client and a server. On the client side, this function has no effect.

Parameters
[in]modesORed set of the supported NCDFLT_MODE modes. The basic mode is always supported automatically.