---
name: "cfg_opt_t"
section: "3"
platform: "linux"
package: "libconfuse-doc"
version: "3.3-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/cfg_opt_t"
---

# cfg\_opt\_t(3)

Data structure holding information about an option.

## NAME

cfg\_opt\_t - Data structure holding information about an option.

## SYNOPSIS

`#include <confuse.h>`

### Data Fields

const char \* **name**\
 The name of the option.  char \* **comment**\
 Optional comment/annotation.  **cfg\_type\_t** **type**\
 Type of option.  unsigned int **nvalues**\
 Number of values parsed.  **cfg\_value\_t** \*\* **values**\
 Array of found values.  cfg\_flag\_t **flags**\
 Flags.  **cfg\_opt\_t** \* **subopts**\
 Suboptions (only applies to sections)  **cfg\_defvalue\_t** **def**\
 Default value.  **cfg\_func\_t** **func**\
 Function callback for CFGT\_FUNC options.  **cfg\_simple\_t** **simple\_value**\
 Pointer to user-specified variable to store simple values (created with the CFG\_SIMPLE\_\* initializers)  **cfg\_callback\_t** **parsecb**\
 Value parsing callback function.  **cfg\_validate\_callback\_t** **validcb**\
 Value validating parsing callback function.  **cfg\_validate\_callback2\_t** **validcb2**\
 Value validating set callback function.  **cfg\_print\_func\_t** **pf**\
 print callback function

## Detailed Description

Data structure holding information about an option.

The value(s) are stored as an array of fundamental values (strings, numbers, etc).

**Examples** **ftpconf.c**, **reread.c**, and **simple.c**.

## Author

Generated automatically by Doxygen for confuse from the source code.
