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

📄 ip.4

📁 Unix操作系统minix 2.0源码
💻 4
📖 第 1 页 / 共 5 页
字号:
2166(obtains)S2488(a)S2565(\256ledescriptor)S3129(for)S3279(a)S3356(new)S3556(TCP/IP)S3891(channel.)S10 I(tcpip_device)509 4286 A10 R4827(names)S5116(one)S2472 V1080(of)S1189(the)S1337(TCP/IP)S1665(devices.)S2042(The)S2224(channel)S2562(may)S2760(be)S2880(used)S3089(both)S3292(to)S3395(send)S3604(or)S3713(to)S(receive)292 3816 A4133(data.)S2640 V10 I1080(n)S10 B1155(=)S1237(read\()S10 I1467(fd)S10 B1545(,)S10 I1595(buf)S10 B1723(,)S10 I1773(size)S10 B1924(\))S2808 V10 R(Receives)364 1080 A1469(one)S1639(packet)S1927(\(low)S2137(level)S2359(devices\))S2721(or)S2831(a)S2902(number)S3235(of)S3345(bytes)S3583(\(TCP)S3828(stream\).)S4207(Returns)S4546(the)S4695(the)S4844(number)S5177(of)S2928 V1080(bytes)S(placed)263 1317 A1605(into)S10 I1786(buf)S10 R1922(,)S1972(or)S2081(returns)S2386(-1)S2495(with)S2699(an)S2819(error)S3041(code)S(placed)263 3256 A3544(into)S10 B(errno)241 3725 A10 R3966(.)S3096 V10 I1080(n)S10 B1155(=)S1237(write\()S10 I1496(fd)S10 B1574(,)S10 I1624(buf)S10 B1752(,)S10 I1802(size)S10 B1953(\))S3264 V10 R1080(Sends)S1352(one)S1529(packet)S1824(\(low)S2041(level)S2269(devices\))S2637(or)S2753(a)S2830(number)S3169(of)S3285(bytes)S3529(\(TCP)S3780(stream\).)S4165(Returns)S10 I4510(size)S10 R4693(or)S4809(-1)S4926(with)S5138(the)S3384 V1080(error)S1311(code)S(placed)263 1535 A1832(into)S10 B(errno)241 2022 A10 R2263(.)S2347(The)S2538(TCP/IP)S10 B2875(read)S10 R3105(and)S10 B3284(write)S10 R3543(functions)S3951(behave)S4270(like)S4455(reads)S4702(and)S4881(writes)S5161(on)S3504 V1080(pipes)S1317(when)S1560(it)S1641(comes)S1923(to)S2026(signals.)S3672 V870(E)S872(ET)S936(TH)S1000(H)S1100(F)S1102(Fu)S1160(un)S1212(nc)S1264(ct)S1311(ti)S1341(io)S1371(on)S1423(ns)S1475(s)S3792 V10 B1080(ioctl\()S10 I1299(fd)S10 B1377(,)S1427(NWIOGETHSTAT,)S2320(&struct)S2682(nwio_ethstat\))S3960 V10 R1080(The)S10 B1263(NWIOGETHSTAT)S10 R2132(ioctl)S2337(returns)S2643(the)S2792(Ethernet)S3160(address)S3488(and)S3660(some)S3899(statistics)S4273(of)S4384(the)S4534(Ethernet)S4903(server)S5177(of)S4080 V1080(the)S1229(channel)S10 I1568(fd)S10 R1654(.)S1730(The)S1913(result)S2163(is)S2256(returned)S2618(in)S2722(the)S2871(nwio_ethstat)S3411(structure.)S3839(The)S10 B4021(struct)S4299(nwio_ethstat)S10 R4873(is)S4965(de\256ned)S4200 V1080(in)S1183(<net/gen/eth_io.h>:)S4368 V10 C(typedef)427 1440 A(struct)366 1928 A(nwio_ethstat)732 2355 A4488 V1440({)S4608 V(ether_addr_t)732 1928 A(nwes_addr;)610 2721 A4728 V(eth_stat_t)610 1928 A(nwes_stat;)610 2599 A4848 V1440(})S(nwio_ethstat_t;)915 1562 A5016 V(typedef)427 1440 A(struct)366 1928 A(eth_stat)488 2355 A5136 V1440({)S5256 V(unsigned)488 1684 A(long)244 2233 A(ets_recvErr,)732 2538 A3392(/*)S3575(#)S(receive)427 3697 A(errors)366 4185 A4612(*/)S5376 V(ets_sendErr,)732 1800 A3264(/*)S3447(#)S(send)244 3569 A(error)305 3874 A4240(*/)S5496 V(ets_OVW,)488 1800 A3264(/*)S3447(#)S(buffer)366 3569 A(overwrite)549 3996 A(warnings,)549 4606 A5616 V(\(packets)488 3575 A(arrive)366 4124 A(faster)366 4551 A(than)244 4978 A5736 V(can)183 3636 A3880(be)S(processed\))610 4063 A4734(*/)S5856 V(ets_CRCerr,)671 1800 A3264(/*)S3447(#)S(crc)183 3569 A(errors)366 3813 A4240(of)S(read)244 4423 A4728(*/)S5976 V(ets_frameAll,)793 1800 A3264(/*)S3447(#)S(frames)366 3569 A(not)183 3996 A(aligned)427 4240 A4728(\(#)S(bits)244 4911 A6096 V(not)183 3575 A3819(a)S(multiple)488 3941 A4490(of)S4673(8\))S4856(*/)S6216 V(ets_missedP,)732 1800 A3264(/*)S3447(#)S(packets)427 3569 A(missed)366 4057 A(due)183 4484 A4728(to)S(too)183 4911 A6336 V(slow)244 3575 A(packet)366 3880 A(processing)610 4307 A4978(*/)S6456 V(ets_packetR,)732 1800 A3264(/*)S3447(#)S(packets)427 3569 A(received)488 4057 A4606(*/)S6576 V(ets_packetT,)732 1800 A3264(/*)S3447(#)S(packets)427 3569 A(transmitted)671 4057 A4789(*/)S6696 V(ets_transDef,)793 1800 A3264(/*)S3447(#)S(transmission)732 3569 A(deferred)488 4362 A(\(there)366 4911 A6816 V(was)183 3575 A3819(a)S(transmission)732 3941 A4734(of)S4917(an)S6936 V(other)305 3575 A(station)427 3941 A4429(in)S(progress)488 4612 A5161(*/)S7056 V(ets_collision,)854 1800 A3264(/*)S3447(#)S(collisions)610 3569 A4240(*/)S7176 V(ets_transAb,)732 1800 A3264(/*)S3447(#)S(transmissions)793 3569 A(aborted)427 4423 A(due)183 4911 A7296 V3575(to)S(excessive)549 3758 A(collisions)610 4368 A5039(*/)S7416 V(ets_carrSense,)854 1800 A3264(/*)S3447(#)S(carrier)427 3569 A(sense)305 4057 A(lost)244 4423 A4728(*/)S7536 V(ets_\256foUnder,)793 1800 A3203(/*)S3386(#)S(\256fo)183 3508 A(underruns)549 3752 A(\(processor)610 4362 A7903 V10 R720(September)S1176(13,)S(1996)200 1326 A4990(Page)S5211(2)S8143 VEP%%Page: 3 3BP/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 C3575(is)S(too)183 3758 A(busy\))305 4002 A4368(*/)S1080 V(ets_\256foOver,)732 1800 A3203(/*)S3386(#)S(\256fo)183 3508 A(overruns)488 3752 A(\(processor)610 4301 A4972(is)S1200 V(too)183 3575 A(busy\))305 3819 A4185(*/)S1320 V(ets_CDheartbeat,)976 1800 A3264(/*)S3447(#)S(times)305 3569 A(unable)366 3935 A4362(to)S(transmit)488 4545 A1440 V(collision)549 3575 A(signal)366 4185 A4612(*/)S1560 V(ets_OWC;)488 1800 A3264(/*)S3447(#)S(times)305 3569 A(out)183 3935 A4179(of)S(window)366 4362 A1680 V(collision)549 3575 A4185(*/)S1800 V1440(})S(eth_stat_t;)671 1562 A1968 V10 B1080(ioctl\()S10 I1299(fd)S10 B1377(,)S1427(NWIOSETHOPT,)S2242(&struct)S2604(nwio_ethopt\))S2136 V10 R1080(Before)S1392(an)S1524(Ethernet)S1903(channel)S2253(can)S2430(be)S2562(used)S2783(to)S2898(send)S3119(or)S(receive)292 3241 A3571(Ethernet)S3951(packets,)S4316(it)S4410(has)S4582(to)S4698(be)S4831(con\256gured)S2256 V1080(using)S1322(the)S10 B1470(NWIOSETHOPT)S10 R2260(ioctl.)S2514(The)S2696(structure)S10 B3074(nwio_ethopt)S10 R3631(is)S3723(de\256ned)S4044(in)S4147(<net/gen/eth_io.h>:)S2424 V10 C(typedef)427 1440 A(struct)366 1928 A(nwio_ethopt)671 2355 A2544 V1440({)S2664 V(u32_t)305 1800 A(nweo_\257ags;)610 2166 A2784 V(ether_addr_t)732 1800 A(nweo_multi,)671 2593 A(nweo_rem;)549 3325 A2904 V(ether_type_t)732 1800 A(nweo_type;)610 2593 A3024 V1440(})S(nwio_ethopt_t;)854 1562 A3192 V(#de\256ne)366 1440 A(NWEO_NOFLAGS)732 1867 A(0x0000L)427 2843 A3312 V(#de\256ne)366 1440 A(NWEO_ACC_MASK)793 1867 A(0x0003L)427 2843 A3432 V1440(#)S(de\256ne)305 1928 A(NWEO_EXCL)549 2294 A(0x00000001L)671 3331 A3552 V1440(#)S(de\256ne)305 1928 A(NWEO_SHARED)671 2294 A(0x00000002L)671 3331 A3672 V1440(#)S(de\256ne)305 1928 A(NWEO_COPY)549 2294 A(0x00000003L)671 3331 A3792 V(#de\256ne)366 1440 A(NWEO_LOC_MASK)793 1867 A(0x0010L)427 2843 A3912 V1440(#)S(de\256ne)305 1928 A(NWEO_EN_LOC)671 2294 A(0x00000010L)671 3331 A4032 V1440(#)S(de\256ne)305 1928 A(NWEO_DI_LOC)671 2294 A(0x00100000L)671 3331 A4152 V(#de\256ne)366 1440 A(NWEO_BROAD_MASK)915 1867 A(0x0020L)427 2843 A4272 V1440(#)S(de\256ne)305 1928 A(NWEO_EN_BROAD)793 2294 A(0x00000020L)671 3331 A4392 V1440(#)S(de\256ne)305 1928 A(NWEO_DI_BROAD)793 2294 A(0x00200000L)671 3331 A4512 V(#de\256ne)366 1440 A(NWEO_MULTI_MASK)915 1867 A(0x0040L)427 2843 A4632 V1440(#)S(de\256ne)305 1928 A(NWEO_EN_MULTI)793 2294 A(0x00000040L)671 3331 A4752 V1440(#)S(de\256ne)305 1928 A(NWEO_DI_MULTI)793 2294 A(0x00400000L)671 3331 A4872 V(#de\256ne)366 1440 A(NWEO_PROMISC_MASK)1037 1867 A(0x0080L)427 2965 A4992 V1440(#)S(de\256ne)305 1928 A(NWEO_EN_PROMISC)915 2294 A(0x00000080L)671 3331 A5112 V1440(#)S(de\256ne)305 1928 A(NWEO_DI_PROMISC)915 2294 A(0x00800000L)671 3331 A5232 V(#de\256ne)366 1440 A(NWEO_REM_MASK)793 1867 A(0x0100L)427 2843 A5352 V1440(#)S(de\256ne)305 1928 A(NWEO_REMSPEC)732 2294 A(0x00000100L)671 3331 A5472 V1440(#)S(de\256ne)305 1928 A(NWEO_REMANY)671 2294 A(0x01000000L)671 3331 A5592 V(#de\256ne)366 1440 A(NWEO_TYPE_MASK)854 1867 A(0x0200L)427 2843 A5712 V1440(#)S(de\256ne)305 1928 A(NWEO_TYPESPEC)793 2294 A(0x00000200L)671 3331 A5832 V1440(#)S(de\256ne)305 1928 A(NWEO_TYPEANY)732 2294 A(0x02000000L)671 3331 A5952 V(#de\256ne)366 1440 A(NWEO_RW_MASK)732 1867 A(0x1000L)427 2843 A6072 V1440(#)S(de\256ne)305 1928 A(NWEO_RWDATONLY)854 2294 A(0x00001000L)671 3331 A6192 V1440(#)S(de\256ne)305 1928 A(NWEO_RWDATALL)793 2294 A(0x10000000L)671 3331 A6360 V10 R1080(The)S1268(con\256guration)S1835(is)S1933(divided)S2265(in)S2374(a)S2450(number)S2788(of)S2903(section)S3219(\(covered)S3604(by)S3736(the)S(xx_MASK)441 3891 A4364(macros\).)S4771(Options)S5121(can)S6480 V1080(be)S1208(set)S1353(in)S1464(the)S10 B1619(nweo_\257ags)S10 R2120(\256eld.)S2381(The)S2570(\256rst)S2759(section)S3076(\()S10 B(NWEO_ACC_MASK)939 3110 A10 R4049(\))S4115(controls)S4471(the)S(access)258 4626 A4916(to)S5026(a)S5103(cer-)S6600 V1080(tain)S1262(Ethernet)S1635(packet)S1929(type.)S2183(If)S10 B2282(NWEO_EXCL)S10 R2961(is)S3059(selected)S3415(then)S3620(this)S3797(is)S3896(the)S4051(only)S4261(channel)S4606(that)S4789(can)S4961(send)S5177(or)S6720 V(receive)292 1080 A1402(Ethernet)S1774(packets)S2106(of)S2220(the)S2373(selected)S2727(type.)S2979(If)S10 B3076(NWEO_SHARED)S10 R3893(is)S3989(selected)S4343(then)S(multiple)335 4545 A4909(channels)S6840 V1080(\(which)S1387(all)S1515(have)S1732(to)S1837(select)S10 B2094(NWEO_SHARED)S10 R2882(\))S2943(can)S3110(use)S3271(the)S3421(same)S3655(Ethernet)S4024(type,)S4249(they)S4450(all)S4579(can)S4747(send)S4959(packets)S6960 V1080(but)S1234(incoming)S1639(packets)S(will)157 1967 A2150(be)S2271(delivered)S2672(to)S2776(at)S2875(most)S3096(one)S3267(of)S3377(them.)S3654(If)S10 B3748(NWEO_COPY)S10 R4428(is)S4521(selected)S4872(then)S5071(mul-)S7080 V1080(tiple)S1284(channels)S1661(have)S(access)258 1876 A2159(to)S2262(the)S2410(same)S2642(Ethernet)S3009(type)S3207(and)S3377(all)S(receive)292 3503 A3820(a)S(copy)195 3890 A4110(of)S4219(an)S4339(incoming)S4743(packet.)S7248 V1080(The)S10 B1264(NWEO_LOC_MASK)S10 R2229(\257ags)S2446(control)S2758(the)S2908(delivery)S3265(of)S3377(packets)S3707(with)S3914(a)S3987(destination)S4456(address)S4786(equal)S5032(to)S5138(the)S7368 V1080(Ethernet)S1451(address)S1782(of)S1894(the)S2045(machine.)S2464(If)S10 B2560(NWEO_EN_LOC)S10 R3364(is)S3459(selected)S3812(then)S4013(these)S4248(packets)S(will)157 4578 A4763(be)S4886(delivered)S7488 V1080(and)S1250(with)S10 B1454(NWEO_DI_LOC)S10 R2227(they)S(will)157 2425 A2607(be)S2727(discarded.)S7903 V720(Page)S941(3)S4455(September)S4911(13,)S(1996)200 5061 A8143 VEP%%Page: 4 4BP/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 B1080(NWEO_BROAD_MASK)S10 R2164(,)S10 B2224(NWEO_MULTI_MASK)S10 R3285(,)S3346(and)S10 B3527(NWEO_PROMISC_MASK)S10 R4759(do)S4895(the)S5054(same)S1080 V1080(to)S1188(broadcast)S1604(packets,)S(multicast)369 1961 A2360(packets)S2692(and)S(promiscuous)513 2867 A3410(mode)S3663(packets)S3995(as)S10 B4109(NWEO_LOC_MASK)S10 R5077(does)S1200 V1080(for)S1223(local)S1444(packets.)S1821(Except)S2126(that)S2302(the)S2450(precise)S(multicast)369 2761 A3155(address)S3482(is)S3574(taken)S3817(from)S4038(the)S10 B4186(nweo_multi)S10 R4715(\256eld.)S1368 V1080(The)S10 B1269(NWEO_REM_MASK)S10 R2256(\257ags)S2478(control)S2795(whether)S3152(communication)S3810(is)S3910(restricted)S4319(to)S4430(single)S4703(destination)S5177(or)S1488 V1080(not.)S10 B1300(NWEO_REMSPEC)S10 R2203(restricts)S2565(sending)S2919(and)S(receiving)375 3106 A3523(of)S3649(packets)S3993(to)S4113(the)S4278(single)S4560(remote)S4881(computer)S1608 V1080(speci\256ed)S1463(in)S1566(the)S10 B1714(nweo_rem)S10 R2187(\256eld.)S10 B(NWEO_REMANY)822 2441 A10 R3288(allows)S3576(sending)S3913(to)S4016(and)S(receiving)375 4187 A4588(from)S4810(any)S4981(remote)S1728 V1080(computer.)S1896 V10 B1080(NWEO_TYPESPEC)S10 R2012(restricts)S2369(sending)S2719(and)S(receiving)375 2902 A3315(of)S3437(packets)S3777(to)S3893(the)S4054(type)S4265(speci\256ed)S4661(in)S10 B4777(nweo_type)S10 R5236(.)S2016 V1080(The)S1262(type)S1460(has)S1619(to)S1722(be)S1842(in)S1945(network)S2300(byte)S2498(order)S2736(\(using)S10 B3012(hton)S10 R3208(\(3\)\).)S10 B(NWEO_TYPEANY)856 3435 A10 R4316(allows)S4604(any)S4774(type.)S2184 V1080(If)S1200(the)S1375(Ethernet)S1769(header)S2090(is)S2209(completely)S2708(speci\256ed)S3118(by)S3270(the)S10 B3446(nweo_\257ags)S10 R3968(i.e.,)S4169(all)S4323(of)S

⌨️ 快捷键说明

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