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

📄 ip.4

📁 Unix操作系统minix 2.0源码
💻 4
📖 第 1 页 / 共 5 页
字号:
2496 V1080(impose)S1395(any)S1565(restrictions.)S2088(Every)S2354(channel)S2692(gets)S2879(a)S(copy)195 2949 A3169(of)S3278(an)S3398(incoming)S3802(packet.)S2664 V10 B1080(NWIO_LOC_MASK)S10 R2093(and)S10 B2341(NWIO_BROAD_MASK)S10 R3500(control)S3888(the)S4115(delivery)S4549(of)S4737(packets.)S5193(If)S2784 V10 B1080(NWIO_EN_LOC)S10 R1864(is)S1967(speci\256ed)S2361(then)S2570(packets)S2908(that)S3095(are)S(explicitly)380 3255 A3671(send)S3891(to)S4005(the)S4164(IP)S4290(server)S4573(are)S4733(delivered.)S5193(If)S2904 V10 B1080(NWIO_EN_BROAD)S10 R2000(is)S2093(speci\256ed)S2477(then)S2676(broadcast)S3088(packets)S3417(are)S3568(delivered.)S4020(Either)S4294(one)S4466(or)S4577(both)S4782(of)S4893(them)S5121(can)S3024 V1080(be)S1200(disabled)S1560(with)S10 B1764(NWIO_DI_LOC)S10 R2509(and)S10 B2679(NWIO_DI_BROAD)S10 R3545(.)S3192 V10 B1080(NWIO_REMSPEC)S10 R1939(can)S2105(be)S2226(used)S2436(to)S2540(restrict)S2847(communication)S3498(to)S3603(one)S3775(remote)S4082(host.)S4326(This)S4532(host)S4726(is)S4820(taken)S5065(from)S3312 V1080(the)S10 B1228(nwio_rem)S10 R1684(\256eld.)S1938(If)S2031(any)S2201(remote)S2506(host)S2698(is)S2790(to)S2893(be)S3013(allowed)S3357(then)S10 B(NWIO_REMANY)794 3555 A10 R4374(can)S4539(be)S4659(used.)S3480 V10 B1080(NWIO_PROTOSPEC)S10 R2108(restricts)S2500(communication)S3197(to)S3348(one)S3566(IP)S3729(protocol,)S4162(speci\256ed)S4593(in)S10 B4744(nwio_proto)S10 R5236(.)S3600 V10 B(NWIO_PROTOANY)917 1080 A10 R2022(allows)S2310(any)S2480(protocol)S2840(to)S2943(be)S3063(sent)S3250(or)S(received.)367 3359 A3768 V10 B1080(NWIO_HDR_O_SPEC)S10 R2135(speci\256es)S2537(all)S2693(IP)S2839(header)S3164(options)S3515(in)S3649(advance.)S4085(The)S4298(values)S4611(are)S4791(taken)S5065(from)S3888 V10 B1080(nwio_hdropt)S10 R1634(,)S10 B1688(nwio_tos)S10 R2068(,)S10 B2122(nwio_ttl)S10 R2475(,)S2528(and)S10 B2701(nwio_df)S10 R3048(.)S10 B3126(Nwio_hdropt)S10 R3725(speci\256es)S4100(the)S4251(IP)S4369(options)S4692(that)S(should)267 4871 A5166(be)S4008 V1080(present)S1396(in)S1499(an)S1619(outgoing)S2000(packet.)S10 B2338(Ip_hdropt_t)S10 R2889(is)S2981(de\256ned)S3302(in)S3405(<net/gen/in.h>:)S4176 V10 C(typedef)427 1440 A(struct)366 1928 A(ip_hdropt)549 2355 A4296 V1440({)S4416 V(u8_t)244 1928 A(iho_opt_siz;)732 2233 A4536 V(u8_t)244 1928 A(iho_data[IP_MAX_HDR_SIZE-IP_MIN_HDR_SIZE];)2562 2233 A4656 V1440(})S(ip_hdropt_t;)732 1562 A4824 V10 R1080(The)S1263(bytes)S1501(of)S1611(size)S10 B(iho_opt_siz)486 1795 A10 R2308(in)S10 B2413(iho_data)S10 R2814(are)S2965(appended)S3377(to)S3482(the)S3632(IP)S3749(header.)S10 B4095(Nwio_tos)S10 R4519(speci\256es)S4893(the)S5043(value)S4944 V1080(of)S1189(the)S1337(``type)S1603(of)S1712(service'')S2091(bits,)S10 B2286(nwio_ttl)S10 R2664(gives)S2901(the)S3049(value)S3292(of)S3401(the)S3549(``time)S3821(to)S3924(live'')S4168(\256eld)S4372(and)S10 B4542(nwio_df)S10 R4914(speci\256es)S5064 V1080(whether)S1439(fragmentation)S2038(is)S2139(disallowed)S2609(or)S2727(not.)S10 B(NWIO_HDR_O_ANY)961 2940 A10 R3936(speci\256es)S4318(that)S4504(the)S4662(header)S4966(options)S5184 V(should)267 1080 A1372(be)S1492(speci\256ed)S1875(at)S(each)185 1973 A2183(write)S2416(request.)S5352 V10 B1080(NWIO_RWDATONLY)S10 R2126(speci\256es)S2502(that)S2682(the)S2834(header)S(should)267 3132 A3428(be)S(omitted)307 3552 A3888(from)S4113(a)S4187(write)S4425(request.)S4796(This)S5005(option)S5472 V1080(can)S1280(only)S1518(be)S1673(used)S1917(when)S2195(all)S2356(header)S2685(\256elds)S2963(are)S3147(speci\256ed)S3564(in)S3701(previous)S4106(options:)S10 B4488(NWIO_EN_LOC)S10 R5236(,)S5592 V10 B1080(NWIO_DI_BROAD)S10 R1946(,)S10 B2012(NWIO_REMSPEC)S10 R2845(,)S10 B2911(NWIO_PROTOSPEC)S10 R3909(and)S10 B4096(NWIO_HDR_O_SPEC)S10 R5096(.)S5188(A)S5712 V1080(read)S1279(operation)S(will)157 1684 A1866(also)S2053(only)S2256(return)S2522(the)S2670(data)S2863(part,)S3070(so)S3184(the)S3332(IP)S3447(options)S(will)157 3767 A3949(be)S4069(lost.)S5880 V10 B1080(ioctl\()S10 I1299(fd)S10 B1377(,)S1427(NWIOSIPOROUTE,)S2360(&struct)S2722(nwio_route\))S6048 V10 R1080(The)S10 B1266(NWIOSIPOROUTE)S10 R2178(ioctl)S2386(adds)S2599(a)S2673(route)S2909(to)S3016(the)S3168(routing)S3487(table.)S3762(See)S10 B3938(NWIOGIPOROUTE)S10 R(above)240 4873 A5143(for)S6168 V1080(a)S1150(description)S1622(of)S1731(the)S10 B1879(nwio_route)S10 R2391(structure.)S2819(The)S3001(\256elds)S10 B3244(nwr_ent_no)S10 R3784(and)S10 B3954(nwr_ent_count)S10 R4629(are)S(ignored.)332 4778 A6336 V870(T)S872(TC)S936(CP)S1005(P)S1088(F)S1090(Fu)S1148(un)S1200(nc)S1252(ct)S1299(ti)S1329(io)S1359(on)S1411(ns)S1463(s)S6456 V10 B1080(ioctl\()S10 I1299(fd)S10 B1377(,)S1427(NWIOTCPCONN,)S2266(&struct)S2628(nwio_tcpcl\))S6624 V10 R1080(The)S10 B1275(NWIOTCPCONN)S10 R2102(ioctl)S2319(tries)S2531(to)S2647(setup)S2897(a)S(connection)441 2980 A3459(with)S3676(a)S3759(remote)S4077(TCP/IP)S4418(server.)S4753(The)S4948(channel)S6744 V1080(must)S1309(be)S1438(fully)S1662(con\256gured)S2126(\(see)S10 B2323(NWIOSTCPCONF)S10 R3157(\))S3225(and)S3404(values)S3695(for)S3847(the)S4003(local)S4232(port,)S4452(the)S4608(remote)S4921(port)S5116(and)S6864 V1080(the)S1232(remote)S1541(address)S1872(have)S2091(be)S2215(speci\256ed)S2602(using)S10 B2849(NWTC_LP_SET)S10 R3611(or)S10 B3725(NWTC_LP_SEL)S10 R4457(,)S10 B4512(NWTC_SET_RA)S6984 V10 R1080(and)S10 B1250(NWTC_SET_RP)S10 R1988(.)S2063(The)S2245(struct)S2494(nwio_tcpcl)S2966(is)S3058(de\256ned)S3379(in)S3482(<net/gen/tcp_io.h>)S4271(as:)S7152 V10 C(typedef)427 1440 A(struct)366 1928 A(nwio_tcpcl)610 2355 A7272 V1440({)S7392 V(long)244 1800 A(nwtcl_\257ags;)671 2105 A7512 V(long)244 1800 A(nwtcl_ttl;)610 2105 A7903 V10 R720(September)S1176(13,)S(1996)200 1326 A4990(Page)S5211(6)S8143 VEP%%Page: 7 7BP/slant 0 def/height 0 def480 V10 R720(IP)S818(\()S860(4)S918(\))S2696(Eighth)S(Edition)296 2989 A5029(IP)S5127(\()S5169(4)S5227(\))S960 V10 C1440(})S(nwio_tcpcl_t;)793 1562 A1128 V10 R1080(Set)S1271(the)S10 B1456(nwtcl_\257ags)S10 R1999(\256eld)S2240(to)S2380(zero)S2616(before)S2936(the)S(connect)313 3121 A3496(or)S3643(listen)S3924(call.)S([[[Further)399 4183 A4645(explanation)S5177(of)S1248 V(nwio_tcpcl?]]])594 1080 A1416 V10 B1080(ioctl\()S10 I1299(fd)S10 B1377(,)S1427(NWIOGTCPCONF,)S2333(&struct)S2695(nwio_tcpconf\))S1584 V10 R1080(This)S1288(call)S1463(reports)S1773(the)S1926(current)S2242(con\256guration)S2808(of)S2922(a)S2997(TCP)S3212(channel.)S3605(The)S10 B3792(nwtc_\257ags)S10 R4275(\256eld)S4484(shows)S4765(the)S4918(status)S5177(of)S1704 V1080(the)S10 B(access)263 1234 A10 R1497(,)S10 B1553(locport)S10 R1861(,)S10 B1917(remaddr)S10 R2329(and)S10 B2505(remport)S10 R2895(\256elds.)S10 B3194(Nwtc_locaddr)S10 R3830(contains)S4195(the)S4348(Internet)S4692(address)S5024(of)S5138(the)S1824 V1080(TCP/IP)S1422(server.)S10 B1758(Remaddr)S10 R2206(contains)S2580(the)S2742(Internet)S3095(address)S3436(of)S3559(the)S3722(remote)S4042(TCP/IP)S4385(server)S4672(when)S4930(set)S5082(with)S1944 V10 B1080(NWTC_SET_RA)S10 R1935(or)S2125(after)S2416(a)S(successful)414 2566 A(connect)313 3085 A3503(or)S3692(listen)S4015(\(see)S10 B4283(NWIOTCPCONN)S10 R5177(or)S2064 V10 B1080(NWIOTCPLISTEN)S10 R1941(\).)S10 B2052(Nwio_locport)S10 R2661(contains)S3023(the)S3174(local)S3398(TCP/IP)S3729(port)S3919(set)S4059(with)S10 B4266(NWTC_LP_SET)S10 R5026(or)S5138(the)S2184 V1080(selected)S1436(port)S1629(set)S1771(with)S10 B1980(NWTC_LP_SEL)S10 R2712(.)S10 B2792(Nwtc_remport)S10 R3456(contains)S3821(the)S3974(TCP)S4189(port)S4381(of)S4495(the)S4648(remote)S4958(TCP/IP)S2304 V1080(server)S1352(as)S1461(set)S1598(with)S10 B1802(NWIO_SET_RP)S10 R2542(or)S2651(after)S2862(a)S(successful)414 2932 A(connect)313 3371 A3709(or)S3818(listen.)S2472 V1080(A)S1183(value)S1431(of)S1545(0)S1625(\(zero\))S1897(is)S1994(reported)S2361(for)S10 B2510(nwtc_remaddr)S10 R3149(,)S10 B3205(nwtc_locport)S10 R3802(or)S10 B3917(nwtc_remport)S10 R4565(when)S4814(no)S4945(value)S5194(is)S2592 V1080(set)S1217(either)S(explicitly)380 1472 A1877(or)S(implicitly.)416 1986 A2760 V10 B1080(ioctl\()S10 I1299(fd)S10 B1377(,)S1427(NWIOTCPLISTEN,)S2338(&struct)S2700(nwio_tcpcl\))S2928 V10 R1080(The)S10 B1263(NWIOTCPLISTEN)S10 R2151(ioctl)S2357(waits)S(until)184 2597 A2808(a)S2880(remote)S3187(TCP/IP)S3517(server)S3791(tries)S3992(to)S(connect)313 4097 A4437(to)S4542(this)S4714(channel.)S5104(The)S3048 V1080(channel)S1423(has)S1587(to)S1695(be)S1820(con\256gured)S2280(\(see)S10 B2473(NWIOSTCPCONF)S10 R3307(\).)S3421(An)S(additional)402 3574 A4006(restriction)S4445(is)S4542(that)S4722(the)S4874(local)S5099(port)S3168 V1080(must)S1307(be)S1435(set)S1580(\(with)S10 B1826(NWTC_LP_SET)S10 R2558(\))S2625(or)S2742(selected)S3100(\(with)S10 B3346(NWTC_LP_SEL)S10 R4078(\).)S4195(When)S4468(a)S4546(remote)S4859(address)S5194(is)S3288 V1080(set)S1227(only)S(connections)480 1440 A1955(for)S2108(that)S2294(host)S2496(are)S(accepted,)378 2655 A3068(and)S3248(when)S3501(a)S3581(remote)S3896(port)S4092(is)S4193(set)S4339(only)S(connections)480 4551 A5065(from)S3408 V1080(that)S1261(port)S1453(are)S(accepted.)378 1608 A2042(After)S2287(a)S(successful)414 2363 A2808(listen)S10 B3057(NWIOGTCPCONF)S10 R3944(can)S4115(be)S4241(used)S4456(to)S4565(\256nd)S4752(out)S4911(what)S5138(the)S3528 V1080(address)S1407(and)S1577(port)S1764(of)S1873(the)S2021(other)S2253(side)S2440(are.)S3696 V10 B1080(ioctl\()S10 I1299(fd)S10 B1377(,)S1427(NWIOSTCPCONF,)S2311(&struct)S2673(nwio_tcpconf\))S3864 V10 R1080(Before)S1382(a)S1454(TCP)S1666(channel)S2007(can)S2175(be)S2298(used)S2510(it)S2594(must)S2817(con\256gured)S3275(using)S3520(the)S10 B3671(NWIOSTCPCONF)S10 R4533(ioctl.)S4790(The)S4975(param-)S3984 V1080(eters)S1308(to)S10 B1423(NWIOSTCPCONF)S10 R2294(are)S2455(the)S2614(channel)S2963(\256le)S3128(descriptor)S3567(and)S3748(a)S10 B3829(struct)S4118(nwio_tcpconf)S10 R4731(as)S4851(de\256ned)S5183(in)S4104 V1080(<net/gen/tcp_io.h>:)S4272 V10 C(typedef)427 1440 A(struct)366 1928 A(nwio_tcpconf)732 2355 A4392 V1440({)S4512 V(u32_t)305 1800 A(nwtc_\257ags;)610 2166 A4632 V(ipaddr_t)488 1800 A(nwtc_locaddr;)793 2349 A4752 V(ipaddr_t)488 1800 A(nwtc_remaddr;)793 2349 A4872 V(tcpport_t)549 1800 A(nwtc_locport;)793 2410 A4992 V(tcpport_t)549 1800 A(nwtc_remport;)793 2410 A5112 V1440(})S(nwio_tcpconf_t;)915 1562 A5280 V(#de\256ne)366 1440 A(NWTC_NOFLAGS)732 1867 A(0x0000L)427 2843 A5400 V(#de\256ne)366 1440 A(NWTC_ACC_MASK)793 1867 A(0x0003L)427 2843 A5520 V1440(#)S(de\256ne)305 1928 A(NWTC_EXCL)549 2294 A(0x00000001L)671 3331 A5640 V1440(#)S(de\256ne)305 1928 A(NWTC_SHARED)671 2294 A(0x00000002L)671 3331 A5760 V1440(#)S(de\256ne)305 1928 A(NWTC_COPY)549 2294 A(0x00000003L)671 3331 A5880 V(#de\256ne)366 1440 A(NWTC_LOCPORT_MASK)1037 1867 A(0x0030L)427 3331 A6000 V1440(#)S(de\256ne)305 1928 A(NWTC_LP_UNSET)793 2294 A(0x00000010L)671 3331 A6120 V1440(#)S(de\256ne)305 1928 A(NWTC_LP_SET)671 2294 A(0x00000020L)671 3331 A6240 V1440(#)S(de\256ne)305 1928 A(NWTC_LP_SEL)671 2294 A(0x00000030L)671 3331 A6360 V(#de\256ne)366 1440 A(NWTC_REMADDR_MASK)1037 1867 A(0x0100L)427 3331 A6480 V1440(#)S(de\256ne)305 1928 A(NWTC_SET_RA)671 2294 A(0x00000100L)671 3331 A6600 V1440(#)S(de\256ne)305 1928 A(NWTC_UNSET_RA)793 2294 A(0x01000000L)671 3331 A6720 V(#de\256ne)366 1440 A(NWTC_REMPORT_MASK)1037 1867 A(0x0200L)427 3331 A6840 V1440(#)S(de\256ne)305 1928 A(NWTC_SET_RP)671 2294 A(0x00000200L)671 3331 A6960 V1440(#)S(de\256ne)305 1928 A(NWTC_UNSET_RP)793 2294 A(0x02000000L)671 3331 A7128 V10 R1080(A)S

⌨️ 快捷键说明

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