📄 ip.4
字号:
%!PS-Adobe-1.0%%Creator: devps (Pipeline Associates, Inc.)%%CreationDate: Fri Sep 13 13:08:01 1996%%Pages: (atend)%%DocumentFonts: (atend)/devps 180 dict def devps begin/res 10.000000 def/y_offset 843 def/X{exch}bind def/mm {transform round X round X itransform} bind def/r{rmoveto}bind def/m{moveto}bind def/l{lineto}bind def/rl{rlineto}bind def/st{stroke}bind def/gs{gsave}bind def/gr{grestore}bind def/cp{currentpoint}bind def/np{newpath}bind def/ct{curveto}bind defsystemdict /setpacking known { /savepacking currentpacking def true setpacking } if/m0{0 0 moveto}bind def/xc{//res div}bind def/yc{//res neg div //y_offset add}bind def/lc{yc X xc X l st}bind def/mc{yc X xc X m}bind def/el{gs /a X def a div 1 X scale cp np a xc 2 div 0 360 arc st gr}bind def/ar{cp 7 2 roll np xc 5 1 roll atan 3 1 roll atan X arc st}bind def/sp{yc X xc X 6 2 roll yc X xc X 6 2 roll yc X xc X 6 2 roll ct}bind def/V{//res neg div //y_offset addcurrentpoint pop Xm}bind def/H{//res div0 transform X round X itransform popcurrentpoint X popmoveto}bind def/h{//res div 0 r}bind def/v{//res neg div 0 X r}bind def/S{X H show}bind def/A{H //res div 1 index stringwidth pop sub 1 index length div 0 3 2 roll ashow}bind def/psize 10 def/height 0 def/cheight { height 0 ne { height } { psize } ifelse } bind def/slant 0 def/FF{findfont X dup 30 div 0 mm pop setlinewidth /psize X def [psize 0 cheight slant sin slant cos div mul cheight 0 0] makefont setfont}bind def/shade{gs /dy X def /dx X def np m 0 /dy rl /dx 0 rl 0 /dy neg rl /dx neg 0 rl closepath .9 setgray fillgr}bind def1 setlinecap/resolution res 72 mul def/startFig { /SavedState save def userdict maxlength dict begin currentpoint transform DocumentInitState setmiterlimit setgray setdash setlinejoin setlinecap setlinewidth setmatrix itransform moveto /ury exch def /urx exch def /lly exch def /llx exch def /y exch 72 mul resolution div def /x exch 72 mul resolution div def currentpoint /cy exch def /cx exch def /sx x urx llx sub div def /sy y ury lly sub div def sx sy scale cx sx div llx sub cy sy div ury sub translate /DefFigCTM matrix currentmatrix def /initmatrix { DefFigCTM setmatrix } def /defaultmatrix { DefFigCTM exch copy } def /initgraphics { DocumentInitState setmiterlimit setgray setdash setlinejoin setlinecap setlinewidth setmatrix DefFigCTM setmatrix } def /showpage { initgraphics } def}bind def/clipFig { currentpoint 6 2 roll newpath 4 copy 4 2 roll moveto 6 -1 roll exch lineto exch lineto exch lineto closepath clip newpath moveto}bind def/doclip { llx lly urx ury clipFig } def/endFig { end SavedState restore}bind def/globalstart { fontnum psize slant height resolution currentpoint pagesave restore gsave }bind def/globalend { grestore moveto /resolution exch def /height exch def /slant exch def /psize exch def /fontnum exch def F /pagesave save def}bind def/fontnum 1 def systemdict /setpacking known { savepacking setpacking} ifend/BP{save mark devps begin m0/DocumentInitState [ matrix currentmatrix currentlinewidth currentlinecapcurrentlinejoin currentdash currentgray currentmiterlimit ] cvx def}bind def/EP{end cleartomark restore showpage}def/Encoding-1 256 array def0 1 255 {Encoding-1 exch /.notdef put} forEncoding-1 8#301 StandardEncoding 8#101 26 getinterval putinterval %A-BEncoding-1 8#341 StandardEncoding 8#141 26 getinterval putinterval %a-bEncoding-1 8#241 StandardEncoding 8#301 16 getinterval putinterval %accentsEncoding-1 8#373 StandardEncoding 8#365 1 getinterval putinterval %dotlessiEncoding-1dup 8#41 /copyright putdup 8#42 /registered putdup 8#43 /trademark putdup 8#44 /logicalnot putdup 8#45 /Eth putdup 8#46 /eth putdup 8#47 /Thorn putdup 8#50 /thorn putdup 8#51 /brokenbar putdup 8#52 /degree putdup 8#53 /divide putdup 8#54 /multiply putdup 8#55 /minus putdup 8#56 /onehalf putdup 8#57 /onequarter putdup 8#60 /threequarters putdup 8#101 /Aacute putdup 8#102 /Acircumflex putdup 8#103 /Adieresis putdup 8#104 /Agrave putdup 8#105 /Aring putdup 8#106 /Atilde putdup 8#107 /Ccedilla putdup 8#110 /Eacute putdup 8#111 /Ecircumflex putdup 8#112 /Edieresis putdup 8#113 /Egrave putdup 8#114 /Iacute putdup 8#115 /Icircumflex putdup 8#116 /Idieresis putdup 8#117 /Igrave putdup 8#120 /Ntilde putdup 8#121 /Oacute putdup 8#122 /Ocircumflex putdup 8#123 /Odieresis putdup 8#124 /Ograve putdup 8#125 /Otilde putdup 8#126 /Scaron putdup 8#127 /Uacute putdup 8#130 /Ucircumflex putdup 8#131 /Udieresis putdup 8#132 /Ugrave putdup 8#133 /Ydieresis putdup 8#134 /Zcaron putdup 8#135 /aacute putdup 8#136 /acircumflex putdup 8#137 /adieresis putdup 8#140 /agrave putdup 8#141 /aring putdup 8#142 /atilde putdup 8#143 /ccedilla putdup 8#144 /eacute putdup 8#145 /ecircumflex putdup 8#146 /edieresis putdup 8#147 /egrave putdup 8#150 /iacute putdup 8#151 /icircumflex putdup 8#152 /idieresis putdup 8#153 /igrave putdup 8#154 /ntilde putdup 8#155 /oacute putdup 8#156 /ocircumflex putdup 8#157 /odieresis putdup 8#160 /ograve putdup 8#161 /otilde putdup 8#162 /scaron putdup 8#163 /uacute putdup 8#164 /ucircumflex putdup 8#165 /udieresis putdup 8#166 /ugrave putdup 8#167 /ydieresis putdup 8#170 /zcaron putpop/Enc-dict 30 dict defEnc-dict /tmpstr1 50 string putEnc-dict /tmpstr2 50 string putEnc-dict /tmpstr3 50 string dup (Encoding-) exch cvs pop put/AEnc-def { % arguments: the original font's name, encoding nrEnc-dict begintmpstr2 cvs /Enc-no exch def % Remember the number in a stringdup /OrigName exch def % remember the namefindfont dup maxlength dict /newdict exch def % get dictionary for new font{ exch dup /FID ne { exch newdict 3 1 roll put } { pop pop } % Ignore FID ifelse} forallnewdict begin/Encoding tmpstr3 9 Enc-no putinterval tmpstr3 0 9 Enc-no length add getinterval cvn load def % Replace encodingcurrentdict /UniqueID known{ /UniqueID UniqueID Enc-no cvi 49999 mul add def } if % Derive New UniqueIDend % newdict/FNlength OrigName tmpstr1 cvs length def % convert name, remember lengthFNlength 1 add Enc-no length add stringdup 0 OrigName tmpstr1 cvs putintervaldup FNlength (-) putintervaldup FNlength 1 add Enc-no putintervaldup 0 tmpstr1 0 FNlength getinterval putinterval % Add old namecvn dup newdict /FontName 3 2 roll put newdict definefontend % Enc-dict} def/Times-Roman 1 AEnc-def pop/R-1{/Times-Roman-1 FF}def/R{/Times-Roman FF}def/B{/Times-Bold FF}def/I{/Times-Italic FF}def/C{/Courier FF}def/C{/Courier FF}def%%EndProlog%%Page: 1 1BP/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 V9 R720(N)S722(NA)S790(AM)S858(ME)S940(E)S1080 V10 R1080(ip,)S1208(eth,)S1381(psip,)S(udp,)175 1598 A1798(tcp)S10 R-11946(-)S10 R2028(Internet)S2367(Protocol)S2733(server)S3005(devices)S3332(and)S(de\256nitions)424 3502 A1248 V9 R720(D)S722(DE)S790(ES)S848(SC)S900(CR)S962(RI)S1024(IP)S1057(PT)S1109(TI)S1167(IO)S1200(ON)S1268(N)S1368 V10 R1080(The)S10 B1279(ip*)S10 R1413(,)S10 B1480(eth*)S10 R1665(,)S10 B1732(psip*)S10 R1961(,)S10 B2028(tcp*)S10 R2213(,)S2280(and)S10 B(udp*)218 2467 A10 R2727(devices)S3071(give)S(access)258 3286 A3586(to)S3707(the)S3873(Internet)S4230(Protocol)S4614(\(IP\))S4815(services)S5183(in)S1488 V1080(Minix.)S1414(There)S1689(are)S1852(16)S1991(such)S2213(devices)S2553(for)S2709(four)S2915(different)S3301(networks,)S3733(and)S3916(four)S4122(different)S4508(ways)S4753(of)S(accessing)386 4875 A1608 V1080(them.)S1363(The)S10 B1552(eth*)S10 R1769(and)S10 B1946(psip*)S10 R2207(devices)S2542(give)S2748(direct)S(access)258 3011 A3302(to)S3413(the)S3569(network)S3932(packets)S4267(at)S4373(the)S4529(lowest)S4825(level.)S5104(The)S1728 V10 B1080(ip*)S10 R1214(,)S10 B1275(tcp*)S10 R1460(,)S1521(and)S10 B(udp*)218 1702 A10 R1956(devices)S2294(give)S(access)258 2503 A2797(to)S2911(IP,)S3062(TCP,)S3307(or)S3426(UDP)S3663(services.)S4073(See)S10 B4254(set_net_default)S10 R4910(\(8\))S5063(for)S5216(a)S1848 V1080(description)S1560(of)S1677(the)S1833(default)S2146(network)S2509(devices)S2844(and)S3022(environment)S3563(variables.)S4011(The)S4202(proper)S4499(TCP)S4718(device)S5015(to)S5127(use)S1968 V1080(for)S1223(instance)S1578(is)S(found)234 1670 A1929(by:)S2136 V1440(if)S(\(\(tcp_device=)561 1527 A2113(getenv\("TCP_DEVICE"\)\))S3196(==)S3335(NULL\))S2256 V(tcp_device=)493 1800 A2318("/dev/tcp";)S2424 V(Access)286 1080 A1395(to)S1502(the)S1654(IP)S1773(services)S2127(is)S2223(provided)S2610(using)S2857(\256ledescriptors)S3458(to)S3566(open)S3791(IP)S3911(devices.)S4293(These)S4564(open)S4789(IP)S4909(channels)S2544 V1080(can)S1245(be)S1365(con\256gured)S1820(with)S10 B2024(ioctl)S10 R2209(\(2\))S2352(calls,)S2587(and)S2757(data)S2950(can)S3115(be)S3235(transferred)S3698(by)S3823(calls)S4033(to)S10 B4136(read)S10 R4332(\(2\),)S4500(and)S10 B4670(write)S10 R4895(\(2\).)S2712 V870(T)S872(Ty)S936(yp)S988(pe)S1040(es)S1087(s)S1153(\()S1155(\(g)S1191(ge)S1243(en)S1290(ne)S1342(er)S1389(ra)S1425(al)S1472(l\))S1502(\))S2832 V1080(<sys/types.h>)S2952 V1440(de\256nes)S10 B1762(u8_t)S10 R1952(,)S10 B(u16_t)240 2014 A10 R2254(,)S10 B(u32_t)240 2316 A10 R2593(and)S10 B(i32_t)212 2775 A10 R3025(\(and)S10 B3242(U8_t)S10 R3449(,)S10 B(U16_t)257 3512 A10 R3769(,)S10 B(U32_t)257 3832 A10 R4127(and)S10 B(I32_t)223 4310 A10 R4571(for)S4727(use)S4899(in)S5015(proto-)S3072 V1440(types\).)S3240 V870(T)S872(Ty)S936(yp)S988(pe)S1040(es)S1087(s)S1153(\()S1155(\(e)S1191(et)S1238(th)S1268(h\))S1320(\))S3360 V1080(<net/gen/ether.h>)S3480 V1440(de\256nes)S1756(struct)S2011(ether_addr)S2473(\()S10 B2507(ether_addr_t)S10 R3073(\))S3139(and)S10 B3316(ether_type_t)S10 R3892(and)S10 B4069(Ether_type_t)S10 R4667(for)S4817(use)S4983(in)S5093(pro-)S3600 V1440(totypes.)S3768 V1080(<net/gen/eth_io.h>)S3888 V1440(de\256nes)S1750(struct)S(nwio_ethopt)502 1999 A2526(\()S10 B2560(nwio_ethopt_t)S10 R3176(\))S3235(and)S3405(struct)S3654(nwio_ethstat)S4193(\()S10 B4227(nwio_ethstat_t)S10 R4860(\))S4056 V(<net/gen/eth_hdr.h>)820 1080 A4176 V1440(de\256nes)S1750(struct)S(eth_hdr)307 1999 A2331(\()S10 B2365(eth_hdr_t)S10 R2791(\))S4344 V870(T)S872(Ty)S936(yp)S988(pe)S1040(es)S1087(s)S1153(\()S1155(\(i)S1191(ip)S1221(p\))S1273(\))S4464 V1080(<net/gen/in.h>)S4584 V1440(de\256nes)S10 B1750(ipaddr_t)S10 R2125(,)S10 B2175(ipproto_t)S10 R2603(and)S2773(struct)S(ip_hdropt)390 3022 A3437(\()S10 B3471(ip_hdropt_t)S10 R3986(\).)S4752 V1080(<net/gen/ip_io.h>)S4872 V1440(de\256nes)S1750(struct)S1999(nwio_ipconf)S2532(\()S10 B2566(nwio_ipconf_t)S10 R3176(\))S3235(and)S3405(struct)S(nwio_ipopt)457 3654 A4136(\()S10 B4170(nwio_ipopt_t)S10 R4735(\))S5040 V(<net/gen/ip_hdr.h>)775 1080 A5160 V1440(de\256nes)S1750(struct)S(ip_hdr)262 1999 A2286(\()S10 B2320(ip_hdr_t)S10 R2695(\))S5328 V1080(<net/gen/route.h>)S5448 V1440(de\256nes)S1750(struct)S1999(nwio_route)S2482(\()S10 B2516(nwio_route_t)S10 R3087(\))S5616 V870(T)S872(Ty)S936(yp)S988(pe)S1040(es)S1087(s)S1153(\()S1155(\(t)S1191(tc)S1221(cp)S1268(p\))S1320(\))S5736 V1080(<net/gen/tcp.h>)S5856 V1440(de\256nes)S10 B1750(tcpport_t)S10 R2179(and)S10 B2349(Tcpport_t)S10 R2811(for)S2954(use)S3113(in)S3216(prototypes.)S6024 V1080(<net/gen/tcp_io.h>)S6144 V1440(de\256nes)S1791(struct)S2082(nwio_tcpconf)S2702(\()S10 B2736(nwio_tcpconf_t)S10 R3397(\),)S3523(struct)S3814(nwio_tcpcl)S4328(\()S10 B4362(nwio_tcpcl_t)S10 R4911(\),)S5037(struct)S6264 V1440(nwio_tcpatt)S1940(\()S10 B1974(nwio_tcpatt_t)S10 R2568(\))S2627(and)S2797(struct)S(nwio_tcpopt)502 3046 A3573(\()S10 B3607(nwio_tcpopt_t)S10 R4223(\).)S6432 V(<net/gen/tcp_hdr.h>)820 1080 A6552 V1440(de\256nes)S1750(struct)S(tcp_hdr)307 1999 A2331(\()S10 B2365(tcp_hdr_t)S10 R2791(\))S2850(and)S3020(struct)S(tcp_hdropt)435 3269 A3729(\()S10 B3763(tcp_hdropt_t)S10 R4329(\).)S6720 V870(T)S872(Ty)S936(yp)S988(pe)S1040(es)S1087(s)S1153(\()S1155(\(u)S1191(ud)S1243(dp)S1295(p\))S1347(\))S6840 V(<net/gen/udp.h>)663 1080 A6960 V1440(de\256nes)S10 B(udpport_t)437 1750 A10 R2212(and)S10 B(Udpport_t)454 2382 A10 R2861(for)S3004(use)S3163(in)S3266(prototypes.)S7128 V(<net/gen/udp_io.h>)791 1080 A7248 V1440(de\256nes)S1750(struct)S(nwio_udpopt)529 1999 A2553(\()S10 B(nwio_udpopt_t)649 2587 A10 R3236(\).)S7903 V720(Page)S941(1)S4455(September)S4911(13,)S(1996)200 5061 A8143 VEP%%Page: 2 2BP/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 V(<net/gen/udp_hdr.h>)847 1080 A1080 V1440(de\256nes)S1750(struct)S(udp_hdr)334 1999 A2358(\()S10 B(udp_hdr_t)459 2392 A10 R2851(\))S2910(and)S3080(struct)S(udp_io_hdr)462 3329 A3816(\()S10 B(udp_io_hdr_t)587 3850 A10 R4437(\).)S1248 V870(B)S872(By)S941(yt)S993(te)S1023(e)S1095(O)S1097(Or)S1172(rd)S1208(de)S1260(er)S1307(r)S1368(C)S1370(Co)S1439(on)S1491(nv)S1543(ve)S1595(er)S1642(rs)S1678(si)S1719(io)S1749(on)S1801(n)S1368 V1080(All)S1239(16-bit)S1509(and)S1684(32-bit)S(quantities)391 1954 A2375(in)S2483(IP)S2603(headers)S2941(must)S3166(be)S3291(in)S3399(network)S3759(byte)S3962(order.)S4256(The)S4444(macros)S4766(described)S5183(in)S1488 V10 B1080(hton)S10 R1276(\(3\))S1419(can)S1584(be)S1704(used)S1913(to)S(convert)302 2016 A2343(these)S2575(values)S2857(to)S2960(and)S3130(from)S3351(the)S3499(byte)S3697(order)S3935(used)S4144(by)S4269(the)S4417(host)S4609(machine.)S1656 V870(T)S872(Th)S936(he)S988(e)S1060(I)S1062(In)S1098(nt)S1150(te)S1180(er)S1227(rn)S1263(ne)S1315(et)S1362(t)S1417(C)S1419(Ch)S1488(he)S1540(ec)S1587(ck)S1634(ks)S1686(su)S1727(um)S1779(m)S1776 V1080(The)S10 B1279(OneC_sum)S10 R1802(function)S2179(\(see)S10 B2384(oneC_sum)S10 R2837(\(3\)\))S3032(is)S3142(used)S3369(to)S3490(calculate)S3892(the)S4058(one's)S4319(complement)S4859(checksum)S1896 V1080(needed)S1390(for)S1533(IP)S1648(network)S2003(packets.)S2064 V870(G)S872(Ge)S947(en)S994(ne)S1046(er)S1093(ra)S1129(al)S1176(l)S1231(F)S1233(Fu)S1291(un)S1343(nc)S1395(ct)S1442(ti)S1472(io)S1502(on)S1554(ns)S1606(s)S2184 V10 I1080(fd)S10 B1183(=)S1265(open\()S10 I(tcpip_device)509 1506 A10 B2015(,)S2065(O_RDWR\))S2352 V10 R1080(This)S1290(is)S1389(how)S1594(one)S1771(normally)S
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -