📄 g_h_b_n.3
字号:
4463(current)S4782(domain)S5116(and)S6384 V1080(its)S1205(parents)S1526(unless)S1807(the)S1960(name)S2208(ends)S2422(in)S2530(a)S2604(dot.)S2811(If)S2908(the)S3060(name)S3307(contains)S3671(no)S3800(dot,)S3982(and)S4156(if)S4247(the)S4399(environment)S4936(variable)S6504 V1080(``HOSTALAIASES'')S1998(contains)S2362(the)S2514(name)S2761(of)S2874(an)S2998(alias)S3212(\256le,)S3395(the)S3547(alias)S3762(\256le)S(will)157 3921 A4108(\256rst)S4295(be)S4420(searched)S4803(for)S4951(an)S5076(alias)S6624 V1080(matching)S1479(the)S(input)206 1627 A1858(name.)S2151(See)S10 I2322(hostname)S10 R2715(\(7\))S2858(for)S3001(the)S3149(domain)S3475(search)S3758(procedure)S4186(and)S4356(the)S4504(alias)S4714(\256le)S4868(format.)S6792 V10 I1080(Sethostent)S10 R1518(may)S1716(be)S1836(used)S2045(to)S2148(request)S2464(the)S2612(use)S2771(of)S2881(a)S(connected)408 2952 A3386(TCP)S3597(socket)S3880(for)S4024(queries.)S4391(If)S4485(the)S10 I4634(stayopen)S10 R5017(\257ag)S5194(is)S6912 V(non-zero,)383 1080 A1490(this)S1662(sets)S1840(the)S1990(option)S2273(to)S2378(send)S2589(all)S2717(queries)S3035(to)S3140(the)S3290(name)S3535(server)S3808(using)S4051(TCP)S4262(and)S4433(to)S4537(retain)S4793(the)S(connec-)319 4942 A7032 V1080(tion)S1268(after)S(each)185 1486 A1703(call)S1881(to)S10 I1991(gethostbyname)S10 R2626(or)S10 I(gethostbyaddr)574 2742 A10 R3324(.)S3406(Otherwise,)S3878(queries)S4201(are)S4357(performed)S4809(using)S5059(UDP)S7152 V1080(datagrams.)S7320 V10 I(Endhostent)452 1080 A10 R1557(closes)S1828(the)S1976(TCP)S(connection.)466 2186 A7903 V720(Page)S941(1)S2669(\()S2711(June)S2920(23,)S(1990)200 3070 A3278(\))S4455(September)S4911(13,)S(1996)200 5061 A8143 VEP%%Page: 2 2BP/slant 0 def/height 0 def480 V10 R(GETHOSTBYNAME)898 720 A1626(\()S1668(3)S1726(\))S2696(Eighth)S(Edition)296 2989 A(GETHOSTBYNAME)898 4221 A5127(\()S5169(3)S5227(\))S960 V9 R720(D)S722(DI)S790(IA)S823(AG)S891(GN)S959(NO)S1027(OS)S1095(ST)S1147(TI)S1205(IC)S1238(CS)S1300(S)S1080 V10 R1080(Error)S1322(return)S1591(status)S1848(from)S10 I2072(gethostbyname)S10 R2703(and)S10 I(gethostbyaddr)574 2876 A10 R3478(is)S3573(indicated)S3970(by)S4098(return)S4368(of)S4481(a)S4555(null)S4740(pointer.)S5104(The)S1200 V1080(external)S1432(integer)S10 I1739(h_errno)S10 R2089(may)S2289(then)S2489(be)S2610(checked)S2966(to)S3070(see)S3225(whether)S3576(this)S3747(is)S3840(a)S3911(temporary)S4351(failure)S4641(or)S4751(an)S4872(invalid)S5177(or)S1320 V(unknown)373 1080 A1485(host.)S1734(The)S1923(routine)S10 I2240(herror)S10 R2534(can)S2706(be)S2833(used)S3049(to)S3159(print)S3381(an)S3508(error)S3737(message)S4110(describing)S4562(the)S4718(failure.)S5065(If)S5166(its)S1440 V1080(argument)S10 I1498(string)S10 R1770(is)S(non-NULL,)479 1875 A2392(it)S2486(is)S2591(printed,)S2939(followed)S3334(by)S3471(a)S3553(colon)S3813(and)S3995(a)S(space.)249 4077 A4388(The)S4582(error)S4816(message)S5194(is)S1560 V1080(printed)S1390(with)S1594(a)S(trailing)291 1664 A1980(newline.)S1728 V10 I1080(h_errno)S10 R1428(can)S1593(have)S1808(the)S1956(following)S2372(values:)S1896 V(HOST_NOT_FOUND)920 1440 A2460(No)S2608(such)S2817(host)S3009(is)S(known.)298 3101 A2064 V(TRY_AGAIN)578 1440 A2460(This)S2669(is)S2766(usually)S3086(a)S3161(temporary)S3605(error)S3832(and)S4007(means)S4294(that)S4475(the)S4628(local)S4855(server)S5133(did)S2184 V2460(not)S(receive)292 2619 A2942(a)S(response)352 3018 A3401(from)S3628(an)S3754(authoritative)S4294(server.)S4622(A)S4725(retry)S4946(at)S5049(some)S2304 V2460(later)S2665(time)S2869(may)S(succeed.)344 3067 A2472 V1440(NO_RECOVERY)S2460(Some)S2736(unexpected)S3241(server)S3535(failure)S3847(was)S(encountered.)517 4052 A4642(This)S4869(is)S4984(a)S(non-)184 5077 A2592 V2460(recoverable)S2956(error.)S2760 V1440(NO_DATA)S2460(The)S2648(requested)S3066(name)S3316(is)S3415(valid)S3648(but)S3808(does)S4024(not)S4184(have)S4406(an)S4533(IP)S4655(address;)S5017(this)S5194(is)S2880 V2460(not)S2632(a)S2721(temporary)S3179(error.)S3445(This)S3668(means)S3969(that)S4164(the)S4330(name)S4591(is)S(known)273 4701 A5017(to)S5138(the)S3000 V2460(name)S2733(server)S3035(but)S3218(there)S3475(is)S3598(no)S3754(address)S4112(associated)S4582(with)S4817(this)S5018(name.)S3120 V2460(Another)S2825(type)S3033(of)S3151(request)S3476(to)S3588(the)S3745(name)S3997(server)S4278(using)S4529(this)S4708(domain)S5043(name)S3240 V(will)157 2460 A2669(result)S2945(in)S3075(an)S3222(answer;)S3588(for)S3758(example,)S4177(a)S4275(mail-forwarder)S4940(may)S5166(be)S3360 V2460(registered)S2883(for)S3026(this)S3196(domain.)S3528 V9 R720(F)S722(FI)S774(IL)S807(LE)S865(ES)S923(S)S3648 V10 R1080(/etc/hosts)S3816 V9 R720(S)S722(SE)S774(EE)S832(E)S913(A)S915(AL)S983(LS)S1041(SO)S1093(O)S3936 V10 R1080(resolver\(3\),)S1573(hosts\(5\),)S1947(hostname\(7\),)S2500(named\(8\))S4104 V9 R720(C)S722(CA)S784(AV)S852(VE)S920(EA)S978(AT)S1046(T)S4224 V10 I1080(Gethostent)S10 R1551(is)S1653(de\256ned,)S2009(and)S10 I2190(sethostent)S10 R2628(and)S10 I(endhostent)435 2809 A10 R3280(are)S3440(rede\256ned,)S3876(when)S10 I4130(libc)S10 R4317(is)S(built)184 4420 A4640(to)S4754(use)S4924(only)S5138(the)S4344 V1080(routines)S1429(to)S(lookup)278 1532 A1835(in)S10 I1938(/etc/hosts)S10 R2343(and)S2513(not)S2666(the)S2814(name)S3057(server.)S4512 V10 I1080(Gethostent)S10 R1541(reads)S1779(the)S1927(next)S2125(line)S2301(of)S10 I2410(/etc/hosts)S10 R2798(,)S2848(opening)S3196(the)S3344(\256le)S3498(if)S(necessary.)417 3585 A4680 V10 I1080(Sethostent)S10 R1519(is)S1612(rede\256ned)S2013(to)S2117(open)S2338(and)S2509(rewind)S2815(the)S2964(\256le.)S3170(If)S3265(the)S10 I3415(stayopen)S10 R3799(argument)S4206(is)S(non-zero,)383 4300 A4710(the)S4860(hosts)S5093(data)S4800 V1080(base)S(will)157 1291 A1480(not)S1640(be)S1767(closed)S2056(after)S(each)185 2274 A2491(call)S2669(to)S10 I2779(gethostbyname)S10 R3414(or)S10 I(gethostbyaddr)574 3530 A10 R4112(.)S10 I(Endhostent)452 4194 A10 R4678(is)S4777(rede\256ned)S5183(to)S4920 V1080(close)S1312(the)S1460(\256le.)S5088 V9 R720(B)S722(BU)S784(UG)S852(GS)S920(S)S5208 V10 R1080(All)S1239(information)S1744(is)S1841(contained)S2262(in)S2370(a)S2445(static)S2688(area)S2887(so)S3006(it)S3092(must)S3317(be)S3442(copied)S3740(if)S3832(it)S3918(is)S4016(to)S4125(be)S4251(saved.)S4561(Only)S4793(the)S4947(Internet)S5328 V1080(address)S1407(format)S1701(is)S1793(currently)S(understood.)471 2182 A7903 V720(September)S1176(13,)S(1996)200 1326 A2669(\()S2711(June)S2920(23,)S(1990)200 3070 A3278(\))S4990(Page)S5211(2)S8143 VEP%%Trailer%%DocumentFonts: Times-Roman Times-Bold Times-Italic%%Pages: 2
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -