1 RESOLVER(3) BSD Library Functions Manual RESOLVER(3)
4 r
\bre
\bes
\bs_
\b_n
\bni
\bin
\bni
\bit
\bt, r
\bre
\bes
\bs_
\b_o
\bou
\bur
\brs
\bse
\ber
\brv
\bve
\ber
\br_
\b_p
\bp, f
\bfp
\bp_
\b_r
\bre
\bes
\bss
\bst
\bta
\bat
\bt, r
\bre
\bes
\bs_
\b_h
\bho
\bos
\bst
\bta
\bal
\bli
\bia
\bas
\bs, r
\bre
\bes
\bs_
\b_p
\bpq
\bqu
\bue
\ber
\bry
\by,
5 r
\bre
\bes
\bs_
\b_n
\bnq
\bqu
\bue
\ber
\bry
\by, r
\bre
\bes
\bs_
\b_n
\bns
\bse
\bea
\bar
\brc
\bch
\bh, r
\bre
\bes
\bs_
\b_n
\bnq
\bqu
\bue
\ber
\bry
\byd
\bdo
\bom
\bma
\bai
\bin
\bn, r
\bre
\bes
\bs_
\b_n
\bnm
\bmk
\bkq
\bqu
\bue
\ber
\bry
\by, r
\bre
\bes
\bs_
\b_n
\bns
\bse
\ben
\bnd
\bd,
6 r
\bre
\bes
\bs_
\b_n
\bnu
\bup
\bpd
\bda
\bat
\bte
\be, r
\bre
\bes
\bs_
\b_n
\bnm
\bmk
\bku
\bup
\bpd
\bda
\bat
\bte
\be, r
\bre
\bes
\bs_
\b_n
\bnc
\bcl
\blo
\bos
\bse
\be, r
\bre
\bes
\bs_
\b_n
\bns
\bse
\ben
\bnd
\bds
\bsi
\big
\bgn
\bne
\bed
\bd, r
\bre
\bes
\bs_
\b_f
\bfi
\bin
\bnd
\bdz
\bzo
\bon
\bne
\bec
\bcu
\but
\bt,
7 r
\bre
\bes
\bs_
\b_g
\bge
\bet
\bts
\bse
\ber
\brv
\bve
\ber
\brs
\bs, r
\bre
\bes
\bs_
\b_s
\bse
\bet
\bts
\bse
\ber
\brv
\bve
\ber
\brs
\bs, r
\bre
\bes
\bs_
\b_n
\bnd
\bde
\bes
\bst
\btr
\bro
\boy
\by, d
\bdn
\bn_
\b_c
\bco
\bom
\bmp
\bp, d
\bdn
\bn_
\b_e
\bex
\bxp
\bpa
\ban
\bnd
\bd,
8 h
\bhs
\bst
\btr
\bre
\ber
\brr
\bro
\bor
\br, r
\bre
\bes
\bs_
\b_i
\bin
\bni
\bit
\bt, r
\bre
\bes
\bs_
\b_i
\bis
\bso
\bou
\bur
\brs
\bse
\ber
\brv
\bve
\ber
\br, f
\bfp
\bp_
\b_n
\bnq
\bqu
\bue
\ber
\bry
\by, p
\bp_
\b_q
\bqu
\bue
\ber
\bry
\by, h
\bho
\bos
\bst
\bta
\bal
\bli
\bia
\bas
\bs,
9 r
\bre
\bes
\bs_
\b_q
\bqu
\bue
\ber
\bry
\by, r
\bre
\bes
\bs_
\b_s
\bse
\bea
\bar
\brc
\bch
\bh, r
\bre
\bes
\bs_
\b_q
\bqu
\bue
\ber
\bry
\byd
\bdo
\bom
\bma
\bai
\bin
\bn, r
\bre
\bes
\bs_
\b_m
\bmk
\bkq
\bqu
\bue
\ber
\bry
\by, r
\bre
\bes
\bs_
\b_s
\bse
\ben
\bnd
\bd,
10 r
\bre
\bes
\bs_
\b_u
\bup
\bpd
\bda
\bat
\bte
\be, r
\bre
\bes
\bs_
\b_c
\bcl
\blo
\bos
\bse
\be, h
\bhe
\ber
\brr
\bro
\bor
\br - resolver routines
12 S
\bSY
\bYN
\bNO
\bOP
\bPS
\bSI
\bIS
\bS
13 #
\b#i
\bin
\bnc
\bcl
\blu
\bud
\bde
\be <
\b<s
\bsy
\bys
\bs/
\b/t
\bty
\byp
\bpe
\bes
\bs.
\b.h
\bh>
\b>
14 #
\b#i
\bin
\bnc
\bcl
\blu
\bud
\bde
\be <
\b<n
\bne
\bet
\bti
\bin
\bne
\bet
\bt/
\b/i
\bin
\bn.
\b.h
\bh>
\b>
15 #
\b#i
\bin
\bnc
\bcl
\blu
\bud
\bde
\be <
\b<a
\bar
\brp
\bpa
\ba/
\b/n
\bna
\bam
\bme
\bes
\bse
\ber
\br.
\b.h
\bh>
\b>
16 #
\b#i
\bin
\bnc
\bcl
\blu
\bud
\bde
\be <
\b<r
\bre
\bes
\bso
\bol
\blv
\bv.
\b.h
\bh>
\b>
17 #
\b#i
\bin
\bnc
\bcl
\blu
\bud
\bde
\be <
\b<r
\bre
\bes
\bs_
\b_u
\bup
\bpd
\bda
\bat
\bte
\be.
\b.h
\bh>
\b>
19 _
\bt_
\by_
\bp_
\be_
\bd_
\be_
\bf _
\bs_
\bt_
\br_
\bu_
\bc_
\bt _
\b__
\b__
\br_
\be_
\bs_
\b__
\bs_
\bt_
\ba_
\bt_
\be _
\b*_
\br_
\be_
\bs_
\b__
\bs_
\bt_
\ba_
\bt_
\be;
22 r
\bre
\bes
\bs_
\b_n
\bni
\bin
\bni
\bit
\bt(_
\br_
\be_
\bs_
\b__
\bs_
\bt_
\ba_
\bt_
\be _
\bs_
\bt_
\ba_
\bt_
\bp);
25 r
\bre
\bes
\bs_
\b_o
\bou
\bur
\brs
\bse
\ber
\brv
\bve
\ber
\br_
\b_p
\bp(_
\bc_
\bo_
\bn_
\bs_
\bt _
\br_
\be_
\bs_
\b__
\bs_
\bt_
\ba_
\bt_
\be _
\bs_
\bt_
\ba_
\bt_
\bp, _
\bc_
\bo_
\bn_
\bs_
\bt _
\bs_
\bt_
\br_
\bu_
\bc_
\bt _
\bs_
\bo_
\bc_
\bk_
\ba_
\bd_
\bd_
\br_
\b__
\bi_
\bn _
\b*_
\ba_
\bd_
\bd_
\br);
28 f
\bfp
\bp_
\b_r
\bre
\bes
\bss
\bst
\bta
\bat
\bt(_
\bc_
\bo_
\bn_
\bs_
\bt _
\br_
\be_
\bs_
\b__
\bs_
\bt_
\ba_
\bt_
\be _
\bs_
\bt_
\ba_
\bt_
\bp, _
\bF_
\bI_
\bL_
\bE _
\b*_
\bf_
\bp);
30 _
\bc_
\bo_
\bn_
\bs_
\bt _
\bc_
\bh_
\ba_
\br _
\b*
31 r
\bre
\bes
\bs_
\b_h
\bho
\bos
\bst
\bta
\bal
\bli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ty
\byp
\bpe
\bes
\bs.
\b.h
\bh>
\b>
101 #
\b#i
\bin
\bnc
\bcl
\blu
\bud
\bde
\be <
\b<n
\bne
\bet
\bti
\bin
\bne
\bet
\bt/
\b/i
\bin
\bn.
\b.h
\bh>
\b>
102 #
\b#i
\bin
\bnc
\bcl
\blu
\bud
\bde
\be <
\b<a
\bar
\brp
\bpa
\ba/
\b/n
\bna
\bam
\bme
\bes
\bse
\ber
\br.
\b.h
\bh>
\b>
103 #
\b#i
\bin
\bnc
\bcl
\blu
\bud
\bde
\be <
\b<r
\bre
\bes
\bso
\bol
\blv
\bv.
\b.h
\bh>
\b>
104 #
\b#i
\bin
\bnc
\bcl
\blu
\bud
\bde
\be <
\b<r
\bre
\bes
\bs_
\b_u
\bup
\bpd
\bda
\bat
\bte
\be.
\b.h
\bh>
\b>
107 r
\bre
\bes
\bs_
\b_i
\bin
\bni
\bit
\bt(_
\bv_
\bo_
\bi_
\bd);
110 r
\bre
\bes
\bs_
\b_i
\bis
\bso
\bou
\bur
\brs
\bse
\ber
\brv
\bve
\ber
\br(_
\bc_
\bo_
\bn_
\bs_
\bt _
\bs_
\bt_
\br_
\bu_
\bc_
\bt _
\bs_
\bo_
\bc_
\bk_
\ba_
\bd_
\bd_
\br_
\b__
\bi_
\bn _
\b*_
\ba_
\bd_
\bd_
\br);
113 f
\bfp
\bp_
\b_n
\bnq
\bqu
\bue
\ber
\bry
\by(_
\bc_
\bo_
\bn_
\bs_
\bt _
\bu_
\b__
\bc_
\bh_
\ba_
\br _
\b*_
\bm_
\bs_
\bg, _
\bi_
\bn_
\bt _
\bm_
\bs_
\bg_
\bl_
\be_
\bn, _
\bF_
\bI_
\bL_
\bE _
\b*_
\bf_
\bp);
116 p
\bp_
\b_q
\bqu
\bue
\ber
\bry
\by(_
\bc_
\bo_
\bn_
\bs_
\bt _
\bu_
\b__
\bc_
\bh_
\ba_
\br _
\b*_
\bm_
\bs_
\bg, _
\bF_
\bI_
\bL_
\bE _
\b*_
\bf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
\be_
\bc _
\b*_
\br_
\br_
\be_
\bc_
\bp_
\b__
\bi_
\bn);
145 r
\bre
\bes
\bs_
\b_c
\bcl
\blo
\bos
\bse
\be(_
\bv_
\bo_
\bi_
\bd);
148 h
\bhe
\ber
\brr
\bro
\bor
\br(_
\bc_
\bo_
\bn_
\bs_
\bt _
\bc_
\bh_
\ba_
\br _
\b*_
\bs);
150 D
\bDE
\bES
\bSC
\bCR
\bRI
\bIP
\bPT
\bTI
\bIO
\bON
\bN
151 These routines are used for making, sending and interpreting query and
152 reply messages with Internet domain name servers.
154 State information is kept in _
\bs_
\bt_
\ba_
\bt_
\bp and is used to control the behavior of
155 these functions. _
\bs_
\bt_
\ba_
\bt_
\bp should be set to all zeros prior to the first
156 call to any of these functions.
158 The functions r
\bre
\bes
\bs_
\b_i
\bin
\bni
\bit
\bt(), r
\bre
\bes
\bs_
\b_i
\bis
\bso
\bou
\bur
\brs
\bse
\ber
\brv
\bve
\ber
\br(), f
\bfp
\bp_
\b_n
\bnq
\bqu
\bue
\ber
\bry
\by(), p
\bp_
\b_q
\bqu
\bue
\ber
\bry
\by(),
159 h
\bho
\bos
\bst
\bta
\bal
\bli
\bia
\bas
\bs(), r
\bre
\bes
\bs_
\b_q
\bqu
\bue
\ber
\bry
\by(), r
\bre
\bes
\bs_
\b_s
\bse
\bea
\bar
\brc
\bch
\bh(), r
\bre
\bes
\bs_
\b_q
\bqu
\bue
\ber
\bry
\byd
\bdo
\bom
\bma
\bai
\bin
\bn(), r
\bre
\bes
\bs_
\b_m
\bmk
\bkq
\bqu
\bue
\ber
\bry
\by(),
160 r
\bre
\bes
\bs_
\b_s
\bse
\ben
\bnd
\bd(), r
\bre
\bes
\bs_
\b_u
\bup
\bpd
\bda
\bat
\bte
\be(), r
\bre
\bes
\bs_
\b_c
\bcl
\blo
\bos
\bse
\be() and h
\bhe
\ber
\brr
\bro
\bor
\br() are deprecated and are
161 supplied for compatability with old source code. They use global config‐
162 uration and state information that is kept in the structure _
\b__
\br_
\be_
\bs rather
163 than that referenced through _
\bs_
\bt_
\ba_
\bt_
\bp.
165 Most of the values in _
\bs_
\bt_
\ba_
\bt_
\bp and _
\b__
\br_
\be_
\bs are initialized on the first call to
166 r
\bre
\bes
\bs_
\b_n
\bni
\bin
\bni
\bit
\bt() / r
\bre
\bes
\bs_
\b_i
\bin
\bni
\bit
\bt() to reasonable defaults and can be ignored.
167 Options stored in _
\bs_
\bt_
\ba_
\bt_
\bp_
\b-_
\b>_
\bo_
\bp_
\bt_
\bi_
\bo_
\bn_
\bs / _
\b__
\br_
\be_
\bs_
\b._
\bo_
\bp_
\bt_
\bi_
\bo_
\bn_
\bs are defined in _
\br_
\be_
\bs_
\bo_
\bl_
\bv_
\b._
\bh
168 and are as follows. Options are stored as a simple bit mask containing
169 the bitwise “OR” of the options enabled.
172 True if the initial name server address and default domain name
173 are initialized (i.e., r
\bre
\bes
\bs_
\b_n
\bni
\bin
\bni
\bit
\bt() / r
\bre
\bes
\bs_
\b_i
\bin
\bni
\bit
\bt() has been
177 Print debugging messages.
180 Accept authoritative answers only. Should continue until it
181 finds an authoritative answer or finds an error. Currently this
185 Use TCP connections for queries instead of UDP datagrams.
188 Used with RES_USEVC to keep the TCP connection open between
189 queries. This is useful only in programs that regularly do many
190 queries. UDP should be the normal mode used.
193 Ignore truncation errors, i.e., don’t retry with TCP.
196 Set the recursion-desired bit in queries. This is the default.
197 (r
\bre
\bes
\bs_
\b_n
\bns
\bse
\ben
\bnd
\bd() / r
\bre
\bes
\bs_
\b_s
\bse
\ben
\bnd
\bd() does not do iterative queries and
198 expects the name server to handle recursion.)
201 If set, r
\bre
\bes
\bs_
\b_n
\bns
\bse
\bea
\bar
\brc
\bch
\bh() / r
\bre
\bes
\bs_
\b_s
\bse
\bea
\bar
\brc
\bch
\bh() will append the default
202 domain name to single-component names (those that do not contain
203 a dot). This option is enabled by default.
206 If this option is set, r
\bre
\bes
\bs_
\b_n
\bns
\bse
\bea
\bar
\brc
\bch
\bh() / r
\bre
\bes
\bs_
\b_s
\bse
\bea
\bar
\brc
\bch
\bh() will search
207 for host names in the current domain and in parent domains; see
208 hostname(7). This is used by the standard host lookup routine
209 gethostbyname(3). This option is enabled by default.
212 This option turns off the user level aliasing feature controlled
213 by the HOSTALIASES environment variable. Network daemons should
217 This option causes gethostbyname(3) to look for AAAA records
218 before looking for A records if none are found.
221 This options causes the r
\bre
\bes
\bs_
\b_n
\bns
\bse
\ben
\bnd
\bd() / r
\bre
\bes
\bs_
\b_s
\bse
\ben
\bnd
\bd() to rotate the
222 list of nameservers in _
\bs_
\bt_
\ba_
\bt_
\bp_
\b-_
\b>_
\bn_
\bs_
\ba_
\bd_
\bd_
\br_
\b__
\bl_
\bi_
\bs_
\bt / _
\b__
\br_
\be_
\bs_
\b._
\bn_
\bs_
\ba_
\bd_
\bd_
\br_
\b__
\bl_
\bi_
\bs_
\bt.
225 This option causes r
\bre
\bes
\bs_
\b_n
\bns
\bse
\ben
\bnd
\bds
\bsi
\big
\bgn
\bne
\bed
\bd() to leave the message
226 unchanged after TSIG verification; otherwise the TSIG record
227 would be removed and the header updated.
230 This option causes r
\bre
\bes
\bs_
\b_n
\bns
\bse
\bea
\bar
\brc
\bch
\bh() to not attempt to resolve a
231 unqualified name as if it were a top level domain (TLD). This
232 option can cause problems if the site has "localhost" as a TLD
233 rather than having localhost on one or more elements of the
234 search list. This option has no effect if neither RES_DEFNAMES
235 or RES_DNSRCH is set.
237 The r
\bre
\bes
\bs_
\b_n
\bni
\bin
\bni
\bit
\bt() / r
\bre
\bes
\bs_
\b_i
\bin
\bni
\bit
\bt() routine reads the configuration file (if
238 any; see resolver(5)) to get the default domain name, search list and the
239 Internet address of the local name server(s). If no server is config‐
240 ured, the host running the resolver is tried. The current domain name is
241 defined by the hostname if not specified in the configuration file; it
242 can be overridden by the environment variable LOCALDOMAIN. This environ‐
243 ment variable may contain several blank-separated tokens if you wish to
244 override the “search list” on a per-process basis. This is similar to
245 the s
\bse
\bea
\bar
\brc
\bch
\bh command in the configuration file. Another environment vari‐
246 able (“RES_OPTIONS”) can be set to override certain internal resolver
247 options which are otherwise set by changing fields in the _
\bs_
\bt_
\ba_
\bt_
\bp / _
\b__
\br_
\be_
\bs
248 structure or are inherited from the configuration file’s o
\bop
\bpt
\bti
\bio
\bon
\bns
\bs command.
249 The syntax of the “RES_OPTIONS” environment variable is explained in
250 resolver(5). Initialization normally occurs on the first call to one of
251 the other resolver routines.
253 The memory referred to by _
\bs_
\bt_
\ba_
\bt_
\bp must be set to all zeros prior to the
254 first call to r
\bre
\bes
\bs_
\b_n
\bni
\bin
\bni
\bit
\bt(). r
\bre
\bes
\bs_
\b_n
\bnd
\bde
\bes
\bst
\btr
\bro
\boy
\by() should be call to free memory
255 allocated by r
\bre
\bes
\bs_
\b_n
\bni
\bin
\bni
\bit
\bt() after last use.
257 The r
\bre
\bes
\bs_
\b_n
\bnq
\bqu
\bue
\ber
\bry
\by() / r
\bre
\bes
\bs_
\b_q
\bqu
\bue
\ber
\bry
\by() functions provides interfaces to the
258 server query mechanism. They constructs a query, sends it to the local
259 server, awaits a response, and makes preliminary checks on the reply.
260 The query requests information of the specified _
\bt_
\by_
\bp_
\be and _
\bc_
\bl_
\ba_
\bs_
\bs for the
261 specified fully-qualified domain name _
\bd_
\bn_
\ba_
\bm_
\be. The reply message is left
262 in the _
\ba_
\bn_
\bs_
\bw_
\be_
\br buffer with length _
\ba_
\bn_
\bs_
\bl_
\be_
\bn supplied by the caller.
263 r
\bre
\bes
\bs_
\b_n
\bnq
\bqu
\bue
\ber
\bry
\by() / r
\bre
\bes
\bs_
\b_q
\bqu
\bue
\ber
\bry
\by() return -1 on error or the length of the
266 The r
\bre
\bes
\bs_
\b_n
\bns
\bse
\bea
\bar
\brc
\bch
\bh() / r
\bre
\bes
\bs_
\b_s
\bse
\bea
\bar
\brc
\bch
\bh() routines make a query and awaits a
267 response like r
\bre
\bes
\bs_
\b_n
\bnq
\bqu
\bue
\ber
\bry
\by() / r
\bre
\bes
\bs_
\b_q
\bqu
\bue
\ber
\bry
\by(), but in addition, it implements
268 the default and search rules controlled by the RES_DEFNAMES and
269 RES_DNSRCH options. It returns the length of the first successful reply
270 which is stored in _
\ba_
\bn_
\bs_
\bw_
\be_
\br or -1 on error.
272 The remaining routines are lower-level routines used by r
\bre
\bes
\bs_
\b_n
\bnq
\bqu
\bue
\ber
\bry
\by() /
273 r
\bre
\bes
\bs_
\b_q
\bqu
\bue
\ber
\bry
\by(). The r
\bre
\bes
\bs_
\b_n
\bnm
\bmk
\bkq
\bqu
\bue
\ber
\bry
\by() / r
\bre
\bes
\bs_
\b_m
\bmk
\bkq
\bqu
\bue
\ber
\bry
\by() functions constructs a
274 standard query message and places it in _
\bb_
\bu_
\bf. It returns the size of the
275 query, or -1 if the query is larger than _
\bb_
\bu_
\bf_
\bl_
\be_
\bn. The query type _
\bo_
\bp is
276 usually QUERY, but can be any of the query types defined in
277 _
\b<_
\ba_
\br_
\bp_
\ba_
\b/_
\bn_
\ba_
\bm_
\be_
\bs_
\be_
\br_
\b._
\bh_
\b>. The domain name for the query is given by _
\bd_
\bn_
\ba_
\bm_
\be.
278 _
\bN_
\be_
\bw_
\br_
\br is currently unused but is intended for making update messages.
280 The r
\bre
\bes
\bs_
\b_n
\bns
\bse
\ben
\bnd
\bd() / r
\bre
\bes
\bs_
\b_s
\bse
\ben
\bnd
\bd() / r
\bre
\bes
\bs_
\b_n
\bns
\bse
\ben
\bnd
\bds
\bsi
\big
\bgn
\bne
\bed
\bd() routines sends a pre-
281 formatted query and returns an answer. It will call r
\bre
\bes
\bs_
\b_n
\bni
\bin
\bni
\bit
\bt() /
282 r
\bre
\bes
\bs_
\b_i
\bin
\bni
\bit
\bt() if RES_INIT is not set, send the query to the local name
283 server, and handle timeouts and retries. Additionally, r
\bre
\bes
\bs_
\b_n
\bns
\bse
\ben
\bnd
\bds
\bsi
\big
\bgn
\bne
\bed
\bd()
284 will use TSIG signatures to add authentication to the query and verify
285 the response. In this case, only one nameserver will be contacted. The
286 length of the reply message is returned, or -1 if there were errors.
288 r
\bre
\bes
\bs_
\b_n
\bnq
\bqu
\bue
\ber
\bry
\by() / r
\bre
\bes
\bs_
\b_q
\bqu
\bue
\ber
\bry
\by(), r
\bre
\bes
\bs_
\b_n
\bns
\bse
\bea
\bar
\brc
\bch
\bh() / r
\bre
\bes
\bs_
\b_s
\bse
\bea
\bar
\brc
\bch
\bh() and r
\bre
\bes
\bs_
\b_n
\bns
\bse
\ben
\bnd
\bd()
289 / r
\bre
\bes
\bs_
\b_s
\bse
\ben
\bnd
\bd() return a length that may be bigger than _
\ba_
\bn_
\bs_
\bl_
\be_
\bn. In that
290 case the query should be retried with a bigger buffer. NOTE the answer
291 to the second query may be larger still so supplying a buffer that bigger
292 that the answer returned by the previous query is recommended.
294 _
\ba_
\bn_
\bs_
\bw_
\be_
\br MUST be big enough to receive a maximum UDP response from the
295 server or parts of the answer will be silently discarded. The default
296 maximum UDP response size is 512 bytes.
298 The function r
\bre
\bes
\bs_
\b_o
\bou
\bur
\brs
\bse
\ber
\brv
\bve
\ber
\br_
\b_p
\bp() returns true when _
\bi_
\bn_
\bp is one of the
299 servers in _
\bs_
\bt_
\ba_
\bt_
\bp_
\b-_
\b>_
\bn_
\bs_
\ba_
\bd_
\bd_
\br_
\b__
\bl_
\bi_
\bs_
\bt / _
\b__
\br_
\be_
\bs_
\b._
\bn_
\bs_
\ba_
\bd_
\bd_
\br_
\b__
\bl_
\bi_
\bs_
\bt.
301 The functions f
\bfp
\bp_
\b_n
\bnq
\bqu
\bue
\ber
\bry
\by() / p
\bp_
\b_q
\bqu
\bue
\ber
\bry
\by() print out the query and any answer
302 in _
\bm_
\bs_
\bg on _
\bf_
\bp. p
\bp_
\b_q
\bqu
\bue
\ber
\bry
\by() is equivalent to f
\bfp
\bp_
\b_n
\bnq
\bqu
\bue
\ber
\bry
\by() with _
\bm_
\bs_
\bg_
\bl_
\be_
\bn set to
305 The function f
\bfp
\bp_
\b_r
\bre
\bes
\bss
\bst
\bta
\bat
\bt() prints out the active flag bits in
306 _
\bs_
\bt_
\ba_
\bt_
\bp_
\b-_
\b>_
\bo_
\bp_
\bt_
\bi_
\bo_
\bn_
\bs preceeded by the text ";; res options:" on _
\bf_
\bi_
\bl_
\be.
308 The functions r
\bre
\bes
\bs_
\b_h
\bho
\bos
\bst
\bta
\bal
\bli
\bia
\bas
\bs() / h
\bho
\bos
\bst
\bta
\bal
\bli
\bia
\bas
\bs() lookup up name in the file
309 referred to by the HOSTALIASES files return a fully qualified hostname if
310 found or NULL if not found or an error occurred. r
\bre
\bes
\bs_
\b_h
\bho
\bos
\bst
\bta
\bal
\bli
\bia
\bas
\bs() uses
311 _
\bb_
\bu_
\bf to store the result in, h
\bho
\bos
\bst
\bta
\bal
\bli
\bia
\bas
\bs() uses a static buffer.
313 The functions r
\bre
\bes
\bs_
\b_g
\bge
\bet
\bts
\bse
\ber
\brv
\bve
\ber
\brs
\bs() and r
\bre
\bes
\bs_
\b_s
\bse
\bet
\bts
\bse
\ber
\brv
\bve
\ber
\brs
\bs() are used to get and
314 set the list of server to be queried.
316 The functions r
\bre
\bes
\bs_
\b_n
\bnu
\bup
\bpd
\bda
\bat
\bte
\be() / r
\bre
\bes
\bs_
\b_u
\bup
\bpd
\bda
\bat
\bte
\be() take a list of ns_updrec
317 _
\br_
\br_
\be_
\bc_
\bp_
\b__
\bi_
\bn. Identifies the containing zone for each record and groups the
318 records according to containing zone maintaining in zone order then sends
319 and update request to the servers for these zones. The number of zones
320 updated is returned or -1 on error. Note that r
\bre
\bes
\bs_
\b_n
\bnu
\bup
\bpd
\bda
\bat
\bte
\be() will perform
321 TSIG authenticated dynamic update operations if the key is not NULL.
323 The function r
\bre
\bes
\bs_
\b_f
\bfi
\bin
\bnd
\bdz
\bzo
\bon
\bne
\bec
\bcu
\but
\bt() discovers the closest enclosing zone cut
324 for a specified domain name, and finds the IP addresses of the zone’s
327 The functions r
\bre
\bes
\bs_
\b_n
\bnm
\bmk
\bku
\bup
\bpd
\bda
\bat
\bte
\be() / r
\bre
\bes
\bs_
\b_m
\bmk
\bku
\bup
\bpd
\bda
\bat
\bte
\be() take a linked list of
328 ns_updrec _
\br_
\br_
\be_
\bc_
\bp_
\b__
\bi_
\bn and construct a UPDATE message in _
\bb_
\bu_
\bf.
329 r
\bre
\bes
\bs_
\b_n
\bnm
\bmk
\bku
\bup
\bpd
\bda
\bat
\bte
\be() / r
\bre
\bes
\bs_
\b_m
\bmk
\bku
\bup
\bpd
\bda
\bat
\bte
\be() return the length of the constructed
330 message on no error or one of the following error values.
332 -1 An error occurred parsing _
\br_
\br_
\be_
\bc_
\bp_
\b__
\bi_
\bn.
334 -2 The buffer _
\bb_
\bu_
\bf was too small.
336 -3 The first record was not a zone section or there was a section order
337 problem. The section order is S_ZONE, S_PREREQ and S_UPDATE.
339 -4 A number overflow occurred.
341 -5 Unknown operation or no records.
343 The functions r
\bre
\bes
\bs_
\b_n
\bnc
\bcl
\blo
\bos
\bse
\be() / r
\bre
\bes
\bs_
\b_c
\bcl
\blo
\bos
\bse
\be() close any open files referenced
344 through _
\bs_
\bt_
\ba_
\bt_
\bp / _
\b__
\br_
\be_
\bs.
346 The function r
\bre
\bes
\bs_
\b_n
\bnd
\bde
\bes
\bst
\btr
\bro
\boy
\by() calls r
\bre
\bes
\bs_
\b_n
\bnc
\bcl
\blo
\bos
\bse
\be() then frees any memory
347 allocated by r
\bre
\bes
\bs_
\b_n
\bni
\bin
\bni
\bit
\bt().
349 The d
\bdn
\bn_
\b_c
\bco
\bom
\bmp
\bp() function compresses the domain name _
\be_
\bx_
\bp_
\b__
\bd_
\bn and stores it in
350 _
\bc_
\bo_
\bm_
\bp_
\b__
\bd_
\bn. The size of the compressed name is returned or -1 if there were
351 errors. The size of the array pointed to by _
\bc_
\bo_
\bm_
\bp_
\b__
\bd_
\bn is given by _
\bl_
\be_
\bn_
\bg_
\bt_
\bh.
352 The compression uses an array of pointers _
\bd_
\bn_
\bp_
\bt_
\br_
\bs to previously-compressed
353 names in the current message. The first pointer points to to the begin‐
354 ning of the message and the list ends with NULL. The limit to the array
355 is specified by _
\bl_
\ba_
\bs_
\bt_
\bd_
\bn_
\bp_
\bt_
\br. A side effect of d
\bdn
\bn_
\b_c
\bco
\bom
\bmp
\bp() is to update the
356 list of pointers for labels inserted into the message as the name is com‐
357 pressed. If _
\bd_
\bn_
\bp_
\bt_
\br is NULL, names are not compressed. If _
\bl_
\ba_
\bs_
\bt_
\bd_
\bn_
\bp_
\bt_
\br is
358 NULL, the list of labels is not updated.
360 The d
\bdn
\bn_
\b_e
\bex
\bxp
\bpa
\ban
\bnd
\bd() entry expands the compressed domain name _
\bc_
\bo_
\bm_
\bp_
\b__
\bd_
\bn to a
361 full domain name. The compressed name is contained in a query or reply
362 message; _
\bm_
\bs_
\bg is a pointer to the beginning of the message. _
\be_
\bo_
\bm_
\bo_
\br_
\bi_
\bg is a
363 pointer to the first location after the message. The uncompressed name
364 is placed in the buffer indicated by _
\be_
\bx_
\bp_
\b__
\bd_
\bn which is of size _
\bl_
\be_
\bn_
\bg_
\bt_
\bh. The
365 size of compressed name is returned or -1 if there was an error.
367 The variables _
\bs_
\bt_
\ba_
\bt_
\bp_
\b-_
\b>_
\br_
\be_
\bs_
\b__
\bh_
\b__
\be_
\br_
\br_
\bn_
\bo / _
\b__
\br_
\be_
\bs_
\b._
\br_
\be_
\bs_
\b__
\bh_
\b__
\be_
\br_
\br_
\bn_
\bo and external variable
368 _
\bh_
\b__
\be_
\br_
\br_
\bn_
\bo is set whenever an error occurs during resolver operation. The
369 following definitions are given in _
\b<_
\bn_
\be_
\bt_
\bd_
\bb_
\b._
\bh_
\b>:
371 #define NETDB_INTERNAL -1 /* see errno */
372 #define NETDB_SUCCESS 0 /* no problem */
373 #define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */
374 #define TRY_AGAIN 2 /* Non-Authoritative not found, or SERVFAIL */
375 #define NO_RECOVERY 3 /* Non-Recoverable: FORMERR, REFUSED, NOTIMP */
376 #define NO_DATA 4 /* Valid name, no data for requested type */
378 The h
\bhe
\ber
\brr
\bro
\bor
\br() function writes a message to the diagnostic output consist‐
379 ing of the string parameter _
\bs, the constant string ": ", and a message
380 corresponding to the value of _
\bh_
\b__
\be_
\br_
\br_
\bn_
\bo.
382 The h
\bhs
\bst
\btr
\bre
\ber
\brr
\bro
\bor
\br() function returns a string which is the message text cor‐
383 responding to the value of the _
\be_
\br_
\br parameter.
386 /etc/resolv.conf See resolver(5).
388 S
\bSE
\bEE
\bE A
\bAL
\bLS
\bSO
\bO
389 gethostbyname(3), hostname(7), resolver(5); RFC1032, RFC1033, RFC1034,
390 RFC1035, RFC974; SMM:11, “Name Server Operations Guide for BIND”
392 4th Berkeley Distribution July 4, 2000 4th Berkeley Distribution