⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 resolver.3

📁 Unix操作系统minix 2.0源码
💻 3
📖 第 1 页 / 共 2 页
字号:
2109(dot\).)S2346(This)S2550(option)S2831(is)S2923(enabled)S3261(by)S3386(default.)S3456 V1080(RES_DNSRCH)S3576 V1440(If)S1536(this)S1709(option)S1993(is)S2088(set,)S10 I2253(res_search)S10 R(will)157 2722 A2908(search)S3195(for)S3342(host)S3538(names)S3824(in)S3931(the)S4083(current)S4398(domain)S4728(and)S4902(in)S5009(parent)S3696 V1440(domains;)S1868(see)S10 I2057(hostname)S10 R2450(\(7\).)S2678(This)S2917(is)S3044(used)S3288(by)S3448(the)S3630(standard)S4030(host)S(lookup)278 4256 A4593(routine)S10 I4937(gethost-)S3816 V1440(byname)S10 R1761(\(3\).)S1954(This)S2158(option)S2439(is)S2531(enabled)S2869(by)S2994(default.)S3984 V1080(The)S10 I1279(res_init)S10 R1628(routine)S1955(reads)S2210(the)S2375(con\256guration)S2953(\256le)S3124(\(if)S3263(any;)S3479(see)S10 I3651(resolver)S10 R3989(\(5\)\))S4184(to)S4305(get)S4471(the)S4637(default)S4960(domain)S4104 V1080(name,)S1358(search)S1651(list)S1809(and)S1989(the)S2147(Internet)S2496(address)S2833(of)S2952(the)S3110(local)S3341(name)S3593(server\(s\).)S4031(If)S4133(no)S4267(server)S4548(is)S4649(con\256gured,)S5138(the)S4224 V1080(host)S(running)312 1274 A1613(the)S1763(resolver)S2115(is)S2209(tried.)S2472(The)S2657(current)S2971(domain)S3300(name)S3546(is)S3641(de\256ned)S3965(by)S4093(the)S4244(hostname)S4657(if)S4747(not)S4903(speci\256ed)S4344 V1080(in)S1189(the)S1343(con\256guration)S1910(\256le;)S2098(it)S2185(can)S2356(be)S2482(overridden)S2949(by)S3080(the)S3233(environment)S3771(variable)S4126(LOCALDOMAIN.)S(Initiali-)303 4958 A4464 V1080(zation)S1351(normally)S1739(occurs)S2027(on)S2152(the)S2300(\256rst)S2482(call)S2653(to)S2756(one)S2926(of)S3035(the)S3183(following)S3599(routines.)S4632 V1080(The)S10 I(res_query)402 1275 A10 R1715(function)S2088(provides)S2472(an)S(interface)354 2605 A2997(to)S3113(the)S3274(server)S3560(query)S3828(mechanism.)S4375(It)S4476(constructs)S4923(a)S5007(query,)S4752 V1080(sends)S1335(it)S1423(to)S1533(the)S1688(local)S1916(server,)S2220(awaits)S2510(a)S(response,)377 2587 A2996(and)S3173(makes)S3462(preliminary)S3964(checks)S4270(on)S4402(the)S4556(reply.)S4844(The)S5032(query)S4872 V1080(requests)S1456(information)S1977(of)S2107(the)S2276(speci\256ed)S10 I2680(type)S10 R2894(and)S10 I3085(class)S10 R3332(for)S3497(the)S3667(speci\256ed)S4072(fully-quali\256ed)S4695(domain)S5043(name)S4992 V10 I(dname)268 1080 A1373(.)S10 R1423(The)S1605(reply)S1837(message)S2203(is)S2295(left)S2455(in)S2558(the)S10 I2706(answer)S10 R3021(buffer)S3293(with)S3497(length)S10 I3773(anslen)S10 R(supplied)340 4060 A4425(by)S4550(the)S4698(caller.)S5160 V1080(The)S10 I1268(res_search)S10 R1740(routine)S2056(makes)S2344(a)S2420(query)S2680(and)S2856(awaits)S3145(a)S(response)352 3221 A3604(like)S10 I(res_query)402 3787 A10 R4197(,)S4254(but)S4414(in)S(addition,)354 4524 A4910(it)S4998(imple-)S5280 V1080(ments)S1346(the)S1495(default)S1801(and)S1972(search)S2256(rules)S2478(controlled)S2912(by)S3038(the)S3186(RES_DEFNAMES)S3990(and)S4160(RES_DNSRCH)S4829(options.)S5199(It)S5400 V1080(returns)S1385(the)S1533(\256rst)S(successful)414 1715 A2154(reply.)S5568 V1080(The)S1274(remaining)S1719(routines)S2080(are)S2241(lower-level)S2738(routines)S3099(used)S3320(by)S10 I(res_query)402 3458 A10 R3868(.)S3956(The)S10 I4151(res_mkquery)S10 R4709(function)S5082(con-)S5688 V1080(structs)S1370(a)S1442(standard)S1810(query)S2066(message)S2434(and)S(places)252 2606 A2885(it)S2968(in)S10 I3073(buf)S10 R3209(.)S3286(It)S3375(returns)S3681(the)S3830(size)S4013(of)S4123(the)S4272(query,)S4552(or)S10 R-14662(-)S10 R4719(1)S4795(if)S4883(the)S5032(query)S5808 V1080(is)S1176(larger)S1441(than)S10 I(bu\257en)245 1643 A10 R1896(.)S1975(The)S2161(query)S2419(type)S10 I2621(op)S10 R2750(is)S2846(usually)S3166(QUERY,)S3569(but)S3727(can)S3897(be)S4022(any)S4197(of)S4311(the)S4464(query)S4723(types)S4965(de\256ned)S5928 V1080(in)S10 I1188(<arpa/nameser.h>)S10 R1965(.)S2045(The)S2232(domain)S2563(name)S2811(for)S2959(the)S3112(query)S3370(is)S3466(given)S3718(by)S10 I(dname)268 3847 A10 R4123(.)S10 I4202(Newrr)S10 R4488(is)S4584(currently)S(unused)284 4977 A6048 V1080(but)S1233(is)S1325(intended)S1696(for)S1839(making)S(update)268 2165 A2458(messages.)S6216 V1080(The)S10 I1286(res_send)S10 R1692(routine)S2026(sends)S2298(a)S2392(pre-formatted)S2996(query)S3274(and)S3468(returns)S3797(an)S3941(answer.)S4327(It)S(will)157 4439 A4646(call)S10 I4842(res_init)S10 R5199(if)S6336 V1080(RES_INIT)S1555(is)S1659(not)S1824(set,)S1998(send)S2219(the)S2379(query)S2645(to)S2760(the)S2920(local)S3153(name)S3408(server,)S3717(and)S3898(handle)S4202(timeouts)S4584(and)S4765(retries.)S5104(The)S6456 V1080(length)S1356(of)S1465(the)S1613(reply)S1845(message)S2211(is)S2303(returned,)S2689(or)S10 R-12798(-)S10 R2855(1)S2930(if)S3017(there)S3244(were)S3466(errors.)S6624 V1080(The)S10 I(dn_comp)368 1266 A10 R1663(function)S2027(compresses)S2520(the)S2672(domain)S3002(name)S10 I(exp_dn)290 3249 A10 R3568(and)S3742(stores)S4006(it)S4091(in)S10 I(comp_dn)368 4198 A10 R4574(.)S4653(The)S4839(size)S5025(of)S5138(the)S6744 V1080(compressed)S1582(name)S1827(is)S1921(returned)S2284(or)S10 R-12395(-)S10 R2452(1)S2529(if)S2618(there)S2847(were)S3071(errors.)S3384(The)S3567(size)S3750(of)S3860(the)S4009(array)S4243(pointed)S4570(to)S4674(by)S10 I(comp_dn)368 4800 A10 R5194(is)S6864 V1080(given)S1331(by)S10 I1459(length)S10 R1718(.)S1796(The)S1981(compression)S2517(uses)S2718(an)S2841(array)S3077(of)S3190(pointers)S10 I(dnptrs)256 3543 A10 R3828(to)S3935(previously-compressed)S4897(names)S5183(in)S6984 V1080(the)S1234(current)S1551(message.)S1973(The)S2161(\256rst)S2349(pointer)S2665(points)S2941(to)S3050(to)S3159(the)S3313(beginning)S3745(of)S3860(the)S4014(message)S4386(and)S4562(the)S4715(list)S4868(ends)S5082(with)S7104 V1080(NULL.)S1430(The)S1617(limit)S1837(to)S1945(the)S2098(array)S2336(is)S2434(speci\256ed)S2823(by)S10 I(lastdnptr)362 2954 A10 R3324(.)S3405(A)S3509(side)S3702(effect)S3964(of)S10 I(dn_comp)368 4079 A10 R4478(is)S4576(to)S(update)268 4685 A4984(the)S5138(list)S7224 V1080(of)S1197(pointers)S1554(for)S1705(labels)S1973(inserted)S2325(into)S2514(the)S2670(message)S3044(as)S3161(the)S3317(name)S3568(is)S3668(compressed.)S4226(If)S10 I(dnptr)217 4327 A10 R4577(is)S4677(NULL,)S5004(names)S7344 V1080(are)S1229(not)S1382(compressed.)S1932(If)S10 I(lastdnptr)362 2025 A10 R2412(is)S2504(NULL,)S2824(the)S2972(list)S3120(of)S3229(labels)S3489(is)S3581(not)S(updated.)343 3734 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%%Page: 3 3BP/slant 0 def/height 0 def480 V10 R720(RESOLVER)S1250(\()S1292(3)S1350(\))S2696(Eighth)S(Edition)296 2989 A4597(RESOLVER)S5127(\()S5169(3)S5227(\))S960 V1080(The)S10 I(dn_expand)440 1281 A10 R1765(entry)S2016(expands)S2389(the)S2556(compressed)S3075(domain)S3421(name)S10 I(comp_dn)368 3684 A10 R4097(to)S4220(a)S4310(full)S4495(domain)S4841(name)S5104(The)S1080 V1080(compressed)S1592(name)S1847(is)S1950(contained)S2377(in)S2491(a)S2572(query)S2837(or)S2957(reply)S3200(message;)S10 I3605(msg)S10 R3803(is)S3906(a)S3987(pointer)S4308(to)S4422(the)S4581(beginning)S5018(of)S5138(the)S1200 V1080(message.)S1500(The)S1686(uncompressed)S2290(name)S2537(is)S(placed)263 2633 A2925(in)S3032(the)S3184(buffer)S3460(indicated)S3858(by)S10 I(exp_dn)290 3987 A10 R4306(which)S4581(is)S4677(of)S4790(size)S10 I4977(length)S10 R5236(.)S1320 V1080(The)S1262(size)S1444(of)S1553(compressed)S2053(name)S2296(is)S2388(returned)S2749(or)S10 R-12858(-)S10 R2915(1)S2990(if)S3077(there)S3304(was)S3486(an)S3606(error.)S1488 V9 R720(F)S722(FI)S774(IL)S807(LE)S865(ES)S923(S)S1608 V10 R1080(/etc/resolv.conf)S1800(see)S1954(resolver\(5\))S1776 V9 R720(S)S722(SE)S774(EE)S832(E)S913(A)S915(AL)S983(LS)S1041(SO)S1093(O)S1896 V10 R(gethostbyname\(3\),)751 1080 A1856(named\(8\),)S2292(resolver\(5\),)S2785(hostname\(7\),)S2016 V(RFC1032,)415 1080 A(RFC1033,)415 1520 A(RFC1034,)415 1960 A(RFC1035,)415 2400 A(RFC974,)365 2840 A2136 V1080(SMM:11)S1467(Name)S1733(Server)S2022(Operations)S2489(Guide)S2760(for)S2903(BIND)S7903 V720(Page)S941(3)S2669(\()S2711(June)S2920(23,)S(1990)200 3070 A3278(\))S4455(September)S4911(13,)S(1996)200 5061 A8143 VEP%%Trailer%%DocumentFonts: Times-Roman Times-Bold Times-Italic%%Pages: 3

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -