1bc7413d0SPeter Wemm.\" Copyright (c) 1985, 1991, 1993 2bc7413d0SPeter Wemm.\" The Regents of the University of California. All rights reserved. 3fdf4c7afSPeter Wemm.\" 4bc7413d0SPeter Wemm.\" Redistribution and use in source and binary forms, with or without 5bc7413d0SPeter Wemm.\" modification, are permitted provided that the following conditions 6bc7413d0SPeter Wemm.\" are met: 7bc7413d0SPeter Wemm.\" 1. Redistributions of source code must retain the above copyright 8bc7413d0SPeter Wemm.\" notice, this list of conditions and the following disclaimer. 9bc7413d0SPeter Wemm.\" 2. Redistributions in binary form must reproduce the above copyright 10bc7413d0SPeter Wemm.\" notice, this list of conditions and the following disclaimer in the 11bc7413d0SPeter Wemm.\" documentation and/or other materials provided with the distribution. 12bc7413d0SPeter Wemm.\" 3. All advertising materials mentioning features or use of this software 13bc7413d0SPeter Wemm.\" must display the following acknowledgement: 14bc7413d0SPeter Wemm.\" This product includes software developed by the University of 15bc7413d0SPeter Wemm.\" California, Berkeley and its contributors. 16bc7413d0SPeter Wemm.\" 4. Neither the name of the University nor the names of its contributors 17bc7413d0SPeter Wemm.\" may be used to endorse or promote products derived from this software 18bc7413d0SPeter Wemm.\" without specific prior written permission. 19fdf4c7afSPeter Wemm.\" 20bc7413d0SPeter Wemm.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21bc7413d0SPeter Wemm.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22bc7413d0SPeter Wemm.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23bc7413d0SPeter Wemm.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24bc7413d0SPeter Wemm.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25bc7413d0SPeter Wemm.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26bc7413d0SPeter Wemm.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27bc7413d0SPeter Wemm.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28bc7413d0SPeter Wemm.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29bc7413d0SPeter Wemm.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30bc7413d0SPeter Wemm.\" SUCH DAMAGE. 31fdf4c7afSPeter Wemm.\" 32bc7413d0SPeter Wemm.\" @(#)resolver.3 8.1 (Berkeley) 6/4/93 337f3dea24SPeter Wemm.\" $FreeBSD$ 34bc7413d0SPeter Wemm.\" 35bc7413d0SPeter Wemm.Dd June 4, 1993 36bc7413d0SPeter Wemm.Dt RESOLVER 3 37bc7413d0SPeter Wemm.Os BSD 4.3 38bc7413d0SPeter Wemm.Sh NAME 39bc7413d0SPeter Wemm.Nm res_query , 40bc7413d0SPeter Wemm.Nm res_search , 41bc7413d0SPeter Wemm.Nm res_mkquery , 42bc7413d0SPeter Wemm.Nm res_send , 43bc7413d0SPeter Wemm.Nm res_init , 44bc7413d0SPeter Wemm.Nm dn_comp , 45b5b2871fSAnton Berezin.Nm dn_expand , 46b5b2871fSAnton Berezin.Nm dn_skipname , 47b5b2871fSAnton Berezin.Nm ns_get16 , 48b5b2871fSAnton Berezin.Nm ns_get32 , 49b5b2871fSAnton Berezin.Nm ns_put16 , 50b5b2871fSAnton Berezin.Nm ns_put32 51bc7413d0SPeter Wemm.Nd resolver routines 5225bb73e0SAlexey Zelkin.Sh LIBRARY 5325bb73e0SAlexey Zelkin.Lb libc 54bc7413d0SPeter Wemm.Sh SYNOPSIS 55bc7413d0SPeter Wemm.Fd #include <sys/types.h> 56bc7413d0SPeter Wemm.Fd #include <netinet/in.h> 57bc7413d0SPeter Wemm.Fd #include <arpa/nameser.h> 58bc7413d0SPeter Wemm.Fd #include <resolv.h> 591eda21cbSBruce Evans.Ft int 60bc7413d0SPeter Wemm.Fo res_query 61c293d821SPeter Wemm.Fa "const char *dname" 62bc7413d0SPeter Wemm.Fa "int class" 63bc7413d0SPeter Wemm.Fa "int type" 64bc7413d0SPeter Wemm.Fa "u_char *answer" 65bc7413d0SPeter Wemm.Fa "int anslen" 66bc7413d0SPeter Wemm.Fc 671eda21cbSBruce Evans.Ft int 68bc7413d0SPeter Wemm.Fo res_search 69c293d821SPeter Wemm.Fa "const char *dname" 70bc7413d0SPeter Wemm.Fa "int class" 71bc7413d0SPeter Wemm.Fa "int type" 72bc7413d0SPeter Wemm.Fa "u_char *answer" 73bc7413d0SPeter Wemm.Fa "int anslen" 74bc7413d0SPeter Wemm.Fc 751eda21cbSBruce Evans.Ft int 76bc7413d0SPeter Wemm.Fo res_mkquery 77bc7413d0SPeter Wemm.Fa "int op" 78c293d821SPeter Wemm.Fa "const char *dname" 79bc7413d0SPeter Wemm.Fa "int class" 80bc7413d0SPeter Wemm.Fa "int type" 811eda21cbSBruce Evans.Fa "const u_char *data" 82bc7413d0SPeter Wemm.Fa "int datalen" 831eda21cbSBruce Evans.Fa "const u_char *newrr_in" 841eda21cbSBruce Evans.Fa "u_char *buf" 85bc7413d0SPeter Wemm.Fa "int buflen" 86bc7413d0SPeter Wemm.Fc 871eda21cbSBruce Evans.Ft int 88bc7413d0SPeter Wemm.Fo res_send 8990afb6a5SBruce Evans.Fa "const u_char *msg" 90bc7413d0SPeter Wemm.Fa "int msglen" 9190afb6a5SBruce Evans.Fa "u_char *answer" 92bc7413d0SPeter Wemm.Fa "int anslen" 93bc7413d0SPeter Wemm.Fc 941eda21cbSBruce Evans.Ft int 95bc7413d0SPeter Wemm.Fn res_init 96b5b2871fSAnton Berezin.Ft int 97bc7413d0SPeter Wemm.Fo dn_comp 98c293d821SPeter Wemm.Fa "const char *exp_dn" 9990afb6a5SBruce Evans.Fa "u_char *comp_dn" 100bc7413d0SPeter Wemm.Fa "int length" 10190afb6a5SBruce Evans.Fa "u_char **dnptrs" 10290afb6a5SBruce Evans.Fa "u_char **lastdnptr" 103bc7413d0SPeter Wemm.Fc 1041eda21cbSBruce Evans.Ft int 105bc7413d0SPeter Wemm.Fo dn_expand 106c293d821SPeter Wemm.Fa "const u_char *msg" 107c293d821SPeter Wemm.Fa "const u_char *eomorig" 108c293d821SPeter Wemm.Fa "const u_char *comp_dn" 1091eda21cbSBruce Evans.Fa "char *exp_dn" 110bc7413d0SPeter Wemm.Fa "int length" 111bc7413d0SPeter Wemm.Fc 112b5b2871fSAnton Berezin.Ft int 113b5b2871fSAnton Berezin.Fn dn_skipname "const u_char *comp_dn" "const u_char *eom" 114b5b2871fSAnton Berezin.Ft u_int 115b5b2871fSAnton Berezin.Fn ns_get16 "const u_char *src" 116b5b2871fSAnton Berezin.Ft u_long 117b5b2871fSAnton Berezin.Fn ns_get32 "const u_char *src" 118b5b2871fSAnton Berezin.Ft void 119b5b2871fSAnton Berezin.Fn ns_put16 "u_int src" "u_char *dst" 120b5b2871fSAnton Berezin.Ft void 121b5b2871fSAnton Berezin.Fn ns_put32 "u_long src" "u_char *dst" 122bc7413d0SPeter Wemm.Sh DESCRIPTION 123fdf4c7afSPeter WemmThese routines are used for making, sending and interpreting 124fdf4c7afSPeter Wemmquery and reply messages with Internet domain name servers. 125bc7413d0SPeter Wemm.Pp 126fdf4c7afSPeter WemmGlobal configuration and state information that is used by the 127fdf4c7afSPeter Wemmresolver routines is kept in the structure 128bc7413d0SPeter Wemm.Em _res . 129fdf4c7afSPeter WemmMost of the values have reasonable defaults and can be ignored. 130fdf4c7afSPeter WemmOptions 131fdf4c7afSPeter Wemmstored in 132bc7413d0SPeter Wemm.Em _res.options 133fdf4c7afSPeter Wemmare defined in 134bc7413d0SPeter Wemm.Pa resolv.h 135fdf4c7afSPeter Wemmand are as follows. 136fdf4c7afSPeter WemmOptions are stored as a simple bit mask containing the bitwise ``or'' 137fdf4c7afSPeter Wemmof the options enabled. 138ce6282dbSHajimu UMEMOTO.Bl -tag -width RES_USE_INET6 139bc7413d0SPeter Wemm.It Dv RES_INIT 140fdf4c7afSPeter WemmTrue if the initial name server address and default domain name are 141fdf4c7afSPeter Wemminitialized (i.e., 142bc7413d0SPeter Wemm.Fn res_init 143fdf4c7afSPeter Wemmhas been called). 144bc7413d0SPeter Wemm.It Dv RES_DEBUG 145fdf4c7afSPeter WemmPrint debugging messages. 146bc7413d0SPeter Wemm.It Dv RES_AAONLY 147fdf4c7afSPeter WemmAccept authoritative answers only. 148fdf4c7afSPeter WemmWith this option, 149bc7413d0SPeter Wemm.Fn res_send 150fdf4c7afSPeter Wemmshould continue until it finds an authoritative answer or finds an error. 151fdf4c7afSPeter WemmCurrently this is not implemented. 152bc7413d0SPeter Wemm.It Dv RES_USEVC 153bc7413d0SPeter WemmUse 154bc7413d0SPeter Wemm.Tn TCP 155bc7413d0SPeter Wemmconnections for queries instead of 156bc7413d0SPeter Wemm.Tn UDP 157bc7413d0SPeter Wemmdatagrams. 158bc7413d0SPeter Wemm.It Dv RES_STAYOPEN 159bc7413d0SPeter WemmUsed with 160bc7413d0SPeter Wemm.Dv RES_USEVC 161bc7413d0SPeter Wemmto keep the 162bc7413d0SPeter Wemm.Tn TCP 163bc7413d0SPeter Wemmconnection open between 164fdf4c7afSPeter Wemmqueries. 165fdf4c7afSPeter WemmThis is useful only in programs that regularly do many queries. 166bc7413d0SPeter Wemm.Tn UDP 167bc7413d0SPeter Wemmshould be the normal mode used. 168bc7413d0SPeter Wemm.It Dv RES_IGNTC 169bc7413d0SPeter WemmUnused currently (ignore truncation errors, i.e., don't retry with 170bc7413d0SPeter Wemm.Tn TCP ) . 171bc7413d0SPeter Wemm.It Dv RES_RECURSE 172fdf4c7afSPeter WemmSet the recursion-desired bit in queries. 173fdf4c7afSPeter WemmThis is the default. 174bc7413d0SPeter Wemm.Pf ( Fn res_send 175fdf4c7afSPeter Wemmdoes not do iterative queries and expects the name server 176fdf4c7afSPeter Wemmto handle recursion.) 177bc7413d0SPeter Wemm.It Dv RES_DEFNAMES 178fdf4c7afSPeter WemmIf set, 179bc7413d0SPeter Wemm.Fn res_search 180fdf4c7afSPeter Wemmwill append the default domain name to single-component names 181fdf4c7afSPeter Wemm(those that do not contain a dot). 182fdf4c7afSPeter WemmThis option is enabled by default. 183bc7413d0SPeter Wemm.It Dv RES_DNSRCH 184fdf4c7afSPeter WemmIf this option is set, 185bc7413d0SPeter Wemm.Fn res_search 186fdf4c7afSPeter Wemmwill search for host names in the current domain and in parent domains; see 187bc7413d0SPeter Wemm.Xr hostname 7 . 188fdf4c7afSPeter WemmThis is used by the standard host lookup routine 189bc7413d0SPeter Wemm.Xr gethostbyname 3 . 190fdf4c7afSPeter WemmThis option is enabled by default. 191c293d821SPeter Wemm.It Dv RES_NOALIASES 192c293d821SPeter WemmThis option turns off the user level aliasing feature controlled by the 193c293d821SPeter Wemm.Dq Ev HOSTALIASES 194c293d821SPeter Wemmenvironment variable. Network daemons should set this option. 195ce6282dbSHajimu UMEMOTO.It Dv RES_USE_INET6 196ce6282dbSHajimu UMEMOTOEnables support for IPv6-only applications. 197ce6282dbSHajimu UMEMOTOThis causes IPv4 addresses to be returned as an IPv4 mapped address. 198c155ff5cSRuslan ErmilovFor example, 199c155ff5cSRuslan Ermilov.Li 10.1.1.1 200c155ff5cSRuslan Ermilovwill be returned as 201c155ff5cSRuslan Ermilov.Li ::ffff:10.1.1.1 . 202ce6282dbSHajimu UMEMOTOThe option is meaningful with certain kernel configuration only. 203ce6282dbSHajimu UMEMOTO.It Dv RES_USE_EDNS0 204ce6282dbSHajimu UMEMOTOEnables support for OPT pseudo-RR for EDNS0 extension. 205ce6282dbSHajimu UMEMOTOWith the option, resolver code will attach OPT pseudo-RR into DNS queries, 206ce6282dbSHajimu UMEMOTOto inform of our receive buffer size. 207ce6282dbSHajimu UMEMOTOThe option will allow DNS servers to take advantage of non-default receive 208ce6282dbSHajimu UMEMOTObuffer size, and to send larger replies. 209ce6282dbSHajimu UMEMOTODNS query packets with EDNS0 extension is not compatible with 210ce6282dbSHajimu UMEMOTOnon-EDNS0 DNS servers. 211bc7413d0SPeter Wemm.El 212bc7413d0SPeter Wemm.Pp 213fdf4c7afSPeter WemmThe 214bc7413d0SPeter Wemm.Fn res_init 215fdf4c7afSPeter Wemmroutine 216fdf4c7afSPeter Wemmreads the configuration file (if any; see 217bc7413d0SPeter Wemm.Xr resolver 5 ) 218fdf4c7afSPeter Wemmto get the default domain name, 219fdf4c7afSPeter Wemmsearch list and 220fdf4c7afSPeter Wemmthe Internet address of the local name server(s). 221fdf4c7afSPeter WemmIf no server is configured, the host running 222fdf4c7afSPeter Wemmthe resolver is tried. 223fdf4c7afSPeter WemmThe current domain name is defined by the hostname 224fdf4c7afSPeter Wemmif not specified in the configuration file; 225bc7413d0SPeter Wemmit can be overridden by the environment variable 226bc7413d0SPeter Wemm.Ev LOCALDOMAIN . 227c293d821SPeter WemmThis environment variable may contain several blank-separated 228c293d821SPeter Wemmtokens if you wish to override the 229c293d821SPeter Wemm.Em "search list" 230c293d821SPeter Wemmon a per-process basis. This is similar to the 231c293d821SPeter Wemm.Em search 232c293d821SPeter Wemmcommand in the configuration file. 233c293d821SPeter WemmAnother environment variable ( 234c293d821SPeter Wemm.Dq Ev RES_OPTIONS 235c293d821SPeter Wemmcan be set to 236c293d821SPeter Wemmoverride certain internal resolver options which are otherwise 237c293d821SPeter Wemmset by changing fields in the 238c293d821SPeter Wemm.Em _res 239c293d821SPeter Wemmstructure or are inherited from the configuration file's 240c293d821SPeter Wemm.Em options 241c293d821SPeter Wemmcommand. The syntax of the 242c293d821SPeter Wemm.Dq Ev RES_OPTIONS 243c293d821SPeter Wemmenvironment variable is explained in 244c293d821SPeter Wemm.Xr resolver 5 . 245fdf4c7afSPeter WemmInitialization normally occurs on the first call 246bc7413d0SPeter Wemmto one of the following routines. 247bc7413d0SPeter Wemm.Pp 248fdf4c7afSPeter WemmThe 249bc7413d0SPeter Wemm.Fn res_query 250fdf4c7afSPeter Wemmfunction provides an interface to the server query mechanism. 251fdf4c7afSPeter WemmIt constructs a query, sends it to the local server, 252fdf4c7afSPeter Wemmawaits a response, and makes preliminary checks on the reply. 253fdf4c7afSPeter WemmThe query requests information of the specified 254bc7413d0SPeter Wemm.Fa type 255fdf4c7afSPeter Wemmand 256bc7413d0SPeter Wemm.Fa class 257fdf4c7afSPeter Wemmfor the specified fully-qualified domain name 258bc7413d0SPeter Wemm.Fa dname . 259fdf4c7afSPeter WemmThe reply message is left in the 260bc7413d0SPeter Wemm.Fa answer 261fdf4c7afSPeter Wemmbuffer with length 262bc7413d0SPeter Wemm.Fa anslen 263fdf4c7afSPeter Wemmsupplied by the caller. 264bc7413d0SPeter Wemm.Pp 265fdf4c7afSPeter WemmThe 266bc7413d0SPeter Wemm.Fn res_search 267fdf4c7afSPeter Wemmroutine makes a query and awaits a response like 268bc7413d0SPeter Wemm.Fn res_query , 269fdf4c7afSPeter Wemmbut in addition, it implements the default and search rules 270bc7413d0SPeter Wemmcontrolled by the 271bc7413d0SPeter Wemm.Dv RES_DEFNAMES 272bc7413d0SPeter Wemmand 273bc7413d0SPeter Wemm.Dv RES_DNSRCH 274bc7413d0SPeter Wemmoptions. 275fdf4c7afSPeter WemmIt returns the first successful reply. 276bc7413d0SPeter Wemm.Pp 277fdf4c7afSPeter WemmThe remaining routines are lower-level routines used by 278bc7413d0SPeter Wemm.Fn res_query . 279fdf4c7afSPeter WemmThe 280bc7413d0SPeter Wemm.Fn res_mkquery 281fdf4c7afSPeter Wemmfunction 282fdf4c7afSPeter Wemmconstructs a standard query message and places it in 283bc7413d0SPeter Wemm.Fa buf . 284fdf4c7afSPeter WemmIt returns the size of the query, or \-1 if the query is 285fdf4c7afSPeter Wemmlarger than 286bc7413d0SPeter Wemm.Fa buflen . 287fdf4c7afSPeter WemmThe query type 288bc7413d0SPeter Wemm.Fa op 289bc7413d0SPeter Wemmis usually 290bc7413d0SPeter Wemm.Dv QUERY , 291bc7413d0SPeter Wemmbut can be any of the query types defined in 292bc7413d0SPeter Wemm.Aq Pa arpa/nameser.h . 293fdf4c7afSPeter WemmThe domain name for the query is given by 294bc7413d0SPeter Wemm.Fa dname . 295bc7413d0SPeter Wemm.Fa Newrr 296fdf4c7afSPeter Wemmis currently unused but is intended for making update messages. 297bc7413d0SPeter Wemm.Pp 298fdf4c7afSPeter WemmThe 299bc7413d0SPeter Wemm.Fn res_send 300fdf4c7afSPeter Wemmroutine 301fdf4c7afSPeter Wemmsends a pre-formatted query and returns an answer. 302fdf4c7afSPeter WemmIt will call 303bc7413d0SPeter Wemm.Fn res_init 304bc7413d0SPeter Wemmif 305bc7413d0SPeter Wemm.Dv RES_INIT 306bc7413d0SPeter Wemmis not set, send the query to the local name server, and 307fdf4c7afSPeter Wemmhandle timeouts and retries. 308fdf4c7afSPeter WemmThe length of the reply message is returned, or 309fdf4c7afSPeter Wemm\-1 if there were errors. 310bc7413d0SPeter Wemm.Pp 311fdf4c7afSPeter WemmThe 312bc7413d0SPeter Wemm.Fn dn_comp 313fdf4c7afSPeter Wemmfunction 314fdf4c7afSPeter Wemmcompresses the domain name 315bc7413d0SPeter Wemm.Fa exp_dn 316fdf4c7afSPeter Wemmand stores it in 317bc7413d0SPeter Wemm.Fa comp_dn . 318fdf4c7afSPeter WemmThe size of the compressed name is returned or \-1 if there were errors. 319fdf4c7afSPeter WemmThe size of the array pointed to by 320bc7413d0SPeter Wemm.Fa comp_dn 321fdf4c7afSPeter Wemmis given by 322bc7413d0SPeter Wemm.Fa length . 323fdf4c7afSPeter WemmThe compression uses 324fdf4c7afSPeter Wemman array of pointers 325bc7413d0SPeter Wemm.Fa dnptrs 326fdf4c7afSPeter Wemmto previously-compressed names in the current message. 327fdf4c7afSPeter WemmThe first pointer points to 32843d1df33SAlexander Langerthe beginning of the message and the list ends with 329bc7413d0SPeter Wemm.Dv NULL . 330fdf4c7afSPeter WemmThe limit to the array is specified by 331bc7413d0SPeter Wemm.Fa lastdnptr . 332fdf4c7afSPeter WemmA side effect of 333bc7413d0SPeter Wemm.Fn dn_comp 334fdf4c7afSPeter Wemmis to update the list of pointers for 335fdf4c7afSPeter Wemmlabels inserted into the message 336fdf4c7afSPeter Wemmas the name is compressed. 337fdf4c7afSPeter WemmIf 338bc7413d0SPeter Wemm.Em dnptr 339bc7413d0SPeter Wemmis 340d0353b83SRuslan Ermilov.Dv NULL , 341d0353b83SRuslan Ermilovnames are not compressed. 342fdf4c7afSPeter WemmIf 343bc7413d0SPeter Wemm.Fa lastdnptr 344bc7413d0SPeter Wemmis 345bc7413d0SPeter Wemm.Dv NULL , 346bc7413d0SPeter Wemmthe list of labels is not updated. 347bc7413d0SPeter Wemm.Pp 348fdf4c7afSPeter WemmThe 349bc7413d0SPeter Wemm.Fn dn_expand 350fdf4c7afSPeter Wemmentry 351fdf4c7afSPeter Wemmexpands the compressed domain name 352bc7413d0SPeter Wemm.Fa comp_dn 353fdf4c7afSPeter Wemmto a full domain name 354fdf4c7afSPeter WemmThe compressed name is contained in a query or reply message; 355bc7413d0SPeter Wemm.Fa msg 356fdf4c7afSPeter Wemmis a pointer to the beginning of the message. 357fdf4c7afSPeter WemmThe uncompressed name is placed in the buffer indicated by 358bc7413d0SPeter Wemm.Fa exp_dn 359fdf4c7afSPeter Wemmwhich is of size 360bc7413d0SPeter Wemm.Fa length . 361fdf4c7afSPeter WemmThe size of compressed name is returned or \-1 if there was an error. 362b5b2871fSAnton Berezin.Pp 363b5b2871fSAnton BerezinThe 364b5b2871fSAnton Berezin.Fn dn_skipname 365b5b2871fSAnton Berezinfunction skips over a compressed domain name, which starts at a location 366b5b2871fSAnton Berezinpointed to by 367b5b2871fSAnton Berezin.Fa comp_dn . 368b5b2871fSAnton BerezinThe compressed name is contained in a query or reply message; 369b5b2871fSAnton Berezin.Fa eom 370b5b2871fSAnton Berezinis a pointer to the end of the message. 371b5b2871fSAnton BerezinThe size of compressed name is returned or \-1 if there was 372b5b2871fSAnton Berezinan error. 373b5b2871fSAnton Berezin.Pp 374b5b2871fSAnton BerezinThe 375b5b2871fSAnton Berezin.Fn ns_get16 376b5b2871fSAnton Berezinfunction gets a 16-bit quantity from a buffer pointed to by 377b5b2871fSAnton Berezin.Fa src . 378b5b2871fSAnton Berezin.Pp 379b5b2871fSAnton BerezinThe 380b5b2871fSAnton Berezin.Fn ns_get32 381b5b2871fSAnton Berezinfunction gets a 32-bit quantity from a buffer pointed to by 382b5b2871fSAnton Berezin.Fa src . 383b5b2871fSAnton Berezin.Pp 384b5b2871fSAnton BerezinThe 385b5b2871fSAnton Berezin.Fn ns_put16 386b5b2871fSAnton Berezinfunction puts a 16-bit quantity 387b5b2871fSAnton Berezin.Fa src 388b5b2871fSAnton Berezinto a buffer pointed to by 389b5b2871fSAnton Berezin.Fa dst . 390b5b2871fSAnton Berezin.Pp 391b5b2871fSAnton BerezinThe 392b5b2871fSAnton Berezin.Fn ns_put32 393b5b2871fSAnton Berezinfunction puts a 32-bit quantity 394b5b2871fSAnton Berezin.Fa src 395b5b2871fSAnton Berezinto a buffer pointed to by 396b5b2871fSAnton Berezin.Fa dst . 397bc7413d0SPeter Wemm.Sh FILES 39842635956SRuslan Ermilov.Bl -tag -width /etc/resolv.conf 39942635956SRuslan Ermilov.It Pa /etc/resolv.conf 40042635956SRuslan ErmilovThe configuration file, 401bc7413d0SPeter Wemmsee 402bc7413d0SPeter Wemm.Xr resolver 5 . 403bc7413d0SPeter Wemm.El 404bc7413d0SPeter Wemm.Sh SEE ALSO 405bc7413d0SPeter Wemm.Xr gethostbyname 3 , 406bc7413d0SPeter Wemm.Xr resolver 5 , 407bc7413d0SPeter Wemm.Xr hostname 7 , 40875141cc9SWolfram Schneider.Xr named 8 409bc7413d0SPeter Wemm.Pp 410bc7413d0SPeter Wemm.%T RFC1032 , 411bc7413d0SPeter Wemm.%T RFC1033 , 412bc7413d0SPeter Wemm.%T RFC1034 , 413bc7413d0SPeter Wemm.%T RFC1035 , 414bc7413d0SPeter Wemm.%T RFC974 415bc7413d0SPeter Wemm.Rs 416bc7413d0SPeter Wemm.%T "Name Server Operations Guide for BIND" 417bc7413d0SPeter Wemm.Re 418bc7413d0SPeter Wemm.Sh HISTORY 419fdf4c7afSPeter WemmThe 420bc7413d0SPeter Wemm.Nm 421bc7413d0SPeter Wemmfunction appeared in 422bc7413d0SPeter Wemm.Bx 4.3 . 423