1 GETNAMEINFO(3) BSD Library Functions Manual GETNAMEINFO(3)
4 g
\bge
\bet
\btn
\bna
\bam
\bme
\bei
\bin
\bnf
\bfo
\bo - address-to-name translation in protocol-independent manner
6 S
\bSY
\bYN
\bNO
\bOP
\bPS
\bSI
\bIS
\bS
7 #
\b#i
\bin
\bnc
\bcl
\blu
\bud
\bde
\be <
\b<s
\bsy
\bys
\bs/
\b/s
\bso
\boc
\bck
\bke
\bet
\bt.
\b.h
\bh>
\b>
8 #
\b#i
\bin
\bnc
\bcl
\blu
\bud
\bde
\be <
\b<n
\bne
\bet
\btd
\bdb
\bb.
\b.h
\bh>
\b>
11 g
\bge
\bet
\btn
\bna
\bam
\bme
\bei
\bin
\bnf
\bfo
\bo(_
\bc_
\bo_
\bn_
\bs_
\bt _
\bs_
\bt_
\br_
\bu_
\bc_
\bt _
\bs_
\bo_
\bc_
\bk_
\ba_
\bd_
\bd_
\br _
\b*_
\bs_
\ba, _
\bs_
\bo_
\bc_
\bk_
\bl_
\be_
\bn_
\b__
\bt _
\bs_
\ba_
\bl_
\be_
\bn, _
\bc_
\bh_
\ba_
\br _
\b*_
\bh_
\bo_
\bs_
\bt,
12 _
\bs_
\bi_
\bz_
\be_
\b__
\bt _
\bh_
\bo_
\bs_
\bt_
\bl_
\be_
\bn, _
\bc_
\bh_
\ba_
\br _
\b*_
\bs_
\be_
\br_
\bv, _
\bs_
\bi_
\bz_
\be_
\b__
\bt _
\bs_
\be_
\br_
\bv_
\bl_
\be_
\bn, _
\bi_
\bn_
\bt _
\bf_
\bl_
\ba_
\bg_
\bs);
14 D
\bDE
\bES
\bSC
\bCR
\bRI
\bIP
\bPT
\bTI
\bIO
\bON
\bN
15 The g
\bge
\bet
\btn
\bna
\bam
\bme
\bei
\bin
\bnf
\bfo
\bo() function is defined for protocol-independent address-
16 to-nodename translation. It performs functionality of gethostbyaddr(3)
17 and getservbyport(3) in more sophisticated manner.
19 The _
\bs_
\ba arguement is a pointer to a generic socket address structure of
20 size _
\bs_
\ba_
\bl_
\be_
\bn. The arguements _
\bh_
\bo_
\bs_
\bt and _
\bs_
\be_
\br_
\bv are pointers to buffers to hold
21 the return values. Their sizes are specified by _
\bh_
\bo_
\bs_
\bt_
\bl_
\be_
\bn and _
\bs_
\be_
\br_
\bv_
\bl_
\be_
\bn
22 repectively. Either _
\bh_
\bo_
\bs_
\bt or _
\bs_
\be_
\br_
\bv may be NULL if the hostname or service
25 The _
\bf_
\bl_
\ba_
\bg_
\bs arguement modifies the behaviour of g
\bge
\bet
\btn
\bna
\bam
\bme
\bei
\bin
\bnf
\bfo
\bo() as follows:
27 If NI_NOFQDN is set only the unqualified hostname is returned for local
28 fully qualified names.
30 If NI_NUMERICHOST is set then the numeric form of the hostname is
33 If NI_NAMEREQD is set, then a error is returned if the hostname cannot be
36 If NI_NUMERICSERV is set then the service is returned in numeric form.
38 If NI_DGRAM is set then the service is UDP based rather than TCP based.
40 S
\bSE
\bEE
\bE A
\bAL
\bLS
\bSO
\bO
41 getaddrinfo(3), gethostbyaddr(3), getservbyport(3), hosts(5),
42 services(5), hostname(7),
44 R. Gilligan, S. Thomson, J. Bound, and W. Stevens, ‘‘Basic Socket Inter‐
45 face Extensions for IPv6,’’ RFC2133, April 1997.
47 S
\bST
\bTA
\bAN
\bND
\bDA
\bAR
\bRD
\bDS
\bS
48 The g
\bge
\bet
\bta
\bad
\bdd
\bdr
\bri
\bin
\bnf
\bfo
\bo() function is defined IEEE POSIX 1003.1g draft specifica‐
49 tion, and documented in ‘‘Basic Socket Interface Extensions for IPv6’’
52 BSD January 11, 1999 BSD