Environment variables

You can use environment variables to override default initialization of resolver functions.

Environment variables are only checked after a successful call to res_init() or res_ninit(). So if the structure has been manually initialized, environment variables are ignored. Also note that the structure is only initialized once so later changes to the environment variables are ignored.

Note: The name of the environment variable must be capitalized. The string value might be mixed case. Japanese systems using CCSID 290 should use uppercase characters and numbers only in both environment variables names and values. The list contains the descriptions of environment variables that can be used with the res_init() and res_ninit() APIs.

LOCALDOMAIN

Set this environment variable to a space-separated list of up to six search domains with a total of 256 characters (including spaces). This overrides the configured search list (struct state.defdname and struct state.dnsrch). If a search list is specified, the default local domain is not used on queries.

RES_OPTIONS

The RES_OPTIONS environment variable allows certain internal resolver variables to be modified. The environment variable can be set to one or more of the following space-separated options:

QIBM_BIND_RESOLVER_FLAGS

Set this environment variable to a space separated list of resolver option flags. This overrides the RES_DEFAULT options (struct state.options) and system configured values (Change TCP/IP Domain - CHGTCPDMN). The state options structure is initialized normally, using RES_DEFAULT, OPTIONS environment values and CHGTCPDMN configured values. Then this environment variable is used to override those defaults. The flags named in this environment variable might be prepended with a '+', '-' or 'NOT_' to set ('+') or reset ('-','NOT_') the value.

For example, to turn on RES_NOCHECKNAME and turn off RES_ROTATE, use the following command from a character-based interface:

 ADDENVVAR ENVVAR(QIBM_BIND_RESOLVER_FLAGS) VALUE('RES_NOCHECKNAME NOT_RES_ROTATE')

or

 ADDENVVAR ENVVAR(QIBM_BIND_RESOLVER_FLAGS) VALUE('+RES_NOCHECKNAME -RES_ROTATE')

QIBM_BIND_RESOLVER_SORTLIST

Set this environment variable to a space-separated list of up to ten IP addresses/mask pairs in dotted decimal format (9.5.9.0/255.255.255.0) to create a sort list (struct state.sort_list).

Related information
res_init()
res_ninit()
res_query()