Next: , Up: Server types   [Contents][Index]


5.2.11.1 Macros for setting up a new server type

When specifying a server type you also need to define configuration items for it. These items refer to addresses in the example configuration of the server type. These macros can be used to define such items.

Macro: SVZ_REGISTER_INT (name, item, defaultable)

Register a simple integer. C-type: int. The given name specifies the symbolic name of the integer and item the integer itself (not its address). The defaultable argument can be either SVZ_ITEM_DEFAULTABLE or SVZ_ITEM_NOTDEFAULTABLE.

Macro: SVZ_REGISTER_BOOL (name, item, defaultable)

Register a boolean value. C-type: int.

Macro: SVZ_REGISTER_INTARRAY (name, item, defaultable)

Register an array of integers. C-type: svz_array_t *.

Macro: SVZ_REGISTER_STR (name, item, defaultable)

Register a simple character string. C-type: char *.

Macro: SVZ_REGISTER_STRARRAY (name, item, defaultable)

Register a string array. C-type: svz_array_t *.

Macro: SVZ_REGISTER_HASH (name, item, defaultable)

Register a hash table associating strings with strings only. C-type: svz_hash_t *.

Macro: SVZ_REGISTER_PORTCFG (name, item, defaultable)

Register a port configuration. C-type: svz_portcfg_t *.

Macro: SVZ_REGISTER_END ()

Indicate the end of the list of configuration items. It is the only mandatory item you need to specify in an example server type configuration.

Macro: SVZ_CONFIG_DEFINE (description, config, prototypes)

Expand to a data structure that properly associates the example configuration config with the name description and its configuration items prototypes, for use within a server type definition.


Next: General server type functionality, Up: Server types   [Contents][Index]