79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
LC_VAR_BOOL_BY_EXISTANCE
This type of variable takes no arguments, it is set to true (1) by its existance in a configuration file, environment variable, or on the command line. If it is not specified, the value of the data passed is not changed. The data passed should be of type "int *".
.TP
LC_VAR_CIDR
This type of variable accepts a CIDR format netmask and IP. This is not yet implemented. (XXX)
.TP
LC_VAR_IP
This type of variable accepts an IP address in decimal-dot format. The value is stored in a uint32_t.
.TP
LC_VAR_ADDR
This type of variable accepts an address in either host or decimal-dot format. The value is stored in a uint32_t. This is not yet implemented. (XXX)
.SH "RETURN VALUE"
On success 0 is returned, otherwise -1 is returned.
.SH EXAMPLE
.nf
#include <libconfig.h>
|
|
>
>
>
|
|
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
LC_VAR_BOOL_BY_EXISTANCE
This type of variable takes no arguments, it is set to true (1) by its existance in a configuration file, environment variable, or on the command line. If it is not specified, the value of the data passed is not changed. The data passed should be of type "int *".
.TP
LC_VAR_CIDR
This type of variable accepts a CIDR format netmask and IP. This is not yet implemented. (XXX)
.TP
LC_VAR_IP
This type of variable accepts an IP address in decimal-dot format. The value is stored in a uint32_t in network byte order.
.TP
LC_VAR_HOSTNAME
This type of variable accepts an address in hostname format. The value is stored in a uint32_t in network byte order.
.TP
LC_VAR_ADDR
This type of variable accepts an address in either hostname or decimal-dot format. The value is stored in a uint32_t in network byte order.
.SH "RETURN VALUE"
On success 0 is returned, otherwise -1 is returned.
.SH EXAMPLE
.nf
#include <libconfig.h>
|