home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / Tool Chest / Networking & Communications / MacTCP / MacTCP Developer Tools / MacTCP 2.0.2 Docs / MacTCP Programmer's Guide < prev   
MacBinary  |  1993-06-15  |  529.4 KB  |  [ONLN/HLX2]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
100% file MacBinary II, inited, Wed Apr 14 05:50:24 1993, modified Tue Jun 15 14:27:38 1993, creator 'HLX2', type 'ONLN', 530616 bytes "MacTCP Programmer's Guide" , at 0x81938 11236 bytes resource default (weak)
99% file data default
100% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[ONLN]
macFileCreator[HLX2]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 19 4d 61 63 54 43 50 | 20 50 72 6f 67 72 61 6d |..MacTCP| Program|
|00000010| 6d 65 72 27 73 20 47 75 | 69 64 65 00 00 00 00 00 |mer's Gu|ide.....|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 4f 4e 4c 4e 48 4c 58 | 32 01 00 00 00 00 00 00 |.ONLNHLX|2.......|
|00000050| 00 00 00 00 08 18 b8 00 | 00 2b e4 a7 f1 8e e0 a8 |........|.+......|
|00000060| 43 c5 1a 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |C.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 1e 99 00 00 |........|........|
|00000080| 09 4b 09 4d 61 63 54 43 | 50 20 50 72 6f 67 72 61 |.K.MacTC|P Progra|
|00000090| 6d 6d 65 72 d5 73 20 47 | 75 69 64 65 0d 0d f0 09 |mmer.s G|uide....|
|000000a0| 41 70 70 6c 65 20 43 6f | 6d 70 75 74 65 72 2c 20 |Apple Co|mputer, |
|000000b0| 49 6e 63 2e 0d 54 68 69 | 73 20 6d 61 6e 75 61 6c |Inc..Thi|s manual|
|000000c0| 20 61 6e 64 20 74 68 65 | 20 73 6f 66 74 77 61 72 | and the| softwar|
|000000d0| 65 20 64 65 73 63 72 69 | 62 65 64 20 69 6e 20 69 |e descri|bed in i|
|000000e0| 74 20 61 72 65 20 63 6f | 70 79 72 69 67 68 74 65 |t are co|pyrighte|
|000000f0| 64 2c 20 77 69 74 68 20 | 61 6c 6c 20 72 69 67 68 |d, with |all righ|
|00000100| 74 73 20 72 65 73 65 72 | 76 65 64 2e 20 55 6e 64 |ts reser|ved. Und|
|00000110| 65 72 20 74 68 65 20 63 | 6f 70 79 72 69 67 68 74 |er the c|opyright|
|00000120| 20 6c 61 77 73 2c 20 74 | 68 69 73 20 6d 61 6e 75 | laws, t|his manu|
|00000130| 61 6c 20 6f 72 20 74 68 | 65 20 73 6f 66 74 77 61 |al or th|e softwa|
|00000140| 72 65 20 6d 61 79 20 6e | 6f 74 20 62 65 20 63 6f |re may n|ot be co|
|00000150| 70 69 65 64 2c 20 69 6e | 20 77 68 6f 6c 65 20 6f |pied, in| whole o|
|00000160| 72 20 70 61 72 74 2c 20 | 77 69 74 68 6f 75 74 20 |r part, |without |
|00000170| 77 72 69 74 74 65 6e 20 | 63 6f 6e 73 65 6e 74 20 |written |consent |
|00000180| 6f 66 20 41 70 70 6c 65 | 2c 20 65 78 63 65 70 74 |of Apple|, except|
|00000190| 20 69 6e 20 74 68 65 20 | 6e 6f 72 6d 61 6c 20 75 | in the |normal u|
|000001a0| 73 65 20 6f 66 20 74 68 | 65 20 73 6f 66 74 77 61 |se of th|e softwa|
|000001b0| 72 65 20 6f 72 20 74 6f | 20 6d 61 6b 65 20 61 20 |re or to| make a |
|000001c0| 62 61 63 6b 75 70 20 63 | 6f 70 79 20 6f 66 20 74 |backup c|opy of t|
|000001d0| 68 65 20 73 6f 66 74 77 | 61 72 65 2e 20 54 68 65 |he softw|are. The|
|000001e0| 20 73 61 6d 65 20 70 72 | 6f 70 72 69 65 74 61 72 | same pr|oprietar|
|000001f0| 79 20 61 6e 64 20 63 6f | 70 79 72 69 67 68 74 20 |y and co|pyright |
|00000200| 6e 6f 74 69 63 65 73 20 | 6d 75 73 74 20 62 65 20 |notices |must be |
|00000210| 61 66 66 69 78 65 64 20 | 74 6f 20 61 6e 79 20 70 |affixed |to any p|
|00000220| 65 72 6d 69 74 74 65 64 | 20 63 6f 70 69 65 73 20 |ermitted| copies |
|00000230| 61 73 20 77 65 72 65 20 | 61 66 66 69 78 65 64 20 |as were |affixed |
|00000240| 74 6f 20 74 68 65 20 6f | 72 69 67 69 6e 61 6c 2e |to the o|riginal.|
|00000250| 20 54 68 69 73 20 65 78 | 63 65 70 74 69 6f 6e 20 | This ex|ception |
|00000260| 64 6f 65 73 20 6e 6f 74 | 20 61 6c 6c 6f 77 20 63 |does not| allow c|
|00000270| 6f 70 69 65 73 20 74 6f | 20 62 65 20 6d 61 64 65 |opies to| be made|
|00000280| 20 66 6f 72 20 6f 74 68 | 65 72 73 2c 20 77 68 65 | for oth|ers, whe|
|00000290| 74 68 65 72 20 6f 72 20 | 6e 6f 74 20 73 6f 6c 64 |ther or |not sold|
|000002a0| 2c 20 62 75 74 20 61 6c | 6c 20 6f 66 20 74 68 65 |, but al|l of the|
|000002b0| 20 6d 61 74 65 72 69 61 | 6c 20 70 75 72 63 68 61 | materia|l purcha|
|000002c0| 73 65 64 20 28 77 69 74 | 68 20 61 6c 6c 20 62 61 |sed (wit|h all ba|
|000002d0| 63 6b 75 70 20 63 6f 70 | 69 65 73 29 20 6d 61 79 |ckup cop|ies) may|
|000002e0| 20 62 65 20 73 6f 6c 64 | 2c 20 67 69 76 65 6e 2c | be sold|, given,|
|000002f0| 20 6f 72 20 6c 6f 61 6e | 65 64 20 74 6f 20 61 6e | or loan|ed to an|
|00000300| 6f 74 68 65 72 20 70 65 | 72 73 6f 6e 2e 20 55 6e |other pe|rson. Un|
|00000310| 64 65 72 20 74 68 65 20 | 6c 61 77 2c 20 63 6f 70 |der the |law, cop|
|00000320| 79 69 6e 67 20 69 6e 63 | 6c 75 64 65 73 20 74 72 |ying inc|ludes tr|
|00000330| 61 6e 73 6c 61 74 69 6e | 67 20 69 6e 74 6f 20 61 |anslatin|g into a|
|00000340| 6e 6f 74 68 65 72 20 6c | 61 6e 67 75 61 67 65 20 |nother l|anguage |
|00000350| 6f 72 20 66 6f 72 6d 61 | 74 2e 0d 59 6f 75 20 6d |or forma|t..You m|
|00000360| 61 79 20 75 73 65 20 74 | 68 65 20 73 6f 66 74 77 |ay use t|he softw|
|00000370| 61 72 65 20 6f 6e 20 61 | 6e 79 20 63 6f 6d 70 75 |are on a|ny compu|
|00000380| 74 65 72 20 6f 77 6e 65 | 64 20 62 79 20 79 6f 75 |ter owne|d by you|
|00000390| 2c 20 62 75 74 20 65 78 | 74 72 61 20 63 6f 70 69 |, but ex|tra copi|
|000003a0| 65 73 20 63 61 6e 6e 6f | 74 20 62 65 20 6d 61 64 |es canno|t be mad|
|000003b0| 65 20 66 6f 72 20 74 68 | 69 73 20 70 75 72 70 6f |e for th|is purpo|
|000003c0| 73 65 2e 0d 54 68 65 20 | 41 70 70 6c 65 20 6c 6f |se..The |Apple lo|
|000003d0| 67 6f 20 69 73 20 61 20 | 72 65 67 69 73 74 65 72 |go is a |register|
|000003e0| 65 64 20 74 72 61 64 65 | 6d 61 72 6b 20 6f 66 20 |ed trade|mark of |
|000003f0| 41 70 70 6c 65 20 43 6f | 6d 70 75 74 65 72 2c 20 |Apple Co|mputer, |
|00000400| 49 6e 63 2e 20 55 73 65 | 20 6f 66 20 74 68 65 20 |Inc. Use| of the |
|00000410| d2 6b 65 79 62 6f 61 72 | 64 d3 20 41 70 70 6c 65 |.keyboar|d. Apple|
|00000420| 20 6c 6f 67 6f 20 28 4f | 70 74 69 6f 6e 2d 53 68 | logo (O|ption-Sh|
|00000430| 69 66 74 2d 4b 29 20 66 | 6f 72 20 63 6f 6d 6d 65 |ift-K) f|or comme|
|00000440| 72 63 69 61 6c 20 70 75 | 72 70 6f 73 65 73 20 77 |rcial pu|rposes w|
|00000450| 69 74 68 6f 75 74 20 74 | 68 65 20 70 72 69 6f 72 |ithout t|he prior|
|00000460| 20 77 72 69 74 74 65 6e | 20 63 6f 6e 73 65 6e 74 | written| consent|
|00000470| 20 6f 66 20 41 70 70 6c | 65 20 6d 61 79 20 63 6f | of Appl|e may co|
|00000480| 6e 73 74 69 74 75 74 65 | 20 74 72 61 64 65 6d 61 |nstitute| tradema|
|00000490| 72 6b 20 69 6e 66 72 69 | 6e 67 65 6d 65 6e 74 20 |rk infri|ngement |
|000004a0| 61 6e 64 20 75 6e 66 61 | 69 72 20 63 6f 6d 70 65 |and unfa|ir compe|
|000004b0| 74 69 74 69 6f 6e 20 69 | 6e 20 76 69 6f 6c 61 74 |tition i|n violat|
|000004c0| 69 6f 6e 20 6f 66 20 66 | 65 64 65 72 61 6c 20 61 |ion of f|ederal a|
|000004d0| 6e 64 20 73 74 61 74 65 | 20 6c 61 77 73 2e 0d a9 |nd state| laws...|
|000004e0| 20 41 70 70 6c 65 20 43 | 6f 6d 70 75 74 65 72 2c | Apple C|omputer,|
|000004f0| 20 49 6e 63 2e 2c 20 31 | 39 39 33 20 0d 32 30 35 | Inc., 1|993 .205|
|00000500| 32 35 20 4d 61 72 69 61 | 6e 69 20 41 76 65 6e 75 |25 Maria|ni Avenu|
|00000510| 65 20 0d 43 75 70 65 72 | 74 69 6e 6f 2c 20 43 41 |e .Cuper|tino, CA|
|00000520| 20 20 39 35 30 31 34 2d | 36 32 39 39 0d 28 34 30 | 95014-|6299.(40|
|00000530| 38 29 20 39 39 36 2d 31 | 30 31 30 0d 41 70 70 6c |8) 996-1|010.Appl|
|00000540| 65 2c 20 74 68 65 20 41 | 70 70 6c 65 20 6c 6f 67 |e, the A|pple log|
|00000550| 6f 2c 20 41 70 70 6c 65 | 54 61 6c 6b 2c 20 4c 61 |o, Apple|Talk, La|
|00000560| 73 65 72 57 72 69 74 65 | 72 2c 20 4c 6f 63 61 6c |serWrite|r, Local|
|00000570| 54 61 6c 6b 2c 20 4d 61 | 63 69 6e 74 6f 73 68 2c |Talk, Ma|cintosh,|
|00000580| 20 4d 61 63 54 43 50 2c | 20 61 6e 64 20 4d 50 57 | MacTCP,| and MPW|
|00000590| 20 61 72 65 20 74 72 61 | 64 65 6d 61 72 6b 73 20 | are tra|demarks |
|000005a0| 6f 66 20 41 70 70 6c 65 | 20 43 6f 6d 70 75 74 65 |of Apple| Compute|
|000005b0| 72 2c 20 49 6e 63 2e 2c | 20 72 65 67 69 73 74 65 |r, Inc.,| registe|
|000005c0| 72 65 64 20 69 6e 20 74 | 68 65 20 55 6e 69 74 65 |red in t|he Unite|
|000005d0| 64 20 53 74 61 74 65 73 | 20 61 6e 64 20 6f 74 68 |d States| and oth|
|000005e0| 65 72 20 63 6f 75 6e 74 | 72 69 65 73 2e 0d 53 69 |er count|ries..Si|
|000005f0| 6d 75 6c 74 61 6e 65 6f | 75 73 6c 79 20 70 75 62 |multaneo|usly pub|
|00000600| 6c 69 73 68 65 64 20 69 | 6e 20 74 68 65 20 55 6e |lished i|n the Un|
|00000610| 69 74 65 64 20 53 74 61 | 74 65 73 20 61 6e 64 20 |ited Sta|tes and |
|00000620| 43 61 6e 61 64 61 2e 20 | 0d 4d 65 6e 74 69 6f 6e |Canada. |.Mention|
|00000630| 20 6f 66 20 74 68 69 72 | 64 2d 70 61 72 74 79 20 | of thir|d-party |
|00000640| 70 72 6f 64 75 63 74 73 | 20 69 73 20 66 6f 72 20 |products| is for |
|00000650| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 61 6c 20 70 75 |informat|ional pu|
|00000660| 72 70 6f 73 65 73 20 6f | 6e 6c 79 20 61 6e 64 20 |rposes o|nly and |
|00000670| 63 6f 6e 73 74 69 74 75 | 74 65 73 20 6e 65 69 74 |constitu|tes neit|
|00000680| 68 65 72 20 61 6e 20 65 | 6e 64 6f 72 73 65 6d 65 |her an e|ndorseme|
|00000690| 6e 74 20 6e 6f 72 20 61 | 20 72 65 63 6f 6d 6d 65 |nt nor a| recomme|
|000006a0| 6e 64 61 74 69 6f 6e 2e | 20 41 70 70 6c 65 20 61 |ndation.| Apple a|
|000006b0| 73 73 75 6d 65 73 20 6e | 6f 20 72 65 73 70 6f 6e |ssumes n|o respon|
|000006c0| 73 69 62 69 6c 69 74 79 | 20 77 69 74 68 20 72 65 |sibility| with re|
|000006d0| 67 61 72 64 20 74 6f 20 | 74 68 65 20 70 65 72 66 |gard to |the perf|
|000006e0| 6f 72 6d 61 6e 63 65 20 | 6f 66 20 74 68 65 73 65 |ormance |of these|
|000006f0| 20 70 72 6f 64 75 63 74 | 73 2e 20 0d 0d 43 6f 6e | product|s. ..Con|
|00000700| 74 65 6e 74 73 0d 50 72 | 65 66 61 63 65 3a 20 41 |tents.Pr|eface: A|
|00000710| 62 6f 75 74 20 54 68 69 | 73 20 47 75 69 64 65 20 |bout Thi|s Guide |
|00000720| 20 2f 20 20 76 69 69 0d | 09 31 09 49 6e 74 72 6f | / vii.|.1.Intro|
|00000730| 64 75 63 74 69 6f 6e ca | ca 2f ca ca 31 0d 41 72 |duction.|./..1.Ar|
|00000740| 63 68 69 74 65 63 74 75 | 72 61 6c 20 6f 76 65 72 |chitectu|ral over|
|00000750| 76 69 65 77 ca ca 2f ca | ca 32 0d 41 70 70 6c 69 |view../.|.2.Appli|
|00000760| 63 61 74 69 6f 6e 2c 20 | 70 72 65 73 65 6e 74 61 |cation, |presenta|
|00000770| 74 69 6f 6e 2c 20 61 6e | 64 20 73 65 73 73 69 6f |tion, an|d sessio|
|00000780| 6e 20 6c 61 79 65 72 73 | ca ca 2f ca ca 32 0d 54 |n layers|../..2.T|
|00000790| 72 61 6e 73 70 6f 72 74 | 20 6c 61 79 65 72 ca ca |ransport| layer..|
|000007a0| 2f ca ca 33 0d 54 72 61 | 6e 73 6d 69 73 73 69 6f |/..3.Tra|nsmissio|
|000007b0| 6e 20 43 6f 6e 74 72 6f | 6c 20 50 72 6f 74 6f 63 |n Contro|l Protoc|
|000007c0| 6f 6c 20 28 54 43 50 29 | ca ca 2f ca ca 33 0d 55 |ol (TCP)|../..3.U|
|000007d0| 73 65 72 20 44 61 74 61 | 67 72 61 6d 20 50 72 6f |ser Data|gram Pro|
|000007e0| 74 6f 63 6f 6c 20 28 55 | 44 50 29 ca ca 2f ca ca |tocol (U|DP)../..|
|000007f0| 33 0d 4e 65 74 77 6f 72 | 6b 20 6c 61 79 65 72 ca |3.Networ|k layer.|
|00000800| ca 2f ca ca 34 0d 44 61 | 74 61 20 6c 69 6e 6b 20 |./..4.Da|ta link |
|00000810| 6c 61 79 65 72 ca ca 2f | ca ca 34 0d 50 68 79 73 |layer../|..4.Phys|
|00000820| 69 63 61 6c 20 6c 61 79 | 65 72 ca ca 2f ca ca 34 |ical lay|er../..4|
|00000830| 0d 09 32 09 54 68 65 20 | 4d 61 63 54 43 50 20 44 |..2.The |MacTCP D|
|00000840| 72 69 76 65 72 ca ca 2f | ca ca 35 0d 54 68 65 20 |river../|..5.The |
|00000850| 50 42 4f 70 65 6e 20 63 | 61 6c 6c ca ca 2f ca ca |PBOpen c|all../..|
|00000860| 36 0d 54 68 65 20 50 42 | 43 6f 6e 74 72 6f 6c 20 |6.The PB|Control |
|00000870| 63 61 6c 6c ca ca 2f ca | ca 37 0d 54 68 65 20 50 |call../.|.7.The P|
|00000880| 42 43 6c 6f 73 65 20 63 | 61 6c 6c ca ca 2f ca ca |BClose c|all../..|
|00000890| 38 0d 54 68 65 20 47 65 | 73 74 61 6c 74 20 63 61 |8.The Ge|stalt ca|
|000008a0| 6c 6c ca ca 2f ca ca 38 | 0d 49 6d 70 6c 65 6d 65 |ll../..8|.Impleme|
|000008b0| 6e 74 61 74 69 6f 6e 20 | 6e 6f 74 65 73 ca ca 2f |ntation |notes../|
|000008c0| ca ca 39 0d 46 72 61 67 | 6d 65 6e 74 61 74 69 6f |..9.Frag|mentatio|
|000008d0| 6e 20 61 6e 64 20 72 65 | 61 73 73 65 6d 62 6c 79 |n and re|assembly|
|000008e0| ca ca 2f ca ca 39 0d 52 | 6f 75 74 69 6e 67 ca ca |../..9.R|outing..|
|000008f0| 2f ca ca 39 0d 09 33 09 | 55 73 65 72 20 44 61 74 |/..9..3.|User Dat|
|00000900| 61 67 72 61 6d 20 50 72 | 6f 74 6f 63 6f 6c ca ca |agram Pr|otocol..|
|00000910| 2f ca ca 31 31 0d 44 61 | 74 61 20 73 74 72 75 63 |/..11.Da|ta struc|
|00000920| 74 75 72 65 73 ca ca 2f | ca 20 31 32 0d 57 72 69 |tures../|. 12.Wri|
|00000930| 74 65 20 44 61 74 61 20 | 53 74 72 75 63 74 75 72 |te Data |Structur|
|00000940| 65 73 ca ca 2f ca ca 31 | 32 0d 52 65 63 65 69 76 |es../..1|2.Receiv|
|00000950| 65 20 62 75 66 66 65 72 | 20 61 72 65 61 ca ca 2f |e buffer| area../|
|00000960| ca 20 31 33 0d 55 73 69 | 6e 67 20 55 44 50 ca ca |. 13.Usi|ng UDP..|
|00000970| 2f ca 20 31 33 0d 55 44 | 50 20 72 6f 75 74 69 6e |/. 13.UD|P routin|
|00000980| 65 73 ca ca 2f ca 20 31 | 34 0d 55 44 50 43 72 65 |es../. 1|4.UDPCre|
|00000990| 61 74 65 ca ca 2f ca ca | 31 35 0d 55 44 50 20 61 |ate../..|15.UDP a|
|000009a0| 73 79 6e 63 68 72 6f 6e | 6f 75 73 20 6e 6f 74 69 |synchron|ous noti|
|000009b0| 66 69 63 61 74 69 6f 6e | 20 72 6f 75 74 69 6e 65 |fication| routine|
|000009c0| ca ca 2f ca 20 31 36 0d | 55 44 50 52 65 61 64 ca |../. 16.|UDPRead.|
|000009d0| ca 2f ca 20 31 38 0d 55 | 44 50 42 66 72 52 65 74 |./. 18.U|DPBfrRet|
|000009e0| 75 72 6e ca ca 2f ca ca | 31 39 0d 55 44 50 57 72 |urn../..|19.UDPWr|
|000009f0| 69 74 65 ca ca 2f ca 20 | 32 30 0d 55 44 50 52 65 |ite../. |20.UDPRe|
|00000a00| 6c 65 61 73 65 ca ca 2f | 20 ca 32 31 0d 55 44 50 |lease../| .21.UDP|
|00000a10| 4d 54 55 ca ca 2f ca ca | 32 31 0d 55 44 50 20 4d |MTU../..|21.UDP M|
|00000a20| 75 6c 74 69 70 6f 72 74 | 20 43 72 65 61 74 65 ca |ultiport| Create.|
|00000a30| ca 2f ca ca 32 32 0d 55 | 44 50 20 4d 75 6c 74 69 |./..22.U|DP Multi|
|00000a40| 70 6f 72 74 20 53 65 6e | 64 ca ca 2f ca ca 32 33 |port Sen|d../..23|
|00000a50| 0d 55 44 50 20 4d 75 6c | 74 69 70 6f 72 74 20 52 |.UDP Mul|tiport R|
|00000a60| 65 63 65 69 76 65 ca ca | 2f ca ca 32 34 0d 43 20 |eceive..|/..24.C |
|00000a70| 70 61 72 61 6d 65 74 65 | 72 2d 62 6c 6f 63 6b 20 |paramete|r-block |
|00000a80| 64 65 66 69 6e 69 74 69 | 6f 6e 73 ca ca 2f ca 20 |definiti|ons../. |
|00000a90| 32 35 0d 09 34 09 54 72 | 61 6e 73 6d 69 73 73 69 |25..4.Tr|ansmissi|
|00000aa0| 6f 6e 20 43 6f 6e 74 72 | 6f 6c 20 50 72 6f 74 6f |on Contr|ol Proto|
|00000ab0| 63 6f 6c ca ca 2f ca ca | 32 39 0d 44 61 74 61 20 |col../..|29.Data |
|00000ac0| 73 74 72 75 63 74 75 72 | 65 73 ca ca 2f ca 20 33 |structur|es../. 3|
|00000ad0| 30 0d 52 65 61 64 20 61 | 6e 64 20 57 72 69 74 65 |0.Read a|nd Write|
|00000ae0| 20 44 61 74 61 20 53 74 | 72 75 63 74 75 72 65 73 | Data St|ructures|
|00000af0| ca ca 2f ca ca 33 30 0d | 52 65 63 65 69 76 65 20 |../..30.|Receive |
|00000b00| 62 75 66 66 65 72 20 61 | 72 65 61 ca ca 2f ca 33 |buffer a|rea../.3|
|00000b10| 30 0d 55 73 69 6e 67 20 | 54 43 50 ca ca 2f ca 20 |0.Using |TCP../. |
|00000b20| 33 31 0d 53 74 72 65 61 | 6d 73 20 61 6e 64 20 63 |31.Strea|ms and c|
|00000b30| 6f 6e 6e 65 63 74 69 6f | 6e 73 ca ca 2f ca ca 33 |onnectio|ns../..3|
|00000b40| 31 0d 41 73 79 6e 63 68 | 72 6f 6e 6f 75 73 20 6e |1.Asynch|ronous n|
|00000b50| 6f 74 69 66 69 63 61 74 | 69 6f 6e 20 72 6f 75 74 |otificat|ion rout|
|00000b60| 69 6e 65 ca ca 2f ca ca | 33 31 0d 43 6f 6e 6e 65 |ine../..|31.Conne|
|00000b70| 63 74 69 6f 6e 20 6f 70 | 65 6e 69 6e 67 ca ca 2f |ction op|ening../|
|00000b80| ca ca 33 31 0d 52 65 63 | 65 69 76 69 6e 67 20 64 |..31.Rec|eiving d|
|00000b90| 61 74 61 ca ca 2f ca 20 | 33 32 0d 53 65 6e 64 69 |ata../. |32.Sendi|
|00000ba0| 6e 67 20 64 61 74 61 ca | ca 2f ca 20 33 32 0d 54 |ng data.|./. 32.T|
|00000bb0| 69 6d 65 6f 75 74 73 ca | ca 2f ca ca 33 32 0d 50 |imeouts.|./..32.P|
|00000bc0| 75 73 68 65 64 20 64 61 | 74 61 ca ca 2f ca ca 33 |ushed da|ta../..3|
|00000bd0| 33 0d 55 72 67 65 6e 74 | 20 6d 6f 64 65 ca ca 2f |3.Urgent| mode../|
|00000be0| ca 20 33 33 0d 43 6f 6e | 6e 65 63 74 69 6f 6e 20 |. 33.Con|nection |
|00000bf0| 63 6c 6f 73 69 6e 67 ca | ca 2f ca ca 33 34 0d 4e |closing.|./..34.N|
|00000c00| 65 74 77 6f 72 6b 20 6d | 61 6e 61 67 65 6d 65 6e |etwork m|anagemen|
|00000c10| 74 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e ca ca 2f |t inform|ation../|
|00000c20| ca 20 33 34 0d 46 6f 72 | 6d 61 74 74 69 6e 67 20 |. 34.For|matting |
|00000c30| 4d 61 63 54 43 50 20 63 | 6f 6d 6d 61 6e 64 73 ca |MacTCP c|ommands.|
|00000c40| ca 2f ca 20 33 35 0d 54 | 43 50 20 72 6f 75 74 69 |./. 35.T|CP routi|
|00000c50| 6e 65 73 ca ca 2f ca 20 | 33 35 0d 54 43 50 43 72 |nes../. |35.TCPCr|
|00000c60| 65 61 74 65 ca ca 2f ca | ca 33 36 0d 54 43 50 20 |eate../.|.36.TCP |
|00000c70| 61 73 79 6e 63 68 72 6f | 6e 6f 75 73 20 6e 6f 74 |asynchro|nous not|
|00000c80| 69 66 69 63 61 74 69 6f | 6e 20 72 6f 75 74 69 6e |ificatio|n routin|
|00000c90| 65 ca ca 2f ca 20 33 37 | 0d 54 43 50 50 61 73 73 |e../. 37|.TCPPass|
|00000ca0| 69 76 65 4f 70 65 6e ca | ca 2f 20 ca 34 31 0d 54 |iveOpen.|./ .41.T|
|00000cb0| 43 50 41 63 74 69 76 65 | 4f 70 65 6e ca ca 2f ca |CPActive|Open../.|
|00000cc0| ca 34 34 0d 54 43 50 53 | 65 6e 64 ca ca 2f ca 20 |.44.TCPS|end../. |
|00000cd0| 34 35 0d 54 43 50 4e 6f | 43 6f 70 79 52 63 76 ca |45.TCPNo|CopyRcv.|
|00000ce0| ca 2f ca ca 34 37 0d 54 | 43 50 42 66 72 52 65 74 |./..47.T|CPBfrRet|
|00000cf0| 75 72 6e ca ca 2f ca ca | 34 39 0d 54 43 50 52 63 |urn../..|49.TCPRc|
|00000d00| 76 ca ca 2f ca 35 30 0d | 54 43 50 43 6c 6f 73 65 |v../.50.|TCPClose|
|00000d10| ca ca 2f ca ca 35 32 0d | 54 43 50 41 62 6f 72 74 |../..52.|TCPAbort|
|00000d20| ca ca 2f ca 20 35 33 0d | 54 43 50 53 74 61 74 75 |../. 53.|TCPStatu|
|00000d30| 73 ca ca 2f ca 20 35 34 | 0d 54 43 50 52 65 6c 65 |s../. 54|.TCPRele|
|00000d40| 61 73 65 ca ca 2f ca ca | 35 36 0d 54 43 50 47 6c |ase../..|56.TCPGl|
|00000d50| 6f 62 61 6c 49 6e 66 6f | ca ca 2f ca ca 35 37 0d |obalInfo|../..57.|
|00000d60| 43 20 70 61 72 61 6d 65 | 74 65 72 2d 62 6c 6f 63 |C parame|ter-bloc|
|00000d70| 6b 20 64 65 66 69 6e 69 | 74 69 6f 6e 73 ca ca 2f |k defini|tions../|
|00000d80| ca 20 35 39 0d 09 35 09 | 4e 61 6d 65 2d 74 6f 2d |. 59..5.|Name-to-|
|00000d90| 41 64 64 72 65 73 73 20 | 52 65 73 6f 6c 75 74 69 |Address |Resoluti|
|00000da0| 6f 6e ca ca 2f ca 20 36 | 35 0d 54 68 65 20 41 64 |on../. 6|5.The Ad|
|00000db0| 64 72 65 73 73 58 6c 61 | 74 69 6f 6e 2e 68 20 68 |dressXla|tion.h h|
|00000dc0| 65 61 64 65 72 20 66 69 | 6c 65 ca ca 2f ca ca 36 |eader fi|le../..6|
|00000dd0| 36 0d 54 68 65 20 4f 70 | 65 6e 52 65 73 6f 6c 76 |6.The Op|enResolv|
|00000de0| 65 72 20 63 61 6c 6c ca | ca 2f ca ca 36 37 0d 54 |er call.|./..67.T|
|00000df0| 68 65 20 53 74 72 54 6f | 41 64 64 72 20 63 61 6c |he StrTo|Addr cal|
|00000e00| 6c ca ca 2f ca 20 36 38 | 0d 54 68 65 20 41 64 64 |l../. 68|.The Add|
|00000e10| 72 54 6f 53 74 72 20 63 | 61 6c 6c ca ca 2f ca ca |rToStr c|all../..|
|00000e20| 36 39 0d 54 68 65 20 45 | 6e 75 6d 43 61 63 68 65 |69.The E|numCache|
|00000e30| 20 63 61 6c 6c ca ca 2f | ca 20 37 30 0d 54 68 65 | call../|. 70.The|
|00000e40| 20 41 64 64 72 54 6f 4e | 61 6d 65 20 63 61 6c 6c | AddrToN|ame call|
|00000e50| ca ca 2f ca 20 37 32 0d | 54 68 65 20 48 49 6e 66 |../. 72.|The HInf|
|00000e60| 6f 20 63 61 6c 6c ca ca | 2f ca 20 37 33 0d 54 68 |o call..|/. 73.Th|
|00000e70| 65 20 4d 58 49 6e 66 6f | 20 63 61 6c 6c ca ca 2f |e MXInfo| call../|
|00000e80| ca 20 37 34 0d 54 68 65 | 20 43 6c 6f 73 65 52 65 |. 74.The| CloseRe|
|00000e90| 73 6f 6c 76 65 72 20 63 | 61 6c 6c ca ca 2f ca 20 |solver c|all../. |
|00000ea0| 37 35 0d 42 69 6e 64 69 | 6e 67 20 74 68 65 20 44 |75.Bindi|ng the D|
|00000eb0| 4e 52 20 74 6f 20 74 68 | 65 20 61 70 70 6c 69 63 |NR to th|e applic|
|00000ec0| 61 74 69 6f 6e ca ca 2f | ca 20 37 35 0d 44 4e 52 |ation../|. 75.DNR|
|00000ed0| 20 6f 70 65 72 61 74 69 | 6f 6e ca ca 2f ca 20 37 | operati|on../. 7|
|00000ee0| 36 0d 09 36 09 4d 69 73 | 63 65 6c 6c 61 6e 65 6f |6..6.Mis|cellaneo|
|00000ef0| 75 73 20 49 6e 74 65 72 | 66 61 63 65 73 ca ca 2f |us Inter|faces../|
|00000f00| ca 20 37 37 0d 4d 61 63 | 54 43 50 43 6f 6d 6d 6f |. 77.Mac|TCPCommo|
|00000f10| 6e 74 79 70 65 73 ca ca | 2f ca 20 37 38 0d 52 65 |ntypes..|/. 78.Re|
|00000f20| 73 75 6c 74 20 63 6f 64 | 65 73 ca ca 2f ca ca 37 |sult cod|es../..7|
|00000f30| 38 0d 4d 69 73 63 65 6c | 6c 61 6e 65 6f 75 73 20 |8.Miscel|laneous |
|00000f40| 74 79 70 65 73 ca ca 2f | ca 20 38 31 0d 49 6e 74 |types../|. 81.Int|
|00000f50| 65 72 6e 65 74 20 43 6f | 6e 74 72 6f 6c 20 4d 65 |ernet Co|ntrol Me|
|00000f60| 73 73 61 67 65 20 50 72 | 6f 74 6f 63 6f 6c 20 72 |ssage Pr|otocol r|
|00000f70| 65 70 6f 72 74 20 73 74 | 72 75 63 74 75 72 65 73 |eport st|ructures|
|00000f80| ca ca 2f ca ca 38 31 0d | 47 65 74 4d 79 49 50 41 |../..81.|GetMyIPA|
|00000f90| 64 64 72 ca ca 2f ca 20 | 38 32 0d 49 43 4d 50 20 |ddr../. |82.ICMP |
|00000fa0| 65 63 68 6f ca ca 2f ca | 20 38 33 0d 09 41 70 70 |echo../.| 83..App|
|00000fb0| 65 6e 64 69 78 09 43 6f | 6e 73 74 61 6e 74 73 ca |endix.Co|nstants.|
|00000fc0| ca 2f ca 20 38 35 0d 43 | 6f 6d 6d 61 6e 64 20 63 |./. 85.C|ommand c|
|00000fd0| 6f 64 65 73 ca ca 2f ca | 20 38 35 0d 55 44 50 20 |odes../.| 85.UDP |
|00000fe0| 61 73 79 6e 63 68 72 6f | 6e 6f 75 73 20 65 76 65 |asynchro|nous eve|
|00000ff0| 6e 74 20 63 6f 64 65 73 | ca ca 2f ca 20 38 35 0d |nt codes|../. 85.|
|00001000| 54 43 50 20 61 73 79 6e | 63 68 72 6f 6e 6f 75 73 |TCP asyn|chronous|
|00001010| 20 65 76 65 6e 74 20 63 | 6f 64 65 73 ca ca 2f ca | event c|odes../.|
|00001020| 20 38 36 0d 52 65 61 73 | 6f 6e 73 20 66 6f 72 20 | 86.Reas|ons for |
|00001030| 54 43 50 20 74 65 72 6d | 69 6e 61 74 69 6f 6e ca |TCP term|ination.|
|00001040| ca 2f ca ca 38 36 0d 50 | 72 65 66 61 63 65 09 41 |./..86.P|reface.A|
|00001050| 62 6f 75 74 20 54 68 69 | 73 20 47 75 69 64 65 0d |bout Thi|s Guide.|
|00001060| 54 68 69 73 20 67 75 69 | 64 65 20 64 65 73 63 72 |This gui|de descr|
|00001070| 69 62 65 73 20 68 6f 77 | 20 74 6f 20 63 72 65 61 |ibes how| to crea|
|00001080| 74 65 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 70 |te appli|cation p|
|00001090| 72 6f 67 72 61 6d 73 20 | 66 6f 72 20 74 68 65 20 |rograms |for the |
|000010a0| 4d 61 63 54 43 50 20 64 | 72 69 76 65 72 2e 20 54 |MacTCP d|river. T|
|000010b0| 68 65 20 4d 61 63 54 43 | 50 20 64 72 69 76 65 72 |he MacTC|P driver|
|000010c0| 2c 20 41 70 70 6c 65 20 | 43 6f 6d 70 75 74 65 72 |, Apple |Computer|
|000010d0| d5 73 20 69 6d 70 6c 65 | 6d 65 6e 74 61 74 69 6f |.s imple|mentatio|
|000010e0| 6e 20 6f 66 20 74 68 65 | 20 70 72 6f 74 6f 63 6f |n of the| protoco|
|000010f0| 6c 20 73 75 69 74 65 20 | 6b 6e 6f 77 6e 20 61 73 |l suite |known as|
|00001100| 20 54 72 61 6e 73 6d 69 | 73 73 69 6f 6e 20 43 6f | Transmi|ssion Co|
|00001110| 6e 74 72 6f 6c 20 50 72 | 6f 74 6f 63 6f 6c 2f 49 |ntrol Pr|otocol/I|
|00001120| 6e 74 65 72 6e 65 74 20 | 50 72 6f 74 6f 63 6f 6c |nternet |Protocol|
|00001130| 20 28 54 43 50 2f 49 50 | 29 2c 20 69 6e 63 72 65 | (TCP/IP|), incre|
|00001140| 61 73 65 73 20 74 68 65 | 20 4d 61 63 69 6e 74 6f |ases the| Macinto|
|00001150| 73 68 20 63 6f 6d 70 75 | 74 65 72 d5 73 20 61 62 |sh compu|ter.s ab|
|00001160| 69 6c 69 74 79 20 74 6f | 20 6f 70 65 72 61 74 65 |ility to| operate|
|00001170| 20 69 6e 20 61 20 68 65 | 74 65 72 6f 67 65 6e 65 | in a he|terogene|
|00001180| 6f 75 73 20 63 6f 6d 70 | 75 74 65 72 20 65 6e 76 |ous comp|uter env|
|00001190| 69 72 6f 6e 6d 65 6e 74 | 2e 0d 57 68 61 74 d5 73 |ironment|..What.s|
|000011a0| 20 69 6e 20 74 68 69 73 | 20 67 75 69 64 65 0d 54 | in this| guide.T|
|000011b0| 68 69 73 20 67 75 69 64 | 65 20 69 73 20 64 69 76 |his guid|e is div|
|000011c0| 69 64 65 64 20 69 6e 74 | 6f 20 73 69 78 20 63 68 |ided int|o six ch|
|000011d0| 61 70 74 65 72 73 20 61 | 6e 64 20 6f 6e 65 20 61 |apters a|nd one a|
|000011e0| 70 70 65 6e 64 69 78 20 | 74 68 61 74 20 63 6f 6e |ppendix |that con|
|000011f0| 74 61 69 6e 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 |tain the| followi|
|00001200| 6e 67 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 3a 0d |ng infor|mation:.|
|00001210| 6e 09 43 68 61 70 74 65 | 72 20 31 2c 20 d2 49 6e |n.Chapte|r 1, .In|
|00001220| 74 72 6f 64 75 63 74 69 | 6f 6e 2c d3 20 70 72 6f |troducti|on,. pro|
|00001230| 76 69 64 65 73 20 61 6e | 20 6f 76 65 72 76 69 65 |vides an| overvie|
|00001240| 77 20 6f 66 20 74 68 65 | 20 4d 61 63 54 43 50 20 |w of the| MacTCP |
|00001250| 61 72 63 68 69 74 65 63 | 74 75 72 65 2e 0d 6e 09 |architec|ture..n.|
|00001260| 43 68 61 70 74 65 72 20 | 32 2c 20 d2 54 68 65 20 |Chapter |2, .The |
|00001270| 4d 61 63 54 43 50 20 44 | 72 69 76 65 72 2c d3 20 |MacTCP D|river,. |
|00001280| 64 65 73 63 72 69 62 65 | 73 20 74 68 65 20 50 42 |describe|s the PB|
|00001290| 4f 70 65 6e 2c 20 50 42 | 43 6f 6e 74 72 6f 6c 2c |Open, PB|Control,|
|000012a0| 20 50 42 43 6c 6f 73 65 | 2c 20 61 6e 64 20 47 65 | PBClose|, and Ge|
|000012b0| 73 74 61 6c 74 20 63 61 | 6c 6c 73 20 61 6e 64 20 |stalt ca|lls and |
|000012c0| 64 65 73 63 72 69 62 65 | 73 20 69 6e 74 65 72 6e |describe|s intern|
|000012d0| 61 6c 20 61 6c 67 6f 72 | 69 74 68 6d 73 20 61 6e |al algor|ithms an|
|000012e0| 64 20 64 65 63 69 73 69 | 6f 6e 73 20 6d 61 64 65 |d decisi|ons made|
|000012f0| 20 62 79 20 74 68 65 20 | 64 72 69 76 65 72 2e 0d | by the |driver..|
|00001300| 6e 09 43 68 61 70 74 65 | 72 20 33 2c 20 d2 55 73 |n.Chapte|r 3, .Us|
|00001310| 65 72 20 44 61 74 61 67 | 72 61 6d 20 50 72 6f 74 |er Datag|ram Prot|
|00001320| 6f 63 6f 6c 2c d3 20 64 | 65 73 63 72 69 62 65 73 |ocol,. d|escribes|
|00001330| 20 55 44 50 20 72 6f 75 | 74 69 6e 65 73 2e 0d 6e | UDP rou|tines..n|
|00001340| 09 43 68 61 70 74 65 72 | 20 34 2c 20 d2 54 72 61 |.Chapter| 4, .Tra|
|00001350| 6e 73 6d 69 73 73 69 6f | 6e 20 43 6f 6e 74 72 6f |nsmissio|n Contro|
|00001360| 6c 20 50 72 6f 74 6f 63 | 6f 6c 2c d3 20 64 65 73 |l Protoc|ol,. des|
|00001370| 63 72 69 62 65 73 20 54 | 43 50 20 72 6f 75 74 69 |cribes T|CP routi|
|00001380| 6e 65 73 2e 0d 6e 09 43 | 68 61 70 74 65 72 20 35 |nes..n.C|hapter 5|
|00001390| 2c 20 d2 4e 61 6d 65 2d | 74 6f 2d 41 64 64 72 65 |, .Name-|to-Addre|
|000013a0| 73 73 20 52 65 73 6f 6c | 75 74 69 6f 6e 2c d3 20 |ss Resol|ution,. |
|000013b0| 64 65 73 63 72 69 62 65 | 73 20 68 6f 77 20 74 65 |describe|s how te|
|000013c0| 78 74 75 61 6c 20 6e 61 | 6d 65 73 20 61 72 65 20 |xtual na|mes are |
|000013d0| 72 65 73 6f 6c 76 65 64 | 20 74 6f 20 49 50 20 61 |resolved| to IP a|
|000013e0| 64 64 72 65 73 73 65 73 | 2e 0d 6e 09 43 68 61 70 |ddresses|..n.Chap|
|000013f0| 74 65 72 20 36 2c 20 d2 | 4d 69 73 63 65 6c 6c 61 |ter 6, .|Miscella|
|00001400| 6e 65 6f 75 73 20 49 6e | 74 65 72 66 61 63 65 73 |neous In|terfaces|
|00001410| 2c d3 20 64 65 73 63 72 | 69 62 65 73 20 74 68 65 |,. descr|ibes the|
|00001420| 20 74 79 70 65 73 20 74 | 68 61 74 20 61 72 65 20 | types t|hat are |
|00001430| 66 6f 75 6e 64 20 74 68 | 72 6f 75 67 68 6f 75 74 |found th|roughout|
|00001440| 20 74 68 65 20 70 72 6f | 67 72 61 6d 6d 61 74 69 | the pro|grammati|
|00001450| 63 20 69 6e 74 65 72 66 | 61 63 65 73 20 73 75 70 |c interf|aces sup|
|00001460| 70 6c 69 65 64 20 77 69 | 74 68 20 74 68 65 20 4d |plied wi|th the M|
|00001470| 61 63 54 43 50 20 64 72 | 69 76 65 72 2e 0d 6e 09 |acTCP dr|iver..n.|
|00001480| 54 68 65 20 41 70 70 65 | 6e 64 69 78 2c 20 d2 43 |The Appe|ndix, .C|
|00001490| 6f 6e 73 74 61 6e 74 73 | 2c d3 20 70 72 65 73 65 |onstants|,. prese|
|000014a0| 6e 74 73 20 63 6f 6d 6d | 61 6e 64 20 63 6f 64 65 |nts comm|and code|
|000014b0| 73 2c 20 55 44 50 20 61 | 73 79 6e 63 68 72 6f 6e |s, UDP a|synchron|
|000014c0| 6f 75 73 20 65 76 65 6e | 74 20 63 6f 64 65 73 2c |ous even|t codes,|
|000014d0| 20 54 43 50 20 61 73 79 | 6e 63 68 72 6f 6e 6f 75 | TCP asy|nchronou|
|000014e0| 73 20 65 76 65 6e 74 20 | 63 6f 64 65 73 2c 20 61 |s event |codes, a|
|000014f0| 6e 64 20 72 65 61 73 6f | 6e 73 20 66 6f 72 20 54 |nd reaso|ns for T|
|00001500| 43 50 20 74 65 72 6d 69 | 6e 61 74 69 6f 6e 2e 0d |CP termi|nation..|
|00001510| 57 68 6f 20 73 68 6f 75 | 6c 64 20 72 65 61 64 20 |Who shou|ld read |
|00001520| 74 68 69 73 20 67 75 69 | 64 65 0d 54 68 69 73 20 |this gui|de.This |
|00001530| 67 75 69 64 65 20 69 73 | 20 64 65 73 69 67 6e 65 |guide is| designe|
|00001540| 64 20 62 6f 74 68 20 66 | 6f 72 20 4d 61 63 69 6e |d both f|or Macin|
|00001550| 74 6f 73 68 20 70 72 6f | 67 72 61 6d 6d 65 72 73 |tosh pro|grammers|
|00001560| 20 77 68 6f 20 61 72 65 | 20 6e 6f 74 20 66 61 6d | who are| not fam|
|00001570| 69 6c 69 61 72 20 77 69 | 74 68 20 54 43 50 2f 49 |iliar wi|th TCP/I|
|00001580| 50 20 61 6e 64 20 66 6f | 72 20 54 43 50 2f 49 50 |P and fo|r TCP/IP|
|00001590| 20 70 72 6f 67 72 61 6d | 6d 65 72 73 20 77 68 6f | program|mers who|
|000015a0| 20 61 72 65 20 6e 6f 74 | 20 66 61 6d 69 6c 69 61 | are not| familia|
|000015b0| 72 20 77 69 74 68 20 74 | 68 65 20 4d 61 63 69 6e |r with t|he Macin|
|000015c0| 74 6f 73 68 20 70 72 6f | 67 72 61 6d 6d 69 6e 67 |tosh pro|gramming|
|000015d0| 20 65 6e 76 69 72 6f 6e | 6d 65 6e 74 2e 0d 44 6f | environ|ment..Do|
|000015e0| 63 75 6d 65 6e 74 20 63 | 6f 6e 76 65 6e 74 69 6f |cument c|onventio|
|000015f0| 6e 73 0d 54 68 69 73 20 | 64 6f 63 75 6d 65 6e 74 |ns.This |document|
|00001600| 20 72 65 66 6c 65 63 74 | 73 20 74 68 65 20 4d 61 | reflect|s the Ma|
|00001610| 63 69 6e 74 6f 73 68 20 | 50 72 6f 67 72 61 6d 6d |cintosh |Programm|
|00001620| 65 72 d5 73 20 57 6f 72 | 6b 73 68 6f 70 20 28 4d |er.s Wor|kshop (M|
|00001630| 50 57 29 20 63 6f 6e 76 | 65 6e 74 69 6f 6e 73 20 |PW) conv|entions |
|00001640| 66 6f 72 20 74 79 70 65 | 73 20 61 6e 64 20 73 69 |for type|s and si|
|00001650| 7a 65 73 20 6f 66 20 76 | 61 72 69 61 62 6c 65 73 |zes of v|ariables|
|00001660| 20 61 6e 64 20 66 69 65 | 6c 64 73 2e 0d 52 65 6c | and fie|lds..Rel|
|00001670| 61 74 65 64 20 64 6f 63 | 75 6d 65 6e 74 73 0d 59 |ated doc|uments.Y|
|00001680| 6f 75 20 6d 69 67 68 74 | 20 66 69 6e 64 20 74 68 |ou might| find th|
|00001690| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 72 65 66 65 |e follow|ing refe|
|000016a0| 72 65 6e 63 65 20 6d 61 | 74 65 72 69 61 6c 73 20 |rence ma|terials |
|000016b0| 75 73 65 66 75 6c 2e 0d | 6e 09 4d 61 63 54 43 50 |useful..|n.MacTCP|
|000016c0| 20 41 64 6d 69 6e 69 73 | 74 72 61 74 6f 72 d5 73 | Adminis|trator.s|
|000016d0| 20 47 75 69 64 65 0d 6e | 09 49 6e 73 69 64 65 20 | Guide.n|.Inside |
|000016e0| 4d 61 63 69 6e 74 6f 73 | 68 2c 20 56 6f 6c 75 6d |Macintos|h, Volum|
|000016f0| 65 73 20 49 d0 56 49 0d | 6e 09 44 6f 75 67 6c 61 |es I.VI.|n.Dougla|
|00001700| 73 20 43 6f 6d 65 72 2c | 20 49 6e 74 65 72 6e 65 |s Comer,| Interne|
|00001710| 74 77 6f 72 6b 69 6e 67 | 20 77 69 74 68 20 54 43 |tworking| with TC|
|00001720| 50 2f 49 50 2c 20 53 65 | 63 6f 6e 64 20 45 64 69 |P/IP, Se|cond Edi|
|00001730| 74 69 6f 6e 20 28 50 72 | 65 6e 74 69 63 65 2d 48 |tion (Pr|entice-H|
|00001740| 61 6c 6c 2c 20 31 39 39 | 31 29 0d 6e 09 54 68 65 |all, 199|1).n.The|
|00001750| 20 4d 61 63 54 43 50 20 | 64 72 69 76 65 72 20 69 | MacTCP |driver i|
|00001760| 6d 70 6c 65 6d 65 6e 74 | 73 20 70 72 6f 74 6f 63 |mplement|s protoc|
|00001770| 6f 6c 73 20 74 68 61 74 | 20 63 6f 6e 66 6f 72 6d |ols that| conform|
|00001780| 20 74 6f 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e | to the |followin|
|00001790| 67 20 52 65 71 75 65 73 | 74 20 66 6f 72 20 43 6f |g Reques|t for Co|
|000017a0| 6d 6d 65 6e 74 73 20 28 | 52 46 43 29 20 61 6e 64 |mments (|RFC) and|
|000017b0| 20 4d 69 6c 69 74 61 72 | 79 20 53 74 61 6e 64 61 | Militar|y Standa|
|000017c0| 72 64 73 20 28 4d 49 4c | 2d 53 54 44 29 3a 0d d1 |rds (MIL|-STD):..|
|000017d0| 52 46 43 20 37 36 38 20 | 28 55 73 65 72 20 44 61 |RFC 768 |(User Da|
|000017e0| 74 61 67 72 61 6d 20 50 | 72 6f 74 6f 63 6f 6c 29 |tagram P|rotocol)|
|000017f0| 0d d1 52 46 43 20 37 39 | 31 2c 20 38 39 34 3b 20 |..RFC 79|1, 894; |
|00001800| 4d 49 4c 2d 53 54 44 20 | 31 37 37 37 20 28 49 6e |MIL-STD |1777 (In|
|00001810| 74 65 72 6e 65 74 20 50 | 72 6f 74 6f 63 6f 6c 29 |ternet P|rotocol)|
|00001820| 0d d1 52 46 43 20 37 39 | 32 20 28 49 6e 74 65 72 |..RFC 79|2 (Inter|
|00001830| 6e 65 74 20 43 6f 6e 74 | 72 6f 6c 20 4d 65 73 73 |net Cont|rol Mess|
|00001840| 61 67 65 20 50 72 6f 74 | 6f 63 6f 6c 29 0d d1 52 |age Prot|ocol)..R|
|00001850| 46 43 20 37 39 33 3b 20 | 4d 49 4c 2d 53 54 44 20 |FC 793; |MIL-STD |
|00001860| 31 37 37 38 20 28 54 72 | 61 6e 73 6d 69 73 73 69 |1778 (Tr|ansmissi|
|00001870| 6f 6e 20 43 6f 6e 74 72 | 6f 6c 20 50 72 6f 74 6f |on Contr|ol Proto|
|00001880| 63 6f 6c 29 0d d1 52 46 | 43 20 38 32 36 20 28 41 |col)..RF|C 826 (A|
|00001890| 64 64 72 65 73 73 20 52 | 65 73 6f 6c 75 74 69 6f |ddress R|esolutio|
|000018a0| 6e 20 50 72 6f 74 6f 63 | 6f 6c 29 0d d1 52 46 43 |n Protoc|ol)..RFC|
|000018b0| 20 39 30 33 20 28 52 65 | 76 65 72 73 65 20 41 64 | 903 (Re|verse Ad|
|000018c0| 64 72 65 73 73 20 52 65 | 73 6f 6c 75 74 69 6f 6e |dress Re|solution|
|000018d0| 20 50 72 6f 74 6f 63 6f | 6c 29 0d d1 52 46 43 20 | Protoco|l)..RFC |
|000018e0| 39 35 30 20 28 49 6e 74 | 65 72 6e 65 74 20 53 75 |950 (Int|ernet Su|
|000018f0| 62 6e 65 74 74 69 6e 67 | 29 0d d1 52 46 43 20 39 |bnetting|)..RFC 9|
|00001900| 35 31 2c 20 31 30 34 38 | 20 28 42 6f 6f 74 73 74 |51, 1048| (Bootst|
|00001910| 72 61 70 20 50 72 6f 74 | 6f 63 6f 6c 29 0d d1 49 |rap Prot|ocol)..I|
|00001920| 44 45 41 30 30 34 20 28 | 52 6f 75 74 69 6e 67 20 |DEA004 (|Routing |
|00001930| 49 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 50 72 6f 74 |Informat|ion Prot|
|00001940| 6f 63 6f 6c 29 0d d1 52 | 46 43 20 31 30 31 30 20 |ocol)..R|FC 1010 |
|00001950| 28 49 6e 74 65 72 6e 65 | 74 20 41 73 73 69 67 6e |(Interne|t Assign|
|00001960| 65 64 20 4e 75 6d 62 65 | 72 73 29 0d d1 52 46 43 |ed Numbe|rs)..RFC|
|00001970| 20 31 30 33 34 2c 20 31 | 30 33 35 20 28 44 6f 6d | 1034, 1|035 (Dom|
|00001980| 61 69 6e 20 4e 61 6d 65 | 20 52 65 73 6f 6c 76 65 |ain Name| Resolve|
|00001990| 72 29 0d d1 52 46 43 20 | 31 30 36 30 20 28 41 73 |r)..RFC |1060 (As|
|000019a0| 73 69 67 6e 65 64 20 4e | 75 6d 62 65 72 73 29 0d |signed N|umbers).|
|000019b0| d1 52 46 43 20 31 31 32 | 32 20 28 52 65 71 75 69 |.RFC 112|2 (Requi|
|000019c0| 72 65 6d 65 6e 74 73 20 | 66 6f 72 20 49 6e 74 65 |rements |for Inte|
|000019d0| 72 6e 65 74 20 48 6f 73 | 74 73 d1 43 6f 6d 6d 75 |rnet Hos|ts.Commu|
|000019e0| 6e 69 63 61 74 69 6f 6e | 20 4c 61 79 65 72 73 29 |nication| Layers)|
|000019f0| 0d 31 09 49 6e 74 72 6f | 64 75 63 74 69 6f 6e 0d |.1.Intro|duction.|
|00001a00| 54 68 65 20 4d 61 63 54 | 43 50 20 64 72 69 76 65 |The MacT|CP drive|
|00001a10| 72 20 69 73 20 61 20 73 | 6f 66 74 77 61 72 65 20 |r is a s|oftware |
|00001a20| 64 72 69 76 65 72 20 66 | 6f 72 20 74 68 65 20 4d |driver f|or the M|
|00001a30| 61 63 69 6e 74 6f 73 68 | 20 4f 70 65 72 61 74 69 |acintosh| Operati|
|00001a40| 6e 67 20 53 79 73 74 65 | 6d 20 74 68 61 74 20 61 |ng Syste|m that a|
|00001a50| 6c 6c 6f 77 73 20 64 65 | 76 65 6c 6f 70 65 72 73 |llows de|velopers|
|00001a60| 20 74 6f 20 63 72 65 61 | 74 65 20 4d 61 63 69 6e | to crea|te Macin|
|00001a70| 74 6f 73 68 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |tosh app|lication|
|00001a80| 73 20 66 6f 72 20 6e 65 | 74 77 6f 72 6b 20 65 6e |s for ne|twork en|
|00001a90| 76 69 72 6f 6e 6d 65 6e | 74 73 20 74 68 61 74 20 |vironmen|ts that |
|00001aa0| 75 73 65 20 74 68 65 20 | 54 72 61 6e 73 6d 69 73 |use the |Transmis|
|00001ab0| 73 69 6f 6e 20 43 6f 6e | 74 72 6f 6c 20 50 72 6f |sion Con|trol Pro|
|00001ac0| 74 6f 63 6f 6c 2f 49 6e | 74 65 72 6e 65 74 20 50 |tocol/In|ternet P|
|00001ad0| 72 6f 74 6f 63 6f 6c 20 | 28 54 43 50 2f 49 50 29 |rotocol |(TCP/IP)|
|00001ae0| 2e 20 54 43 50 2f 49 50 | 20 69 73 20 61 20 77 69 |. TCP/IP| is a wi|
|00001af0| 64 65 6c 79 20 75 73 65 | 64 20 69 6e 64 75 73 74 |dely use|d indust|
|00001b00| 72 79 20 73 74 61 6e 64 | 61 72 64 20 66 6f 72 20 |ry stand|ard for |
|00001b10| 63 6f 6e 6e 65 63 74 69 | 6e 67 20 6d 75 6c 74 69 |connecti|ng multi|
|00001b20| 76 65 6e 64 6f 72 20 63 | 6f 6d 70 75 74 65 72 73 |vendor c|omputers|
|00001b30| 2e 20 54 68 65 20 54 43 | 50 2f 49 50 20 70 72 6f |. The TC|P/IP pro|
|00001b40| 74 6f 63 6f 6c 20 6c 61 | 79 65 72 73 20 61 72 65 |tocol la|yers are|
|00001b50| 20 66 75 6c 6c 79 20 63 | 6f 6d 70 61 74 69 62 6c | fully c|ompatibl|
|00001b60| 65 20 61 63 72 6f 73 73 | 20 61 6c 6c 20 69 6d 70 |e across| all imp|
|00001b70| 6c 65 6d 65 6e 74 61 74 | 69 6f 6e 73 20 6f 6e 20 |lementat|ions on |
|00001b80| 64 69 66 66 65 72 65 6e | 74 20 68 61 72 64 77 61 |differen|t hardwa|
|00001b90| 72 65 20 70 6c 61 74 66 | 6f 72 6d 73 2c 20 61 6c |re platf|orms, al|
|00001ba0| 6c 6f 77 69 6e 67 20 64 | 69 66 66 65 72 65 6e 74 |lowing d|ifferent|
|00001bb0| 20 76 65 6e 64 6f 72 73 | d5 20 63 6f 6d 70 75 74 | vendors|. comput|
|00001bc0| 65 72 73 20 74 68 61 74 | 20 72 75 6e 20 54 43 50 |ers that| run TCP|
|00001bd0| 2f 49 50 20 74 6f 20 69 | 6e 74 65 72 6f 70 65 72 |/IP to i|nteroper|
|00001be0| 61 74 65 20 61 6e 64 20 | 73 68 61 72 65 20 64 61 |ate and |share da|
|00001bf0| 74 61 20 61 6e 64 20 73 | 65 72 76 69 63 65 73 2e |ta and s|ervices.|
|00001c00| 0d 54 68 69 73 20 63 68 | 61 70 74 65 72 20 70 72 |.This ch|apter pr|
|00001c10| 6f 76 69 64 65 73 20 61 | 6e 20 6f 76 65 72 76 69 |ovides a|n overvi|
|00001c20| 65 77 20 6f 66 20 74 68 | 65 20 4d 61 63 54 43 50 |ew of th|e MacTCP|
|00001c30| 20 61 72 63 68 69 74 65 | 63 74 75 72 65 2e 20 0d | archite|cture. .|
|00001c40| 41 72 63 68 69 74 65 63 | 74 75 72 61 6c 20 6f 76 |Architec|tural ov|
|00001c50| 65 72 76 69 65 77 0d 4d | 61 63 54 43 50 20 70 72 |erview.M|acTCP pr|
|00001c60| 6f 74 6f 63 6f 6c 73 20 | 70 61 72 74 69 61 6c 6c |otocols |partiall|
|00001c70| 79 20 63 6f 6e 66 6f 72 | 6d 20 74 6f 20 74 68 65 |y confor|m to the|
|00001c80| 20 49 6e 74 65 72 6e 61 | 74 69 6f 6e 61 6c 20 53 | Interna|tional S|
|00001c90| 74 61 6e 64 61 72 64 73 | 20 4f 72 67 61 6e 69 7a |tandards| Organiz|
|00001ca0| 61 74 69 6f 6e 20 28 49 | 53 4f 29 20 4f 70 65 6e |ation (I|SO) Open|
|00001cb0| 20 53 79 73 74 65 6d 73 | 20 49 6e 74 65 72 63 6f | Systems| Interco|
|00001cc0| 6e 6e 65 63 74 69 6f 6e | 20 28 4f 53 49 29 20 6c |nnection| (OSI) l|
|00001cd0| 61 79 65 72 73 20 6f 66 | 20 6e 65 74 77 6f 72 6b |ayers of| network|
|00001ce0| 69 6e 67 20 66 75 6e 63 | 74 69 6f 6e 61 6c 69 74 |ing func|tionalit|
|00001cf0| 79 2e 20 46 69 67 75 72 | 65 20 31 2d 31 20 73 68 |y. Figur|e 1-1 sh|
|00001d00| 6f 77 73 20 61 20 63 6f | 6d 70 61 72 69 73 6f 6e |ows a co|mparison|
|00001d10| 20 6f 66 20 74 68 65 20 | 4f 53 49 20 61 6e 64 20 | of the |OSI and |
|00001d20| 4d 61 63 54 43 50 20 63 | 6f 6d 6d 75 6e 69 63 61 |MacTCP c|ommunica|
|00001d30| 74 69 6f 6e 73 20 61 72 | 63 68 69 74 65 63 74 75 |tions ar|chitectu|
|00001d40| 72 65 2e 0d 46 69 67 75 | 72 65 20 31 2d 31 20 20 |re..Figu|re 1-1 |
|00001d50| 4d 61 63 54 43 50 20 70 | 72 6f 74 6f 63 6f 6c 73 |MacTCP p|rotocols|
|00001d60| 20 61 6e 64 20 4f 53 49 | 20 6e 65 74 77 6f 72 6b | and OSI| network|
|00001d70| 20 6c 61 79 65 72 73 0d | 54 68 65 20 54 43 50 2f | layers.|The TCP/|
|00001d80| 49 50 20 70 72 6f 74 6f | 63 6f 6c 73 20 73 68 6f |IP proto|cols sho|
|00001d90| 77 6e 20 69 6e 20 46 69 | 67 75 72 65 20 31 2d 31 |wn in Fi|gure 1-1|
|00001da0| 20 61 72 65 20 64 65 73 | 63 72 69 62 65 64 20 69 | are des|cribed i|
|00001db0| 6e 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |n the fo|llowing |
|00001dc0| 73 65 63 74 69 6f 6e 73 | 2e 0d 41 70 70 6c 69 63 |sections|..Applic|
|00001dd0| 61 74 69 6f 6e 2c 20 70 | 72 65 73 65 6e 74 61 74 |ation, p|resentat|
|00001de0| 69 6f 6e 2c 20 61 6e 64 | 20 73 65 73 73 69 6f 6e |ion, and| session|
|00001df0| 20 6c 61 79 65 72 73 0d | 53 65 72 76 69 63 65 73 | layers.|Services|
|00001e00| 20 69 6e 20 74 68 65 20 | 75 70 70 65 72 2d 6c 61 | in the |upper-la|
|00001e10| 79 65 72 20 70 72 6f 74 | 6f 63 6f 6c 73 20 73 75 |yer prot|ocols su|
|00001e20| 63 68 20 61 73 20 74 68 | 65 20 46 69 6c 65 20 54 |ch as th|e File T|
|00001e30| 72 61 6e 73 66 65 72 20 | 50 72 6f 74 6f 63 6f 6c |ransfer |Protocol|
|00001e40| 20 28 46 54 50 29 2c 20 | 54 65 6c 6e 65 74 2c 20 | (FTP), |Telnet, |
|00001e50| 61 6e 64 20 74 68 65 20 | 53 69 6d 70 6c 65 20 4d |and the |Simple M|
|00001e60| 61 69 6c 20 54 72 61 6e | 73 66 65 72 20 50 72 6f |ail Tran|sfer Pro|
|00001e70| 74 6f 63 6f 6c 20 28 53 | 4d 54 50 29 20 63 6f 72 |tocol (S|MTP) cor|
|00001e80| 72 65 73 70 6f 6e 64 20 | 74 6f 20 74 68 65 20 61 |respond |to the a|
|00001e90| 70 70 6c 69 63 61 74 69 | 6f 6e 2c 20 70 72 65 73 |pplicati|on, pres|
|00001ea0| 65 6e 74 61 74 69 6f 6e | 2c 20 61 6e 64 20 73 65 |entation|, and se|
|00001eb0| 73 73 69 6f 6e 20 6c 61 | 79 65 72 73 20 6f 66 20 |ssion la|yers of |
|00001ec0| 74 68 65 20 4f 53 49 20 | 6d 6f 64 65 6c 2e 20 41 |the OSI |model. A|
|00001ed0| 73 20 69 6e 64 69 63 61 | 74 65 64 20 69 6e 20 46 |s indica|ted in F|
|00001ee0| 69 67 75 72 65 20 31 2d | 31 2c 20 73 75 63 68 20 |igure 1-|1, such |
|00001ef0| 73 65 72 76 69 63 65 73 | 20 61 72 65 20 74 79 70 |services| are typ|
|00001f00| 69 63 61 6c 6c 79 20 64 | 65 76 65 6c 6f 70 65 72 |ically d|eveloper|
|00001f10| 20 70 72 6f 64 75 63 74 | 73 20 74 68 61 74 20 61 | product|s that a|
|00001f20| 75 67 6d 65 6e 74 20 74 | 68 65 20 73 65 72 76 69 |ugment t|he servi|
|00001f30| 63 65 73 20 6f 66 20 54 | 43 50 2c 20 49 50 2c 20 |ces of T|CP, IP, |
|00001f40| 61 6e 64 20 74 68 65 20 | 55 73 65 72 20 44 61 74 |and the |User Dat|
|00001f50| 61 20 50 72 6f 74 6f 63 | 6f 6c 20 28 55 44 50 29 |a Protoc|ol (UDP)|
|00001f60| 2e 0d 54 72 61 6e 73 70 | 6f 72 74 20 6c 61 79 65 |..Transp|ort laye|
|00001f70| 72 0d 54 68 65 20 54 43 | 50 20 61 6e 64 20 55 44 |r.The TC|P and UD|
|00001f80| 50 20 70 72 6f 76 69 64 | 65 20 73 65 72 76 69 63 |P provid|e servic|
|00001f90| 65 73 20 61 74 20 74 68 | 65 20 74 72 61 6e 73 70 |es at th|e transp|
|00001fa0| 6f 72 74 20 6c 61 79 65 | 72 20 6f 66 20 74 68 65 |ort laye|r of the|
|00001fb0| 20 4f 53 49 20 6d 6f 64 | 65 6c 2e 0d 54 72 61 6e | OSI mod|el..Tran|
|00001fc0| 73 6d 69 73 73 69 6f 6e | 20 43 6f 6e 74 72 6f 6c |smission| Control|
|00001fd0| 20 50 72 6f 74 6f 63 6f | 6c 20 28 54 43 50 29 0d | Protoco|l (TCP).|
|00001fe0| 54 68 65 20 54 72 61 6e | 73 6d 69 73 73 69 6f 6e |The Tran|smission|
|00001ff0| 20 43 6f 6e 74 72 6f 6c | 20 50 72 6f 74 6f 63 6f | Control| Protoco|
|00002000| 6c 20 70 72 6f 76 69 64 | 65 73 20 72 65 6c 69 61 |l provid|es relia|
|00002010| 62 6c 65 20 74 72 61 6e | 73 6d 69 73 73 69 6f 6e |ble tran|smission|
|00002020| 20 6f 66 20 64 61 74 61 | 20 62 65 74 77 65 65 6e | of data| between|
|00002030| 20 70 72 6f 63 65 73 73 | 65 73 2e 20 49 74 20 65 | process|es. It e|
|00002040| 6e 73 75 72 65 73 20 74 | 68 61 74 20 64 61 74 61 |nsures t|hat data|
|00002050| 20 69 73 20 64 65 6c 69 | 76 65 72 65 64 20 65 72 | is deli|vered er|
|00002060| 72 6f 72 20 66 72 65 65 | 2c 20 77 69 74 68 6f 75 |ror free|, withou|
|00002070| 74 20 6c 6f 73 73 20 6f | 72 20 64 75 70 6c 69 63 |t loss o|r duplic|
|00002080| 61 74 69 6f 6e 2c 20 61 | 6e 64 20 69 6e 20 73 65 |ation, a|nd in se|
|00002090| 71 75 65 6e 63 65 2e 0d | 55 70 70 65 72 2d 6c 61 |quence..|Upper-la|
|000020a0| 79 65 72 20 70 72 6f 74 | 6f 63 6f 6c 73 20 73 75 |yer prot|ocols su|
|000020b0| 63 68 20 61 73 20 54 65 | 6c 6e 65 74 20 70 61 73 |ch as Te|lnet pas|
|000020c0| 73 20 64 61 74 61 20 74 | 6f 20 54 43 50 20 66 6f |s data t|o TCP fo|
|000020d0| 72 20 64 65 6c 69 76 65 | 72 79 20 74 6f 20 70 65 |r delive|ry to pe|
|000020e0| 65 72 20 70 72 6f 63 65 | 73 73 65 73 2e 20 54 43 |er proce|sses. TC|
|000020f0| 50 20 65 6e 63 61 70 73 | 75 6c 61 74 65 73 20 74 |P encaps|ulates t|
|00002100| 68 65 20 64 61 74 61 20 | 69 6e 74 6f 20 73 65 67 |he data |into seg|
|00002110| 6d 65 6e 74 73 20 61 6e | 64 20 70 61 73 73 65 73 |ments an|d passes|
|00002120| 20 74 68 65 20 73 65 67 | 6d 65 6e 74 73 20 74 6f | the seg|ments to|
|00002130| 20 49 50 2c 20 77 68 69 | 63 68 20 70 75 74 73 20 | IP, whi|ch puts |
|00002140| 74 68 65 20 73 65 67 6d | 65 6e 74 73 20 69 6e 74 |the segm|ents int|
|00002150| 6f 20 64 61 74 61 67 72 | 61 6d 73 20 61 6e 64 20 |o datagr|ams and |
|00002160| 70 61 73 73 65 73 20 74 | 68 65 6d 20 61 63 72 6f |passes t|hem acro|
|00002170| 73 73 20 74 68 65 20 69 | 6e 74 65 72 6e 65 74 2e |ss the i|nternet.|
|00002180| 20 54 43 50 20 61 74 20 | 74 68 65 20 72 65 63 65 | TCP at |the rece|
|00002190| 69 76 69 6e 67 20 65 6e | 64 20 63 68 65 63 6b 73 |iving en|d checks|
|000021a0| 20 66 6f 72 20 65 72 72 | 6f 72 73 2c 20 61 63 6b | for err|ors, ack|
|000021b0| 6e 6f 77 6c 65 64 67 65 | 73 20 65 72 72 6f 72 2d |nowledge|s error-|
|000021c0| 66 72 65 65 20 73 65 67 | 6d 65 6e 74 73 2c 20 61 |free seg|ments, a|
|000021d0| 6e 64 20 72 65 61 73 73 | 65 6d 62 6c 65 73 20 74 |nd reass|embles t|
|000021e0| 68 65 20 73 65 67 6d 65 | 6e 74 73 20 66 6f 72 20 |he segme|nts for |
|000021f0| 64 65 6c 69 76 65 72 79 | 20 74 6f 20 75 70 70 65 |delivery| to uppe|
|00002200| 72 2d 6c 61 79 65 72 20 | 70 72 6f 74 6f 63 6f 6c |r-layer |protocol|
|00002210| 73 2e 20 49 66 20 61 20 | 73 65 67 6d 65 6e 74 20 |s. If a |segment |
|00002220| 69 73 20 6c 6f 73 74 20 | 6f 72 20 64 61 6d 61 67 |is lost |or damag|
|00002230| 65 64 2c 20 69 74 20 77 | 69 6c 6c 20 6e 6f 74 20 |ed, it w|ill not |
|00002240| 62 65 20 61 63 6b 6e 6f | 77 6c 65 64 67 65 64 2c |be ackno|wledged,|
|00002250| 20 61 6e 64 20 74 68 65 | 20 73 65 6e 64 69 6e 67 | and the| sending|
|00002260| 20 70 72 6f 63 65 73 73 | 20 77 69 6c 6c 20 72 65 | process| will re|
|00002270| 74 72 61 6e 73 6d 69 74 | 2e 0d 54 43 50 20 68 61 |transmit|..TCP ha|
|00002280| 73 20 61 20 66 6c 6f 77 | 20 63 6f 6e 74 72 6f 6c |s a flow| control|
|00002290| 20 6d 65 63 68 61 6e 69 | 73 6d 20 73 6f 20 74 68 | mechani|sm so th|
|000022a0| 61 74 20 63 6f 6d 70 75 | 74 65 72 73 20 6f 66 20 |at compu|ters of |
|000022b0| 64 69 66 66 65 72 65 6e | 74 20 73 70 65 65 64 73 |differen|t speeds|
|000022c0| 20 61 6e 64 20 73 69 7a | 65 73 20 63 61 6e 20 63 | and siz|es can c|
|000022d0| 6f 6d 6d 75 6e 69 63 61 | 74 65 2e 20 57 68 65 6e |ommunica|te. When|
|000022e0| 20 54 43 50 20 61 74 20 | 74 68 65 20 72 65 63 65 | TCP at |the rece|
|000022f0| 69 76 69 6e 67 20 65 6e | 64 20 73 65 6e 64 73 20 |iving en|d sends |
|00002300| 61 6e 20 61 63 6b 6e 6f | 77 6c 65 64 67 6d 65 6e |an ackno|wledgmen|
|00002310| 74 2c 20 69 74 20 61 6c | 73 6f 20 61 64 76 65 72 |t, it al|so adver|
|00002320| 74 69 73 65 73 20 68 6f | 77 20 6d 75 63 68 20 64 |tises ho|w much d|
|00002330| 61 74 61 20 69 74 20 69 | 73 20 70 72 65 70 61 72 |ata it i|s prepar|
|00002340| 65 64 20 74 6f 20 61 63 | 63 65 70 74 20 6f 6e 20 |ed to ac|cept on |
|00002350| 74 68 65 20 6e 65 78 74 | 20 74 72 61 6e 73 6d 69 |the next| transmi|
|00002360| 73 73 69 6f 6e 2e 0d 55 | 73 65 72 20 44 61 74 61 |ssion..U|ser Data|
|00002370| 67 72 61 6d 20 50 72 6f | 74 6f 63 6f 6c 20 28 55 |gram Pro|tocol (U|
|00002380| 44 50 29 0d 54 68 65 20 | 55 73 65 72 20 44 61 74 |DP).The |User Dat|
|00002390| 61 67 72 61 6d 20 50 72 | 6f 74 6f 63 6f 6c 20 73 |agram Pr|otocol s|
|000023a0| 70 65 63 69 66 69 65 73 | 20 68 6f 77 20 61 70 70 |pecifies| how app|
|000023b0| 6c 69 63 61 74 69 6f 6e | 20 70 72 6f 67 72 61 6d |lication| program|
|000023c0| 73 20 73 65 6e 64 20 64 | 61 74 61 67 72 61 6d 73 |s send d|atagrams|
|000023d0| 20 74 6f 20 6f 74 68 65 | 72 20 61 70 70 6c 69 63 | to othe|r applic|
|000023e0| 61 74 69 6f 6e 20 70 72 | 6f 67 72 61 6d 73 20 61 |ation pr|ograms a|
|000023f0| 6e 64 20 64 65 66 69 6e | 65 73 20 74 68 65 20 75 |nd defin|es the u|
|00002400| 73 65 20 6f 66 20 55 44 | 50 20 70 6f 72 74 73 20 |se of UD|P ports |
|00002410| 74 6f 20 64 69 73 74 69 | 6e 67 75 69 73 68 20 61 |to disti|nguish a|
|00002420| 6d 6f 6e 67 20 6d 75 6c | 74 69 70 6c 65 20 70 72 |mong mul|tiple pr|
|00002430| 6f 63 65 73 73 65 73 20 | 69 6e 20 61 20 73 69 6e |ocesses |in a sin|
|00002440| 67 6c 65 20 6d 61 63 68 | 69 6e 65 2e 20 55 44 50 |gle mach|ine. UDP|
|00002450| 20 6d 65 73 73 61 67 65 | 73 20 61 72 65 20 65 6e | message|s are en|
|00002460| 63 61 70 73 75 6c 61 74 | 65 64 20 69 6e 20 49 50 |capsulat|ed in IP|
|00002470| 20 64 61 74 61 67 72 61 | 6d 73 20 66 6f 72 20 64 | datagra|ms for d|
|00002480| 65 6c 69 76 65 72 79 2e | 20 0d 55 44 50 20 64 61 |elivery.| .UDP da|
|00002490| 74 61 20 74 72 61 6e 73 | 6d 69 73 73 69 6f 6e 20 |ta trans|mission |
|000024a0| 64 6f 65 73 20 6e 6f 74 | 20 70 72 6f 76 69 64 65 |does not| provide|
|000024b0| 20 72 65 6c 69 61 62 69 | 6c 69 74 79 2e 20 49 74 | reliabi|lity. It|
|000024c0| 20 64 6f 65 73 20 6e 6f | 74 20 70 72 6f 76 69 64 | does no|t provid|
|000024d0| 65 20 65 72 72 6f 72 20 | 63 68 65 63 6b 69 6e 67 |e error |checking|
|000024e0| 2c 20 69 74 20 64 6f 65 | 73 20 6e 6f 74 20 61 63 |, it doe|s not ac|
|000024f0| 6b 6e 6f 77 6c 65 64 67 | 65 20 74 68 61 74 20 64 |knowledg|e that d|
|00002500| 61 74 61 20 68 61 73 20 | 62 65 65 6e 20 73 75 63 |ata has |been suc|
|00002510| 63 65 73 73 66 75 6c 6c | 79 20 72 65 63 65 69 76 |cessfull|y receiv|
|00002520| 65 64 2c 20 61 6e 64 20 | 69 74 20 64 6f 65 73 20 |ed, and |it does |
|00002530| 6e 6f 74 20 6f 72 64 65 | 72 20 69 6e 63 6f 6d 69 |not orde|r incomi|
|00002540| 6e 67 20 6d 65 73 73 61 | 67 65 73 2e 20 55 44 50 |ng messa|ges. UDP|
|00002550| 20 6d 65 73 73 61 67 65 | 73 20 63 61 6e 20 62 65 | message|s can be|
|00002560| 20 6c 6f 73 74 20 6f 72 | 20 64 75 70 6c 69 63 61 | lost or| duplica|
|00002570| 74 65 64 20 6f 72 20 63 | 61 6e 20 61 72 72 69 76 |ted or c|an arriv|
|00002580| 65 20 6f 75 74 20 6f 66 | 20 6f 72 64 65 72 2e 0d |e out of| order..|
|00002590| 54 68 65 20 61 64 76 61 | 6e 74 61 67 65 20 6f 66 |The adva|ntage of|
|000025a0| 20 55 44 50 20 69 73 20 | 74 68 61 74 20 74 68 65 | UDP is |that the|
|000025b0| 20 6f 76 65 72 68 65 61 | 64 20 61 73 73 6f 63 69 | overhea|d associ|
|000025c0| 61 74 65 64 20 77 69 74 | 68 20 65 73 74 61 62 6c |ated wit|h establ|
|000025d0| 69 73 68 69 6e 67 20 61 | 6e 64 20 6d 61 69 6e 74 |ishing a|nd maint|
|000025e0| 61 69 6e 69 6e 67 20 61 | 6e 20 65 72 72 6f 72 2d |aining a|n error-|
|000025f0| 66 72 65 65 20 54 43 50 | 20 73 65 73 73 69 6f 6e |free TCP| session|
|00002600| 20 69 73 20 61 76 6f 69 | 64 65 64 2e 20 55 70 70 | is avoi|ded. Upp|
|00002610| 65 72 2d 6c 61 79 65 72 | 20 70 72 6f 74 6f 63 6f |er-layer| protoco|
|00002620| 6c 73 20 74 68 61 74 20 | 64 6f 6e d5 74 20 72 65 |ls that |don.t re|
|00002630| 71 75 69 72 65 20 72 65 | 6c 69 61 62 69 6c 69 74 |quire re|liabilit|
|00002640| 79 20 75 73 65 20 55 44 | 50 20 74 6f 20 74 72 61 |y use UD|P to tra|
|00002650| 6e 73 6d 69 74 20 64 61 | 74 61 2e 20 46 6f 72 20 |nsmit da|ta. For |
|00002660| 69 6e 73 74 61 6e 63 65 | 2c 20 74 68 65 20 64 6f |instance|, the do|
|00002670| 6d 61 69 6e 20 6e 61 6d | 65 20 73 79 73 74 65 6d |main nam|e system|
|00002680| 20 75 73 65 73 20 55 44 | 50 20 62 65 63 61 75 73 | uses UD|P becaus|
|00002690| 65 20 72 65 6c 69 61 62 | 69 6c 69 74 79 20 69 73 |e reliab|ility is|
|000026a0| 20 6e 6f 74 20 63 72 69 | 74 69 63 61 6c 3b 20 69 | not cri|tical; i|
|000026b0| 66 20 74 68 65 72 65 20 | 69 73 20 6e 6f 20 72 65 |f there |is no re|
|000026c0| 73 70 6f 6e 73 65 20 74 | 6f 20 61 20 64 6f 6d 61 |sponse t|o a doma|
|000026d0| 69 6e 20 6e 61 6d 65 20 | 71 75 65 72 79 2c 20 74 |in name |query, t|
|000026e0| 68 65 20 72 65 73 6f 6c | 76 65 72 20 73 69 6d 70 |he resol|ver simp|
|000026f0| 6c 79 20 72 65 74 72 61 | 6e 73 6d 69 74 73 2e 0d |ly retra|nsmits..|
|00002700| 4e 65 74 77 6f 72 6b 20 | 6c 61 79 65 72 0d 54 68 |Network |layer.Th|
|00002710| 65 20 49 6e 74 65 72 6e | 65 74 20 50 72 6f 74 6f |e Intern|et Proto|
|00002720| 63 6f 6c 20 28 49 50 29 | 20 70 72 6f 76 69 64 65 |col (IP)| provide|
|00002730| 73 20 73 65 72 76 69 63 | 65 73 20 61 74 20 74 68 |s servic|es at th|
|00002740| 65 20 6e 65 74 77 6f 72 | 6b 20 6c 61 79 65 72 20 |e networ|k layer |
|00002750| 6f 66 20 74 68 65 20 4f | 53 49 20 6d 6f 64 65 6c |of the O|SI model|
|00002760| 2e 20 49 50 20 69 73 20 | 72 65 73 70 6f 6e 73 69 |. IP is |responsi|
|00002770| 62 6c 65 20 66 6f 72 20 | 73 65 6e 64 69 6e 67 20 |ble for |sending |
|00002780| 64 61 74 61 20 61 63 72 | 6f 73 73 20 6d 75 6c 74 |data acr|oss mult|
|00002790| 69 70 6c 65 20 6e 65 74 | 77 6f 72 6b 73 2e 20 49 |iple net|works. I|
|000027a0| 50 20 61 63 63 65 70 74 | 73 20 73 65 67 6d 65 6e |P accept|s segmen|
|000027b0| 74 73 20 6f 66 20 64 61 | 74 61 20 66 72 6f 6d 20 |ts of da|ta from |
|000027c0| 54 43 50 20 6f 72 20 55 | 44 50 2c 20 70 6c 61 63 |TCP or U|DP, plac|
|000027d0| 65 73 20 74 68 65 20 64 | 61 74 61 20 69 6e 20 70 |es the d|ata in p|
|000027e0| 61 63 6b 65 74 73 20 63 | 61 6c 6c 65 64 20 64 61 |ackets c|alled da|
|000027f0| 74 61 67 72 61 6d 73 2c | 20 61 6e 64 20 64 65 74 |tagrams,| and det|
|00002800| 65 72 6d 69 6e 65 73 20 | 74 68 65 20 63 6f 72 72 |ermines |the corr|
|00002810| 65 63 74 20 70 61 74 68 | 20 66 6f 72 20 74 68 65 |ect path| for the|
|00002820| 20 64 61 74 61 67 72 61 | 6d 73 20 74 6f 20 74 61 | datagra|ms to ta|
|00002830| 6b 65 2e 20 44 61 74 61 | 67 72 61 6d 73 20 61 72 |ke. Data|grams ar|
|00002840| 65 20 73 65 6e 74 20 61 | 63 72 6f 73 73 20 74 68 |e sent a|cross th|
|00002850| 65 20 69 6e 74 65 72 6e | 65 74 2c 20 74 68 72 6f |e intern|et, thro|
|00002860| 75 67 68 20 61 73 20 6d | 61 6e 79 20 67 61 74 65 |ugh as m|any gate|
|00002870| 77 61 79 73 20 61 73 20 | 6e 65 65 64 65 64 2c 20 |ways as |needed, |
|00002880| 75 6e 74 69 6c 20 74 68 | 65 79 20 72 65 61 63 68 |until th|ey reach|
|00002890| 20 74 68 65 20 64 65 73 | 74 69 6e 61 74 69 6f 6e | the des|tination|
|000028a0| 20 68 6f 73 74 2e 0d 49 | 50 20 70 72 6f 76 69 64 | host..I|P provid|
|000028b0| 65 73 20 61 6e 20 61 64 | 64 72 65 73 73 69 6e 67 |es an ad|dressing|
|000028c0| 20 6d 65 63 68 61 6e 69 | 73 6d 20 74 68 61 74 20 | mechani|sm that |
|000028d0| 61 6c 6c 6f 77 73 20 72 | 6f 75 74 69 6e 67 20 62 |allows r|outing b|
|000028e0| 65 74 77 65 65 6e 20 6e | 65 74 77 6f 72 6b 73 2e |etween n|etworks.|
|000028f0| 20 54 68 65 20 68 65 61 | 64 65 72 20 6f 66 20 61 | The hea|der of a|
|00002900| 6e 20 49 50 20 64 61 74 | 61 67 72 61 6d 20 63 6f |n IP dat|agram co|
|00002910| 6e 74 61 69 6e 73 20 73 | 6f 75 72 63 65 20 61 6e |ntains s|ource an|
|00002920| 64 20 64 65 73 74 69 6e | 61 74 69 6f 6e 20 69 6e |d destin|ation in|
|00002930| 74 65 72 6e 65 74 20 61 | 64 64 72 65 73 73 65 73 |ternet a|ddresses|
|00002940| 20 73 6f 20 74 68 61 74 | 20 61 6e 79 20 68 6f 73 | so that| any hos|
|00002950| 74 20 69 6e 20 61 20 6e | 65 74 77 6f 72 6b 20 63 |t in a n|etwork c|
|00002960| 61 6e 20 72 6f 75 74 65 | 20 61 20 70 61 63 6b 65 |an route| a packe|
|00002970| 74 20 74 6f 20 61 20 64 | 65 73 74 69 6e 61 74 69 |t to a d|estinati|
|00002980| 6f 6e 2c 20 65 69 74 68 | 65 72 20 64 69 72 65 63 |on, eith|er direc|
|00002990| 74 6c 79 20 6f 72 20 74 | 68 72 6f 75 67 68 20 61 |tly or t|hrough a|
|000029a0| 20 67 61 74 65 77 61 79 | 2e 0d 49 50 20 68 61 73 | gateway|..IP has|
|000029b0| 20 74 68 65 20 61 62 69 | 6c 69 74 79 20 74 6f 20 | the abi|lity to |
|000029c0| 66 72 61 67 6d 65 6e 74 | 20 61 20 64 61 74 61 67 |fragment| a datag|
|000029d0| 72 61 6d 20 61 73 20 69 | 74 20 69 73 20 74 72 61 |ram as i|t is tra|
|000029e0| 6e 73 6d 69 74 74 65 64 | 20 61 63 72 6f 73 73 20 |nsmitted| across |
|000029f0| 61 20 6e 65 74 77 6f 72 | 6b 2e 20 53 69 6e 63 65 |a networ|k. Since|
|00002a00| 20 49 50 20 63 61 6e 20 | 62 65 20 75 73 65 64 20 | IP can |be used |
|00002a10| 77 69 74 68 20 6d 61 6e | 79 20 64 69 66 66 65 72 |with man|y differ|
|00002a20| 65 6e 74 20 70 68 79 73 | 69 63 61 6c 20 6e 65 74 |ent phys|ical net|
|00002a30| 77 6f 72 6b 20 69 6d 70 | 6c 65 6d 65 6e 74 61 74 |work imp|lementat|
|00002a40| 69 6f 6e 73 20 74 68 61 | 74 20 73 70 65 63 69 66 |ions tha|t specif|
|00002a50| 79 20 64 69 66 66 65 72 | 65 6e 74 20 73 69 7a 65 |y differ|ent size|
|00002a60| 73 20 66 6f 72 20 70 68 | 79 73 69 63 61 6c 20 64 |s for ph|ysical d|
|00002a70| 61 74 61 20 66 72 61 6d | 65 73 2c 20 64 61 74 61 |ata fram|es, data|
|00002a80| 67 72 61 6d 73 20 63 61 | 6e 20 62 65 20 66 72 61 |grams ca|n be fra|
|00002a90| 67 6d 65 6e 74 65 64 20 | 74 6f 20 66 69 74 20 69 |gmented |to fit i|
|00002aa0| 6e 74 6f 20 61 20 73 6d | 61 6c 6c 20 64 61 74 61 |nto a sm|all data|
|00002ab0| 20 66 72 61 6d 65 2e 20 | 46 72 61 67 6d 65 6e 74 | frame. |Fragment|
|00002ac0| 73 20 61 72 65 20 72 65 | 61 73 73 65 6d 62 6c 65 |s are re|assemble|
|00002ad0| 64 20 61 73 20 74 68 65 | 79 20 61 72 72 69 76 65 |d as the|y arrive|
|00002ae0| 20 61 74 20 74 68 65 20 | 64 65 73 74 69 6e 61 74 | at the |destinat|
|00002af0| 69 6f 6e 2e 20 0d 49 50 | 20 69 73 20 6f 66 74 65 |ion. .IP| is ofte|
|00002b00| 6e 20 72 65 66 65 72 72 | 65 64 20 74 6f 20 61 73 |n referr|ed to as|
|00002b10| 20 61 6e 20 75 6e 72 65 | 6c 69 61 62 6c 65 20 64 | an unre|liable d|
|00002b20| 65 6c 69 76 65 72 79 20 | 73 79 73 74 65 6d 20 62 |elivery |system b|
|00002b30| 65 63 61 75 73 65 20 69 | 74 20 6d 61 6b 65 73 20 |ecause i|t makes |
|00002b40| 61 20 62 65 73 74 2d 65 | 66 66 6f 72 74 20 61 74 |a best-e|ffort at|
|00002b50| 74 65 6d 70 74 20 74 6f | 20 64 65 6c 69 76 65 72 |tempt to| deliver|
|00002b60| 20 61 6c 6c 20 64 61 74 | 61 67 72 61 6d 73 2c 20 | all dat|agrams, |
|00002b70| 62 75 74 20 64 65 6c 69 | 76 65 72 79 20 69 73 20 |but deli|very is |
|00002b80| 6e 6f 74 20 67 75 61 72 | 61 6e 74 65 65 64 20 28 |not guar|anteed (|
|00002b90| 54 43 50 20 67 75 61 72 | 61 6e 74 65 65 73 20 64 |TCP guar|antees d|
|00002ba0| 65 6c 69 76 65 72 79 29 | 2e 20 49 74 20 69 73 20 |elivery)|. It is |
|00002bb0| 61 6c 73 6f 20 63 61 6c | 6c 65 64 20 61 20 63 6f |also cal|led a co|
|00002bc0| 6e 6e 65 63 74 69 6f 6e | 6c 65 73 73 20 64 65 6c |nnection|less del|
|00002bd0| 69 76 65 72 79 20 73 79 | 73 74 65 6d 20 62 65 63 |ivery sy|stem bec|
|00002be0| 61 75 73 65 20 69 74 20 | 72 6f 75 74 65 73 20 65 |ause it |routes e|
|00002bf0| 61 63 68 20 64 61 74 61 | 67 72 61 6d 20 73 65 70 |ach data|gram sep|
|00002c00| 61 72 61 74 65 6c 79 2e | 20 57 68 65 6e 20 49 50 |arately.| When IP|
|00002c10| 20 72 65 63 65 69 76 65 | 73 20 61 20 73 65 71 75 | receive|s a sequ|
|00002c20| 65 6e 63 65 20 6f 66 20 | 64 61 74 61 67 72 61 6d |ence of |datagram|
|00002c30| 73 20 66 72 6f 6d 20 54 | 43 50 20 6f 72 20 55 44 |s from T|CP or UD|
|00002c40| 50 2c 20 69 74 20 72 6f | 75 74 65 73 20 65 61 63 |P, it ro|utes eac|
|00002c50| 68 20 64 61 74 61 67 72 | 61 6d 20 69 6e 20 74 68 |h datagr|am in th|
|00002c60| 65 20 73 65 71 75 65 6e | 63 65 20 69 6e 64 69 76 |e sequen|ce indiv|
|00002c70| 69 64 75 61 6c 6c 79 2c | 20 61 6e 64 20 65 61 63 |idually,| and eac|
|00002c80| 68 20 64 61 74 61 67 72 | 61 6d 20 6d 61 79 20 74 |h datagr|am may t|
|00002c90| 72 61 76 65 6c 20 6f 76 | 65 72 20 61 20 64 69 66 |ravel ov|er a dif|
|00002ca0| 66 65 72 65 6e 74 20 70 | 61 74 68 20 74 6f 20 74 |ferent p|ath to t|
|00002cb0| 68 65 20 64 65 73 74 69 | 6e 61 74 69 6f 6e 2e 0d |he desti|nation..|
|00002cc0| 44 61 74 61 20 6c 69 6e | 6b 20 6c 61 79 65 72 0d |Data lin|k layer.|
|00002cd0| 54 68 65 20 41 70 70 6c | 65 54 61 6c 6b 20 4c 69 |The Appl|eTalk Li|
|00002ce0| 6e 6b 20 41 63 63 65 73 | 73 20 50 72 6f 74 6f 63 |nk Acces|s Protoc|
|00002cf0| 6f 6c 20 28 41 4c 41 50 | 29 20 61 6e 64 20 45 74 |ol (ALAP|) and Et|
|00002d00| 68 65 72 6e 65 74 20 4c | 69 6e 6b 20 41 63 63 65 |hernet L|ink Acce|
|00002d10| 73 73 20 50 72 6f 74 6f | 63 6f 6c 20 28 45 4c 41 |ss Proto|col (ELA|
|00002d20| 50 29 20 70 72 6f 76 69 | 64 65 20 73 65 72 76 69 |P) provi|de servi|
|00002d30| 63 65 73 20 61 74 20 74 | 68 65 20 64 61 74 61 20 |ces at t|he data |
|00002d40| 6c 69 6e 6b 20 6c 61 79 | 65 72 20 6f 66 20 74 68 |link lay|er of th|
|00002d50| 65 20 4f 53 49 20 6d 6f | 64 65 6c 2e 20 41 4c 41 |e OSI mo|del. ALA|
|00002d60| 50 20 61 6e 64 20 45 4c | 41 50 20 70 72 6f 76 69 |P and EL|AP provi|
|00002d70| 64 65 20 62 65 73 74 2d | 65 66 66 6f 72 74 20 64 |de best-|effort d|
|00002d80| 65 6c 69 76 65 72 79 20 | 6f 66 20 69 6e 66 6f 72 |elivery |of infor|
|00002d90| 6d 61 74 69 6f 6e 20 62 | 65 74 77 65 65 6e 20 64 |mation b|etween d|
|00002da0| 65 76 69 63 65 73 2e 20 | 54 68 65 79 20 70 72 6f |evices. |They pro|
|00002db0| 76 69 64 65 20 74 68 65 | 20 62 61 73 69 63 20 73 |vide the| basic s|
|00002dc0| 65 72 76 69 63 65 20 6f | 66 20 70 61 63 6b 65 74 |ervice o|f packet|
|00002dd0| 20 74 72 61 6e 73 6d 69 | 73 73 69 6f 6e 20 62 65 | transmi|ssion be|
|00002de0| 74 77 65 65 6e 20 64 65 | 76 69 63 65 73 20 63 6f |tween de|vices co|
|00002df0| 6e 6e 65 63 74 65 64 20 | 74 6f 20 61 20 73 69 6e |nnected |to a sin|
|00002e00| 67 6c 65 20 70 68 79 73 | 69 63 61 6c 20 6e 65 74 |gle phys|ical net|
|00002e10| 77 6f 72 6b 2e 0d 54 68 | 65 20 4d 61 63 54 43 50 |work..Th|e MacTCP|
|00002e20| 20 64 72 69 76 65 72 20 | 61 6c 6c 6f 77 73 20 66 | driver |allows f|
|00002e30| 6f 72 20 74 68 65 20 61 | 64 64 69 74 69 6f 6e 20 |or the a|ddition |
|00002e40| 6f 66 20 6f 74 68 65 72 | 20 64 61 74 61 20 6c 69 |of other| data li|
|00002e50| 6e 6b 20 6c 61 79 65 72 | 73 20 74 68 72 6f 75 67 |nk layer|s throug|
|00002e60| 68 20 74 68 65 20 75 73 | 65 20 6f 66 20 61 20 6c |h the us|e of a l|
|00002e70| 69 6e 6b 20 6c 61 79 65 | 72 20 69 6e 74 65 72 66 |ink laye|r interf|
|00002e80| 61 63 65 20 62 65 74 77 | 65 65 6e 20 74 68 65 20 |ace betw|een the |
|00002e90| 49 50 20 6c 61 79 65 72 | 20 61 6e 64 20 74 68 65 |IP layer| and the|
|00002ea0| 20 64 61 74 61 20 6c 69 | 6e 6b 20 6c 61 79 65 72 | data li|nk layer|
|00002eb0| 2e 20 54 68 69 73 20 69 | 6e 74 65 72 66 61 63 65 |. This i|nterface|
|00002ec0| 20 69 73 20 64 65 73 63 | 72 69 62 65 64 20 69 6e | is desc|ribed in|
|00002ed0| 20 74 68 65 20 64 6f 63 | 75 6d 65 6e 74 20 42 75 | the doc|ument Bu|
|00002ee0| 69 6c 64 69 6e 67 20 41 | 6c 74 65 72 6e 61 74 65 |ilding A|lternate|
|00002ef0| 20 4c 69 6e 6b 20 41 63 | 63 65 73 73 20 50 72 6f | Link Ac|cess Pro|
|00002f00| 74 6f 63 6f 6c 20 4d 6f | 64 75 6c 65 73 20 66 6f |tocol Mo|dules fo|
|00002f10| 72 20 4d 61 63 54 43 50 | 20 61 76 61 69 6c 61 62 |r MacTCP| availab|
|00002f20| 6c 65 20 69 6e 20 74 68 | 65 20 44 65 76 65 6c 6f |le in th|e Develo|
|00002f30| 70 65 72 d5 73 20 43 44 | 20 53 65 72 69 65 73 20 |per.s CD| Series |
|00002f40| 66 72 6f 6d 20 74 68 65 | 20 41 70 70 6c 65 20 44 |from the| Apple D|
|00002f50| 65 76 65 6c 6f 70 65 72 | d5 73 20 47 72 6f 75 70 |eveloper|.s Group|
|00002f60| 2e 0d 50 68 79 73 69 63 | 61 6c 20 6c 61 79 65 72 |..Physic|al layer|
|00002f70| 0d 54 68 65 20 4d 61 63 | 54 43 50 20 64 72 69 76 |.The Mac|TCP driv|
|00002f80| 65 72 20 6f 70 65 72 61 | 74 65 73 20 6e 65 74 77 |er opera|tes netw|
|00002f90| 6f 72 6b 73 20 69 6e 20 | 77 68 69 63 68 20 74 68 |orks in |which th|
|00002fa0| 65 20 70 68 79 73 69 63 | 61 6c 20 6c 61 79 65 72 |e physic|al layer|
|00002fb0| 20 75 73 65 73 20 74 68 | 65 20 4c 6f 63 61 6c 54 | uses th|e LocalT|
|00002fc0| 61 6c 6b 20 63 61 62 6c | 65 20 73 79 73 74 65 6d |alk cabl|e system|
|00002fd0| 20 6f 72 20 74 68 65 20 | 45 74 68 65 72 6e 65 74 | or the |Ethernet|
|00002fe0| 20 6e 65 74 77 6f 72 6b | 69 6e 67 20 73 74 61 6e | network|ing stan|
|00002ff0| 64 61 72 64 2e 0d 32 09 | 54 68 65 20 4d 61 63 54 |dard..2.|The MacT|
|00003000| 43 50 20 44 72 69 76 65 | 72 0d 54 68 65 20 4d 61 |CP Drive|r.The Ma|
|00003010| 63 54 43 50 20 64 72 69 | 76 65 72 20 69 73 20 61 |cTCP dri|ver is a|
|00003020| 20 4d 61 63 69 6e 74 6f | 73 68 20 4f 70 65 72 61 | Macinto|sh Opera|
|00003030| 74 69 6e 67 20 53 79 73 | 74 65 6d 20 64 72 69 76 |ting Sys|tem driv|
|00003040| 65 72 20 74 68 61 74 20 | 69 6d 70 6c 65 6d 65 6e |er that |implemen|
|00003050| 74 73 20 74 68 65 20 49 | 6e 74 65 72 6e 65 74 20 |ts the I|nternet |
|00003060| 50 72 6f 74 6f 63 6f 6c | 20 28 49 50 29 2c 20 55 |Protocol| (IP), U|
|00003070| 73 65 72 20 44 61 74 61 | 67 72 61 6d 20 50 72 6f |ser Data|gram Pro|
|00003080| 74 6f 63 6f 6c 20 28 55 | 44 50 29 2c 20 61 6e 64 |tocol (U|DP), and|
|00003090| 20 54 72 61 6e 73 6d 69 | 73 73 69 6f 6e 20 43 6f | Transmi|ssion Co|
|000030a0| 6e 74 72 6f 6c 20 50 72 | 6f 74 6f 63 6f 6c 20 28 |ntrol Pr|otocol (|
|000030b0| 54 43 50 29 2e 20 41 20 | 70 61 72 74 20 6f 66 20 |TCP). A |part of |
|000030c0| 74 68 65 20 4d 61 63 69 | 6e 74 6f 73 68 20 4f 70 |the Maci|ntosh Op|
|000030d0| 65 72 61 74 69 6e 67 20 | 53 79 73 74 65 6d 20 63 |erating |System c|
|000030e0| 61 6c 6c 65 64 20 74 68 | 65 20 44 65 76 69 63 65 |alled th|e Device|
|000030f0| 20 4d 61 6e 61 67 65 72 | 20 63 6f 6f 72 64 69 6e | Manager| coordin|
|00003100| 61 74 65 73 20 63 6f 6d | 6d 75 6e 69 63 61 74 69 |ates com|municati|
|00003110| 6f 6e 20 62 65 74 77 65 | 65 6e 20 61 70 70 6c 69 |on betwe|en appli|
|00003120| 63 61 74 69 6f 6e 73 20 | 61 6e 64 20 74 68 65 20 |cations |and the |
|00003130| 4d 61 63 54 43 50 20 64 | 72 69 76 65 72 2e 0d 54 |MacTCP d|river..T|
|00003140| 68 65 20 4d 61 63 54 43 | 50 20 64 72 69 76 65 72 |he MacTC|P driver|
|00003150| 20 72 65 73 69 64 65 73 | 20 69 6e 20 74 68 65 20 | resides| in the |
|00003160| 4d 61 63 69 6e 74 6f 73 | 68 20 53 79 73 74 65 6d |Macintos|h System|
|00003170| 20 46 6f 6c 64 65 72 2e | 20 41 74 20 73 74 61 72 | Folder.| At star|
|00003180| 74 75 70 20 74 69 6d 65 | 2c 20 74 68 65 20 4d 61 |tup time|, the Ma|
|00003190| 63 54 43 50 20 64 72 69 | 76 65 72 20 72 65 67 69 |cTCP dri|ver regi|
|000031a0| 73 74 65 72 73 20 69 74 | 73 65 6c 66 20 77 69 74 |sters it|self wit|
|000031b0| 68 20 74 68 65 20 44 65 | 76 69 63 65 20 4d 61 6e |h the De|vice Man|
|000031c0| 61 67 65 72 20 61 73 20 | 2e 49 50 50 2e 0d 54 68 |ager as |.IPP..Th|
|000031d0| 65 20 4d 61 63 54 43 50 | 20 64 72 69 76 65 72 20 |e MacTCP| driver |
|000031e0| 73 75 70 70 6f 72 74 73 | 20 74 68 65 20 66 6f 6c |supports| the fol|
|000031f0| 6c 6f 77 69 6e 67 20 6c | 6f 77 2d 6c 65 76 65 6c |lowing l|ow-level|
|00003200| 20 44 65 76 69 63 65 20 | 4d 61 6e 61 67 65 72 20 | Device |Manager |
|00003210| 63 61 6c 6c 73 3a 0d 6e | 09 50 42 4f 70 65 6e 0d |calls:.n|.PBOpen.|
|00003220| 6e 09 50 42 43 6f 6e 74 | 72 6f 6c 0d 6e 09 50 42 |n.PBCont|rol.n.PB|
|00003230| 43 6c 6f 73 65 0d 54 68 | 65 20 50 42 4f 70 65 6e |Close.Th|e PBOpen|
|00003240| 20 63 61 6c 6c 0d 42 65 | 66 6f 72 65 20 74 68 65 | call.Be|fore the|
|00003250| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 63 61 6e | applica|tion can|
|00003260| 20 65 78 63 68 61 6e 67 | 65 20 69 6e 66 6f 72 6d | exchang|e inform|
|00003270| 61 74 69 6f 6e 20 77 69 | 74 68 20 74 68 65 20 4d |ation wi|th the M|
|00003280| 61 63 54 43 50 20 64 72 | 69 76 65 72 2c 20 74 68 |acTCP dr|iver, th|
|00003290| 65 20 64 72 69 76 65 72 | 20 6d 75 73 74 20 62 65 |e driver| must be|
|000032a0| 20 6f 70 65 6e 65 64 20 | 75 73 69 6e 67 20 74 68 | opened |using th|
|000032b0| 65 20 44 65 76 69 63 65 | 20 4d 61 6e 61 67 65 72 |e Device| Manager|
|000032c0| 20 50 42 4f 70 65 6e 20 | 63 61 6c 6c 2c 20 77 68 | PBOpen |call, wh|
|000032d0| 69 63 68 20 6f 70 65 6e | 73 20 74 68 65 20 64 72 |ich open|s the dr|
|000032e0| 69 76 65 72 20 61 6e 64 | 20 72 65 74 75 72 6e 73 |iver and| returns|
|000032f0| 20 69 74 73 20 72 65 66 | 65 72 65 6e 63 65 20 6e | its ref|erence n|
|00003300| 75 6d 62 65 72 2e 20 41 | 6c 6c 20 73 75 62 73 65 |umber. A|ll subse|
|00003310| 71 75 65 6e 74 20 63 61 | 6c 6c 73 20 74 6f 20 74 |quent ca|lls to t|
|00003320| 68 65 20 64 72 69 76 65 | 72 20 75 73 65 20 74 68 |he drive|r use th|
|00003330| 69 73 20 72 65 66 65 72 | 65 6e 63 65 20 6e 75 6d |is refer|ence num|
|00003340| 62 65 72 2e 0d 54 68 65 | 20 4d 61 63 54 43 50 20 |ber..The| MacTCP |
|00003350| 64 72 69 76 65 72 20 75 | 73 65 73 20 74 68 65 20 |driver u|ses the |
|00003360| 49 4e 49 54 2d 33 31 20 | 6d 65 63 68 61 6e 69 73 |INIT-31 |mechanis|
|00003370| 6d 20 74 6f 20 61 75 74 | 6f 6d 61 74 69 63 61 6c |m to aut|omatical|
|00003380| 6c 79 20 69 6e 73 74 61 | 6c 6c 20 69 74 73 65 6c |ly insta|ll itsel|
|00003390| 66 20 69 6e 20 74 68 65 | 20 64 65 76 69 63 65 20 |f in the| device |
|000033a0| 74 61 62 6c 65 20 61 6e | 64 20 6c 6f 61 64 20 69 |table an|d load i|
|000033b0| 74 73 65 6c 66 20 69 6e | 74 6f 20 74 68 65 20 73 |tself in|to the s|
|000033c0| 79 73 74 65 6d 20 68 65 | 61 70 20 65 61 63 68 20 |ystem he|ap each |
|000033d0| 74 69 6d 65 20 74 68 65 | 20 6d 61 63 68 69 6e 65 |time the| machine|
|000033e0| 20 69 73 20 72 65 73 74 | 61 72 74 65 64 2e 20 41 | is rest|arted. A|
|000033f0| 74 20 6c 6f 61 64 20 74 | 69 6d 65 2c 20 61 6c 6c |t load t|ime, all|
|00003400| 20 69 6e 74 65 72 6e 61 | 6c 20 62 75 66 66 65 72 | interna|l buffer|
|00003410| 73 20 6e 65 65 64 65 64 | 20 62 79 20 74 68 65 20 |s needed| by the |
|00003420| 4d 61 63 54 43 50 20 64 | 72 69 76 65 72 20 61 72 |MacTCP d|river ar|
|00003430| 65 20 61 6c 73 6f 20 61 | 6c 6c 6f 63 61 74 65 64 |e also a|llocated|
|00003440| 20 6f 6e 20 74 68 65 20 | 73 79 73 74 65 6d 20 68 | on the |system h|
|00003450| 65 61 70 2e 20 54 68 65 | 73 65 20 62 75 66 66 65 |eap. The|se buffe|
|00003460| 72 73 20 61 72 65 20 75 | 73 65 64 20 28 61 6d 6f |rs are u|sed (amo|
|00003470| 6e 67 20 6f 74 68 65 72 | 20 74 68 69 6e 67 73 29 |ng other| things)|
|00003480| 20 74 6f 20 68 6f 6c 64 | 20 69 6e 63 6f 6d 69 6e | to hold| incomin|
|00003490| 67 20 66 72 61 67 6d 65 | 6e 74 73 20 61 77 61 69 |g fragme|nts awai|
|000034a0| 74 69 6e 67 20 72 65 61 | 73 73 65 6d 62 6c 79 20 |ting rea|ssembly |
|000034b0| 61 6e 64 20 6f 75 74 67 | 6f 69 6e 67 20 66 72 61 |and outg|oing fra|
|000034c0| 67 6d 65 6e 74 73 20 66 | 6f 6c 6c 6f 77 69 6e 67 |gments f|ollowing|
|000034d0| 20 66 72 61 67 6d 65 6e | 74 61 74 69 6f 6e 2e 20 | fragmen|tation. |
|000034e0| 54 68 65 20 61 6d 6f 75 | 6e 74 20 6f 66 20 62 75 |The amou|nt of bu|
|000034f0| 66 66 65 72 20 73 70 61 | 63 65 20 61 6c 6c 6f 63 |ffer spa|ce alloc|
|00003500| 61 74 65 64 20 69 73 20 | 62 61 73 65 64 20 6f 6e |ated is |based on|
|00003510| 20 74 68 65 20 61 6d 6f | 75 6e 74 20 6f 66 20 6d | the amo|unt of m|
|00003520| 65 6d 6f 72 79 20 69 6e | 20 74 68 65 20 6d 61 63 |emory in| the mac|
|00003530| 68 69 6e 65 2e 0d 54 68 | 65 20 4d 61 63 54 43 50 |hine..Th|e MacTCP|
|00003540| 20 64 72 69 76 65 72 20 | 70 65 72 66 6f 72 6d 73 | driver |performs|
|00003550| 20 69 74 73 20 69 6e 69 | 74 69 61 6c 69 7a 61 74 | its ini|tializat|
|00003560| 69 6f 6e 20 73 65 71 75 | 65 6e 63 65 20 61 74 20 |ion sequ|ence at |
|00003570| 50 42 4f 70 65 6e 20 74 | 69 6d 65 2e 20 54 68 65 |PBOpen t|ime. The|
|00003580| 20 69 6e 69 74 69 61 6c | 69 7a 61 74 69 6f 6e 20 | initial|ization |
|00003590| 73 65 71 75 65 6e 63 65 | 20 69 6e 63 6c 75 64 65 |sequence| include|
|000035a0| 73 20 69 6e 69 74 69 61 | 6c 69 7a 69 6e 67 20 74 |s initia|lizing t|
|000035b0| 68 65 20 6c 6f 63 61 6c | 20 6e 65 74 77 6f 72 6b |he local| network|
|000035c0| 20 68 61 6e 64 6c 65 72 | 2c 20 73 65 74 74 69 6e | handler|, settin|
|000035d0| 67 20 69 74 73 20 6c 6f | 63 61 6c 20 61 64 64 72 |g its lo|cal addr|
|000035e0| 65 73 73 20 61 6e 64 20 | 73 75 62 6e 65 74 20 6d |ess and |subnet m|
|000035f0| 61 73 6b 2c 20 76 65 72 | 69 66 79 69 6e 67 20 74 |ask, ver|ifying t|
|00003600| 68 61 74 20 74 68 69 73 | 20 61 64 64 72 65 73 73 |hat this| address|
|00003610| 20 69 73 20 72 65 61 73 | 6f 6e 61 62 6c 65 20 61 | is reas|onable a|
|00003620| 6e 64 20 75 6e 75 73 65 | 64 2c 20 61 6e 64 20 73 |nd unuse|d, and s|
|00003630| 74 61 72 74 69 6e 67 20 | 75 70 20 74 68 65 20 69 |tarting |up the i|
|00003640| 6e 74 65 72 6e 61 6c 20 | 54 43 50 2f 49 50 2f 55 |nternal |TCP/IP/U|
|00003650| 44 50 20 70 72 6f 74 6f | 63 6f 6c 20 6d 61 63 68 |DP proto|col mach|
|00003660| 69 6e 65 72 79 2e 20 50 | 42 4f 70 65 6e 20 72 65 |inery. P|BOpen re|
|00003670| 74 75 72 6e 73 20 77 69 | 74 68 20 61 6e 20 65 72 |turns wi|th an er|
|00003680| 72 6f 72 20 63 6f 64 65 | 20 69 66 20 61 6e 79 20 |ror code| if any |
|00003690| 73 74 65 70 20 69 6e 20 | 74 68 69 73 20 70 72 6f |step in |this pro|
|000036a0| 63 65 73 73 20 66 61 69 | 6c 73 2e 20 49 6e 20 61 |cess fai|ls. In a|
|000036b0| 6c 6d 6f 73 74 20 61 6c | 6c 20 63 61 73 65 73 2c |lmost al|l cases,|
|000036c0| 20 69 66 20 50 42 4f 70 | 65 6e 20 66 61 69 6c 73 | if PBOp|en fails|
|000036d0| 2c 20 74 68 65 20 64 72 | 69 76 65 72 20 6d 75 73 |, the dr|iver mus|
|000036e0| 74 20 62 65 20 72 65 63 | 6f 6e 66 69 67 75 72 65 |t be rec|onfigure|
|000036f0| 64 20 61 6e 64 20 74 68 | 65 20 73 79 73 74 65 6d |d and th|e system|
|00003700| 20 74 68 65 6e 20 72 65 | 73 74 61 72 74 65 64 20 | then re|started |
|00003710| 74 6f 20 63 6c 65 61 72 | 20 74 68 65 20 70 72 6f |to clear| the pro|
|00003720| 62 6c 65 6d 2e 20 56 65 | 72 79 20 66 65 77 20 63 |blem. Ve|ry few c|
|00003730| 69 72 63 75 6d 73 74 61 | 6e 63 65 73 20 65 78 69 |ircumsta|nces exi|
|00003740| 73 74 20 77 68 65 72 65 | 20 74 72 61 6e 73 69 74 |st where| transit|
|00003750| 6f 72 79 20 70 72 6f 62 | 6c 65 6d 73 20 63 61 75 |ory prob|lems cau|
|00003760| 73 65 20 50 42 4f 70 65 | 6e 20 74 6f 20 66 61 69 |se PBOpe|n to fai|
|00003770| 6c 2e 0d 55 73 65 20 74 | 68 65 20 72 65 66 65 72 |l..Use t|he refer|
|00003780| 65 6e 63 65 20 6e 75 6d | 62 65 72 20 72 65 74 75 |ence num|ber retu|
|00003790| 72 6e 65 64 20 66 72 6f | 6d 20 74 68 65 20 50 42 |rned fro|m the PB|
|000037a0| 4f 70 65 6e 20 63 61 6c | 6c 20 69 6e 20 61 6c 6c |Open cal|l in all|
|000037b0| 20 73 75 62 73 65 71 75 | 65 6e 74 20 50 42 43 6f | subsequ|ent PBCo|
|000037c0| 6e 74 72 6f 6c 20 63 61 | 6c 6c 73 20 74 6f 20 74 |ntrol ca|lls to t|
|000037d0| 68 69 73 20 64 72 69 76 | 65 2e 20 41 6c 73 6f 20 |his driv|e. Also |
|000037e0| 61 73 73 69 67 6e 20 74 | 68 69 73 20 76 61 6c 75 |assign t|his valu|
|000037f0| 65 20 74 6f 20 74 68 65 | 20 69 6f 43 52 65 66 4e |e to the| ioCRefN|
|00003800| 75 6d 20 66 69 65 6c 64 | 2e 0d 42 65 63 61 75 73 |um field|..Becaus|
|00003810| 65 20 6f 66 20 74 68 65 | 20 63 6f 6d 70 6c 65 78 |e of the| complex|
|00003820| 69 74 79 20 6f 66 20 69 | 6e 69 74 69 61 6c 69 7a |ity of i|nitializ|
|00003830| 69 6e 67 20 74 68 65 20 | 4d 61 63 54 43 50 20 64 |ing the |MacTCP d|
|00003840| 72 69 76 65 72 2c 20 50 | 42 4f 70 65 6e 20 63 61 |river, P|BOpen ca|
|00003850| 6e 20 72 65 74 75 72 6e | 20 65 72 72 6f 72 73 20 |n return| errors |
|00003860| 66 72 6f 6d 20 6d 61 6e | 79 20 70 61 72 74 73 20 |from man|y parts |
|00003870| 6f 66 20 74 68 65 20 73 | 79 73 74 65 6d 2c 20 69 |of the s|ystem, i|
|00003880| 6e 63 6c 75 64 69 6e 67 | 20 74 68 65 20 52 65 73 |ncluding| the Res|
|00003890| 6f 75 72 63 65 20 4d 61 | 6e 61 67 65 72 2c 20 44 |ource Ma|nager, D|
|000038a0| 65 76 69 63 65 20 4d 61 | 6e 61 67 65 72 2c 20 46 |evice Ma|nager, F|
|000038b0| 69 6c 65 20 4d 61 6e 61 | 67 65 72 2c 20 53 6c 6f |ile Mana|ger, Slo|
|000038c0| 74 20 4d 61 6e 61 67 65 | 72 2c 20 61 6e 64 20 41 |t Manage|r, and A|
|000038d0| 70 70 6c 65 54 61 6c 6b | 20 64 72 69 76 65 72 2e |ppleTalk| driver.|
|000038e0| 0d 54 68 65 20 50 42 43 | 6f 6e 74 72 6f 6c 20 63 |.The PBC|ontrol c|
|000038f0| 61 6c 6c 0d 54 68 65 20 | 44 65 76 69 63 65 20 4d |all.The |Device M|
|00003900| 61 6e 61 67 65 72 20 50 | 42 43 6f 6e 74 72 6f 6c |anager P|BControl|
|00003910| 20 63 61 6c 6c 20 73 65 | 6e 64 73 20 63 6f 6e 74 | call se|nds cont|
|00003920| 72 6f 6c 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |rol info|rmation |
|00003930| 69 6e 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |in the f|ollowing|
|00003940| 20 70 61 72 61 6d 65 74 | 65 72 20 62 6c 6f 63 6b | paramet|er block|
|00003950| 20 74 6f 20 74 68 65 20 | 64 72 69 76 65 72 3a 0d | to the |driver:.|
|00003960| 73 74 72 75 63 74 20 43 | 6e 74 72 6c 50 61 72 61 |struct C|ntrlPara|
|00003970| 6d 20 7b 0d 09 73 74 72 | 75 63 74 20 51 45 6c 65 |m {..str|uct QEle|
|00003980| 6d 20 2a 71 4c 69 6e 6b | 3b 0d 09 73 68 6f 72 74 |m *qLink|;..short|
|00003990| 20 71 54 79 70 65 3b 0d | 09 73 68 6f 72 74 20 69 | qType;.|.short i|
|000039a0| 6f 54 72 61 70 3b 0d 09 | 50 74 72 20 69 6f 43 6d |oTrap;..|Ptr ioCm|
|000039b0| 64 41 64 64 72 3b 0d 09 | 50 72 6f 63 50 74 72 20 |dAddr;..|ProcPtr |
|000039c0| 69 6f 43 6f 6d 70 6c 65 | 74 69 6f 6e 3b 0d 09 4f |ioComple|tion;..O|
|000039d0| 53 45 72 72 20 69 6f 52 | 65 73 75 6c 74 3b 0d 09 |SErr ioR|esult;..|
|000039e0| 63 68 61 72 20 2a 69 6f | 4e 61 6d 65 50 74 72 3b |char *io|NamePtr;|
|000039f0| 0d 09 73 68 6f 72 74 20 | 69 6f 56 52 65 66 4e 75 |..short |ioVRefNu|
|00003a00| 6d 3b 0d 09 73 68 6f 72 | 74 20 69 6f 43 52 65 66 |m;..shor|t ioCRef|
|00003a10| 4e 75 6d 3b 0d 09 73 68 | 6f 72 74 20 63 73 43 6f |Num;..sh|ort csCo|
|00003a20| 64 65 3b 0d 09 73 68 6f | 72 74 20 63 73 50 61 72 |de;..sho|rt csPar|
|00003a30| 61 6d 5b 31 31 5d 3b 0d | 7d 0d 49 6e 20 74 68 69 |am[11];.|}.In thi|
|00003a40| 73 20 70 61 72 61 6d 65 | 74 65 72 20 62 6c 6f 63 |s parame|ter bloc|
|00003a50| 6b 20 63 73 43 6f 64 65 | 20 73 70 65 63 69 66 69 |k csCode| specifi|
|00003a60| 65 73 20 74 68 65 20 74 | 79 70 65 20 6f 66 20 69 |es the t|ype of i|
|00003a70| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 73 65 6e 74 2e |nformati|on sent.|
|00003a80| 20 54 68 65 20 4d 61 63 | 54 43 50 20 64 72 69 76 | The Mac|TCP driv|
|00003a90| 65 72 20 64 65 63 69 64 | 65 73 20 77 68 61 74 20 |er decid|es what |
|00003aa0| 74 6f 20 64 6f 20 62 61 | 73 65 64 20 6f 6e 20 74 |to do ba|sed on t|
|00003ab0| 68 65 20 70 72 6f 63 65 | 64 75 72 65 20 6e 75 6d |he proce|dure num|
|00003ac0| 62 65 72 20 73 70 65 63 | 69 66 69 65 64 20 62 79 |ber spec|ified by|
|00003ad0| 20 63 73 43 6f 64 65 20 | 28 74 68 65 20 41 70 70 | csCode |(the App|
|00003ae0| 65 6e 64 69 78 20 6c 69 | 73 74 73 20 70 72 6f 63 |endix li|sts proc|
|00003af0| 65 64 75 72 65 20 6e 75 | 6d 62 65 72 73 29 2e 0d |edure nu|mbers)..|
|00003b00| 41 6c 6c 20 55 44 50 20 | 61 6e 64 20 54 43 50 20 |All UDP |and TCP |
|00003b10| 72 6f 75 74 69 6e 65 73 | 20 64 6f 63 75 6d 65 6e |routines| documen|
|00003b20| 74 65 64 20 69 6e 20 74 | 68 69 73 20 67 75 69 64 |ted in t|his guid|
|00003b30| 65 20 61 72 65 20 69 6d | 70 6c 65 6d 65 6e 74 65 |e are im|plemente|
|00003b40| 64 20 61 73 20 44 65 76 | 69 63 65 20 4d 61 6e 61 |d as Dev|ice Mana|
|00003b50| 67 65 72 20 43 6f 6e 74 | 72 6f 6c 20 63 61 6c 6c |ger Cont|rol call|
|00003b60| 73 2e 20 41 6c 6c 20 4d | 61 63 54 43 50 20 72 6f |s. All M|acTCP ro|
|00003b70| 75 74 69 6e 65 73 20 73 | 75 70 70 6f 72 74 20 62 |utines s|upport b|
|00003b80| 6f 74 68 20 73 79 6e 63 | 68 72 6f 6e 6f 75 73 20 |oth sync|hronous |
|00003b90| 61 6e 64 20 61 73 79 6e | 63 68 72 6f 6e 6f 75 73 |and asyn|chronous|
|00003ba0| 20 6d 6f 64 65 73 2e 0d | 49 66 20 61 20 73 79 6e | modes..|If a syn|
|00003bb0| 63 68 72 6f 6e 6f 75 73 | 20 63 61 6c 6c 20 69 73 |chronous| call is|
|00003bc0| 20 6d 61 64 65 2c 20 74 | 68 65 20 61 70 70 6c 69 | made, t|he appli|
|00003bd0| 63 61 74 69 6f 6e 20 63 | 61 6e d5 74 20 63 6f 6e |cation c|an.t con|
|00003be0| 74 69 6e 75 65 20 75 6e | 74 69 6c 20 74 68 65 20 |tinue un|til the |
|00003bf0| 63 61 6c 6c 20 69 73 20 | 63 6f 6d 70 6c 65 74 65 |call is |complete|
|00003c00| 64 2e 20 57 68 65 6e 20 | 63 6f 6e 74 72 6f 6c 20 |d. When |control |
|00003c10| 69 73 20 72 65 74 75 72 | 6e 65 64 20 74 6f 20 74 |is retur|ned to t|
|00003c20| 68 65 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 2c 20 |he appli|cation, |
|00003c30| 74 68 65 20 72 65 73 75 | 6c 74 20 63 6f 64 65 20 |the resu|lt code |
|00003c40| 69 6e 20 74 68 65 20 70 | 61 72 61 6d 65 74 65 72 |in the p|arameter|
|00003c50| 20 62 6c 6f 63 6b 20 69 | 73 20 73 65 74 20 69 6e | block i|s set in|
|00003c60| 64 69 63 61 74 69 6e 67 | 20 74 68 65 20 73 75 63 |dicating| the suc|
|00003c70| 63 65 73 73 20 6f 72 20 | 66 61 69 6c 75 72 65 20 |cess or |failure |
|00003c80| 6f 66 20 74 68 65 20 63 | 61 6c 6c 2e 20 0d 49 66 |of the c|all. .If|
|00003c90| 20 74 68 65 20 63 61 6c | 6c 20 69 73 20 61 73 79 | the cal|l is asy|
|00003ca0| 6e 63 68 72 6f 6e 6f 75 | 73 2c 20 74 68 65 20 49 |nchronou|s, the I|
|00003cb0| 2f 4f 20 72 65 71 75 65 | 73 74 20 69 73 20 70 6c |/O reque|st is pl|
|00003cc0| 61 63 65 64 20 6f 6e 20 | 74 68 65 20 64 72 69 76 |aced on |the driv|
|00003cd0| 65 72 20 49 2f 4f 20 71 | 75 65 75 65 2c 20 61 6e |er I/O q|ueue, an|
|00003ce0| 64 20 63 6f 6e 74 72 6f | 6c 20 69 73 20 72 65 74 |d contro|l is ret|
|00003cf0| 75 72 6e 65 64 20 74 6f | 20 74 68 65 20 63 61 6c |urned to| the cal|
|00003d00| 6c 69 6e 67 20 70 72 6f | 67 72 61 6d 20 61 6c 6d |ling pro|gram alm|
|00003d10| 6f 73 74 20 69 6d 6d 65 | 64 69 61 74 65 6c 79 2e |ost imme|diately.|
|00003d20| 20 57 68 69 6c 65 20 72 | 65 71 75 65 73 74 73 20 | While r|equests |
|00003d30| 61 72 65 20 74 61 6b 65 | 6e 20 66 72 6f 6d 20 74 |are take|n from t|
|00003d40| 68 65 20 64 72 69 76 65 | 72 20 49 2f 4f 20 71 75 |he drive|r I/O qu|
|00003d50| 65 75 65 20 6f 6e 65 20 | 61 74 20 61 20 74 69 6d |eue one |at a tim|
|00003d60| 65 20 61 6e 64 20 70 72 | 6f 63 65 73 73 65 64 2c |e and pr|ocessed,|
|00003d70| 20 74 68 65 20 61 70 70 | 6c 69 63 61 74 69 6f 6e | the app|lication|
|00003d80| 20 69 73 20 66 72 65 65 | 20 74 6f 20 70 65 72 66 | is free| to perf|
|00003d90| 6f 72 6d 20 6f 74 68 65 | 72 20 74 61 73 6b 73 2e |orm othe|r tasks.|
|00003da0| 20 54 68 65 20 61 70 70 | 6c 69 63 61 74 69 6f 6e | The app|lication|
|00003db0| 20 68 61 73 20 74 77 6f | 20 77 61 79 73 20 6f 66 | has two| ways of|
|00003dc0| 20 6b 6e 6f 77 69 6e 67 | 20 77 68 65 6e 20 74 68 | knowing| when th|
|00003dd0| 65 20 63 61 6c 6c 20 68 | 61 73 20 62 65 65 6e 20 |e call h|as been |
|00003de0| 63 6f 6d 70 6c 65 74 65 | 64 3a 0d 6e 09 42 79 20 |complete|d:.n.By |
|00003df0| 70 6f 6c 6c 69 6e 67 20 | 74 68 65 20 69 6f 52 65 |polling |the ioRe|
|00003e00| 73 75 6c 74 20 66 69 65 | 6c 64 20 69 6e 20 74 68 |sult fie|ld in th|
|00003e10| 65 20 70 61 72 61 6d 65 | 74 65 72 20 62 6c 6f 63 |e parame|ter bloc|
|00003e20| 6b 2e 20 57 68 65 6e 20 | 74 68 69 73 20 76 61 6c |k. When |this val|
|00003e30| 75 65 20 63 68 61 6e 67 | 65 73 20 66 72 6f 6d 20 |ue chang|es from |
|00003e40| 49 6e 50 72 6f 67 72 65 | 73 73 20 74 6f 20 73 6f |InProgre|ss to so|
|00003e50| 6d 65 20 6f 74 68 65 72 | 20 76 61 6c 75 65 2c 20 |me other| value, |
|00003e60| 74 68 65 20 63 61 6c 6c | 20 68 61 73 20 62 65 65 |the call| has bee|
|00003e70| 6e 20 63 6f 6d 70 6c 65 | 74 65 64 2e 0d 6e 09 42 |n comple|ted..n.B|
|00003e80| 79 20 73 70 65 63 69 66 | 79 69 6e 67 20 61 6e 20 |y specif|ying an |
|00003e90| 49 2f 4f 20 63 6f 6d 70 | 6c 65 74 69 6f 6e 20 72 |I/O comp|letion r|
|00003ea0| 6f 75 74 69 6e 65 20 74 | 6f 20 62 65 20 63 61 6c |outine t|o be cal|
|00003eb0| 6c 65 64 20 77 68 65 6e | 20 74 68 65 20 72 65 71 |led when| the req|
|00003ec0| 75 65 73 74 65 64 20 6f | 70 65 72 61 74 69 6f 6e |uested o|peration|
|00003ed0| 20 69 73 20 63 6f 6d 70 | 6c 65 74 65 2e 0d 54 68 | is comp|lete..Th|
|00003ee0| 65 20 69 6f 43 6f 6d 70 | 6c 65 74 69 6f 6e 20 66 |e ioComp|letion f|
|00003ef0| 69 65 6c 64 20 69 6e 20 | 74 68 65 20 70 61 72 61 |ield in |the para|
|00003f00| 6d 65 74 65 72 20 62 6c | 6f 63 6b 20 63 6f 6e 74 |meter bl|ock cont|
|00003f10| 61 69 6e 73 20 61 20 70 | 6f 69 6e 74 65 72 20 74 |ains a p|ointer t|
|00003f20| 6f 20 61 20 63 6f 6d 70 | 6c 65 74 69 6f 6e 20 72 |o a comp|letion r|
|00003f30| 6f 75 74 69 6e 65 20 74 | 6f 20 62 65 20 65 78 65 |outine t|o be exe|
|00003f40| 63 75 74 65 64 20 61 74 | 20 74 68 65 20 65 6e 64 |cuted at| the end|
|00003f50| 20 6f 66 20 61 6e 20 61 | 73 79 6e 63 68 72 6f 6e | of an a|synchron|
|00003f60| 6f 75 73 20 63 61 6c 6c | 2e 20 54 68 65 20 69 6f |ous call|. The io|
|00003f70| 43 6f 6d 70 6c 65 74 69 | 6f 6e 20 66 69 65 6c 64 |Completi|on field|
|00003f80| 20 73 68 6f 75 6c 64 20 | 62 65 20 4e 49 4c 20 66 | should |be NIL f|
|00003f90| 6f 72 20 61 73 79 6e 63 | 68 72 6f 6e 6f 75 73 20 |or async|hronous |
|00003fa0| 63 61 6c 6c 73 20 77 69 | 74 68 20 6e 6f 20 63 6f |calls wi|th no co|
|00003fb0| 6d 70 6c 65 74 69 6f 6e | 20 72 6f 75 74 69 6e 65 |mpletion| routine|
|00003fc0| 20 61 6e 64 20 69 73 20 | 61 75 74 6f 6d 61 74 69 | and is |automati|
|00003fd0| 63 61 6c 6c 79 20 73 65 | 74 20 74 6f 20 4e 49 4c |cally se|t to NIL|
|00003fe0| 20 66 6f 72 20 61 6c 6c | 20 73 79 6e 63 68 72 6f | for all| synchro|
|00003ff0| 6e 6f 75 73 20 63 61 6c | 6c 73 2e 0d 54 68 65 20 |nous cal|ls..The |
|00004000| 64 72 69 76 65 72 20 75 | 73 65 73 20 74 68 65 20 |driver u|ses the |
|00004010| 69 6f 4e 61 6d 65 50 74 | 72 20 61 6e 64 20 69 6f |ioNamePt|r and io|
|00004020| 56 52 65 66 4e 75 6d 20 | 66 69 65 6c 64 73 20 69 |VRefNum |fields i|
|00004030| 6e 74 65 72 6e 61 6c 6c | 79 2e 0d 45 61 63 68 20 |nternall|y..Each |
|00004040| 72 6f 75 74 69 6e 65 20 | 64 65 73 63 72 69 70 74 |routine |descript|
|00004050| 69 6f 6e 20 69 6e 63 6c | 75 64 65 73 20 61 20 70 |ion incl|udes a p|
|00004060| 61 72 61 6d 65 74 65 72 | 20 62 6c 6f 63 6b 20 66 |arameter| block f|
|00004070| 6f 72 6d 61 74 2e 20 54 | 68 65 20 6e 75 6d 62 65 |ormat. T|he numbe|
|00004080| 72 20 6e 65 78 74 20 74 | 6f 20 65 61 63 68 20 66 |r next t|o each f|
|00004090| 69 65 6c 64 20 6e 61 6d | 65 20 69 6e 64 69 63 61 |ield nam|e indica|
|000040a0| 74 65 73 20 74 68 65 20 | 62 79 74 65 20 6f 66 66 |tes the |byte off|
|000040b0| 73 65 74 20 6f 66 20 74 | 68 65 20 66 69 65 6c 64 |set of t|he field|
|000040c0| 20 66 72 6f 6d 20 74 68 | 65 20 73 74 61 72 74 20 | from th|e start |
|000040d0| 6f 66 20 74 68 65 20 70 | 61 72 61 6d 65 74 65 72 |of the p|arameter|
|000040e0| 20 62 6c 6f 63 6b 20 70 | 6f 69 6e 74 65 64 20 74 | block p|ointed t|
|000040f0| 6f 20 62 79 20 41 30 2e | 20 41 6e 20 61 72 72 6f |o by A0.| An arro|
|00004100| 77 20 6e 65 78 74 20 74 | 6f 20 65 61 63 68 20 70 |w next t|o each p|
|00004110| 61 72 61 6d 65 74 65 72 | 20 6e 61 6d 65 20 69 6e |arameter| name in|
|00004120| 64 69 63 61 74 65 73 20 | 77 68 65 74 68 65 72 20 |dicates |whether |
|00004130| 69 74 d5 73 20 61 6e 20 | 69 6e 70 75 74 2c 20 6f |it.s an |input, o|
|00004140| 75 74 70 75 74 2c 20 6f | 72 20 69 6e 70 75 74 2f |utput, o|r input/|
|00004150| 6f 75 74 70 75 74 20 70 | 61 72 61 6d 65 74 65 72 |output p|arameter|
|00004160| 3a 0d 41 72 72 6f 77 09 | 4d 65 61 6e 69 6e 67 0d |:.Arrow.|Meaning.|
|00004170| ae 09 50 61 72 61 6d 65 | 74 65 72 20 69 73 20 70 |..Parame|ter is p|
|00004180| 61 73 73 65 64 20 74 6f | 20 74 68 65 20 72 6f 75 |assed to| the rou|
|00004190| 74 69 6e 65 2e 0d ac 09 | 50 61 72 61 6d 65 74 65 |tine....|Paramete|
|000041a0| 72 20 69 73 20 72 65 74 | 75 72 6e 65 64 20 62 79 |r is ret|urned by|
|000041b0| 20 74 68 65 20 72 6f 75 | 74 69 6e 65 2e 0d ab 09 | the rou|tine....|
|000041c0| 50 61 72 61 6d 65 74 65 | 72 20 69 73 20 70 61 73 |Paramete|r is pas|
|000041d0| 73 65 64 20 74 6f 20 61 | 6e 64 20 72 65 74 75 72 |sed to a|nd retur|
|000041e0| 6e 65 64 20 62 79 20 74 | 68 65 20 72 6f 75 74 69 |ned by t|he routi|
|000041f0| 6e 65 2e 0d 41 6c 6c 20 | 44 65 76 69 63 65 20 4d |ne..All |Device M|
|00004200| 61 6e 61 67 65 72 20 43 | 6f 6e 74 72 6f 6c 20 63 |anager C|ontrol c|
|00004210| 61 6c 6c 73 20 72 65 74 | 75 72 6e 20 61 6e 20 69 |alls ret|urn an i|
|00004220| 6e 74 65 67 65 72 20 72 | 65 73 75 6c 74 20 63 6f |nteger r|esult co|
|00004230| 64 65 20 6f 66 20 74 79 | 70 65 20 4f 53 45 72 72 |de of ty|pe OSErr|
|00004240| 20 69 6e 20 74 68 65 20 | 69 6f 52 65 73 75 6c 74 | in the |ioResult|
|00004250| 20 66 69 65 6c 64 20 6f | 66 20 74 68 65 20 49 2f | field o|f the I/|
|00004260| 4f 20 70 61 72 61 6d 65 | 74 65 72 20 62 6c 6f 63 |O parame|ter bloc|
|00004270| 6b 2e 20 45 61 63 68 20 | 72 6f 75 74 69 6e 65 20 |k. Each |routine |
|00004280| 64 65 73 63 72 69 70 74 | 69 6f 6e 20 6c 69 73 74 |descript|ion list|
|00004290| 73 20 61 6c 6c 20 6f 66 | 20 74 68 65 20 61 70 70 |s all of| the app|
|000042a0| 6c 69 63 61 62 6c 65 20 | 72 65 73 75 6c 74 20 63 |licable |result c|
|000042b0| 6f 64 65 73 20 67 65 6e | 65 72 61 74 65 64 20 62 |odes gen|erated b|
|000042c0| 79 20 74 68 65 20 4d 61 | 63 54 43 50 20 64 72 69 |y the Ma|cTCP dri|
|000042d0| 76 65 72 2c 20 61 6c 6f | 6e 67 20 77 69 74 68 20 |ver, alo|ng with |
|000042e0| 61 20 73 68 6f 72 74 20 | 64 65 73 63 72 69 70 74 |a short |descript|
|000042f0| 69 6f 6e 20 6f 66 20 77 | 68 61 74 20 74 68 65 20 |ion of w|hat the |
|00004300| 72 65 73 75 6c 74 20 63 | 6f 64 65 20 6d 65 61 6e |result c|ode mean|
|00004310| 73 2e 0d 54 68 65 20 50 | 42 43 6c 6f 73 65 20 63 |s..The P|BClose c|
|00004320| 61 6c 6c 0d 54 68 65 20 | 61 70 70 6c 69 63 61 74 |all.The |applicat|
|00004330| 69 6f 6e 20 73 68 6f 75 | 6c 64 20 6e 6f 74 20 69 |ion shou|ld not i|
|00004340| 73 73 75 65 20 61 20 50 | 42 43 6c 6f 73 65 20 63 |ssue a P|BClose c|
|00004350| 61 6c 6c 20 74 6f 20 74 | 68 65 20 4d 61 63 54 43 |all to t|he MacTC|
|00004360| 50 20 64 72 69 76 65 72 | 2e 20 42 65 63 61 75 73 |P driver|. Becaus|
|00004370| 65 20 74 68 65 20 64 72 | 69 76 65 72 20 63 61 6e |e the dr|iver can|
|00004380| 20 62 65 20 73 68 61 72 | 65 64 20 62 79 20 61 20 | be shar|ed by a |
|00004390| 76 61 72 69 65 74 79 20 | 6f 66 20 61 70 70 6c 69 |variety |of appli|
|000043a0| 63 61 74 69 6f 6e 73 2c | 20 6f 6e 63 65 20 69 6e |cations,| once in|
|000043b0| 69 74 69 61 6c 69 7a 65 | 64 2c 20 69 74 20 6e 65 |itialize|d, it ne|
|000043c0| 76 65 72 20 73 74 6f 70 | 73 20 6f 70 65 72 61 74 |ver stop|s operat|
|000043d0| 69 6f 6e 20 75 6e 74 69 | 6c 20 74 68 65 20 6d 61 |ion unti|l the ma|
|000043e0| 63 68 69 6e 65 20 69 73 | 20 72 65 73 74 61 72 74 |chine is| restart|
|000043f0| 65 64 2e 20 50 42 43 6c | 6f 73 65 20 72 65 74 75 |ed. PBCl|ose retu|
|00004400| 72 6e 73 20 61 20 63 6c | 6f 73 65 45 72 72 20 65 |rns a cl|oseErr e|
|00004410| 72 72 6f 72 20 63 6f 64 | 65 2e 0d 54 68 65 20 47 |rror cod|e..The G|
|00004420| 65 73 74 61 6c 74 20 63 | 61 6c 6c 0d 0d 54 68 65 |estalt c|all..The|
|00004430| 20 47 65 73 74 61 6c 74 | 20 63 61 6c 6c 20 69 73 | Gestalt| call is|
|00004440| 20 75 73 65 64 20 74 6f | 20 6f 62 74 61 69 6e 20 | used to| obtain |
|00004450| 4d 61 63 54 43 50 20 64 | 72 69 76 65 72 20 76 65 |MacTCP d|river ve|
|00004460| 72 73 69 6f 6e 20 69 6e | 66 6f 72 6d 61 74 69 6f |rsion in|formatio|
|00004470| 6e 20 28 73 65 65 20 74 | 68 65 20 63 68 61 70 74 |n (see t|he chapt|
|00004480| 65 72 20 d2 43 6f 6d 70 | 61 74 69 62 69 6c 69 74 |er .Comp|atibilit|
|00004490| 79 20 47 75 69 64 65 6c | 69 6e 65 73 d3 20 69 6e |y Guidel|ines. in|
|000044a0| 20 49 6e 73 69 64 65 20 | 4d 61 63 69 6e 74 6f 73 | Inside |Macintos|
|000044b0| 68 2c 20 56 6f 6c 75 6d | 65 20 56 49 29 2e 20 54 |h, Volum|e VI). T|
|000044c0| 6f 20 6d 61 6b 65 20 74 | 68 65 20 47 65 73 74 61 |o make t|he Gesta|
|000044d0| 6c 74 20 63 61 6c 6c 2c | 20 75 73 65 20 74 68 65 |lt call,| use the|
|000044e0| 20 6d 74 63 70 20 73 65 | 6c 65 63 74 6f 72 2e 20 | mtcp se|lector. |
|000044f0| 49 66 20 79 6f 75 20 61 | 72 65 20 75 73 69 6e 67 |If you a|re using|
|00004500| 20 4d 61 63 54 43 50 20 | 64 72 69 76 65 72 20 76 | MacTCP |driver v|
|00004510| 65 72 73 69 6f 6e 20 31 | 2e 31 2c 20 61 20 76 61 |ersion 1|.1, a va|
|00004520| 6c 75 65 20 6f 66 20 31 | 20 69 73 20 72 65 74 75 |lue of 1| is retu|
|00004530| 72 6e 65 64 20 69 6e 20 | 74 68 65 20 72 65 73 70 |rned in |the resp|
|00004540| 6f 6e 73 65 20 66 69 65 | 6c 64 20 6f 66 20 74 68 |onse fie|ld of th|
|00004550| 65 20 47 65 73 74 61 6c | 74 20 63 61 6c 6c 2e 20 |e Gestal|t call. |
|00004560| 49 66 20 79 75 20 61 72 | 65 20 75 73 69 6e 67 20 |If yu ar|e using |
|00004570| 76 65 72 73 69 6f 6e 20 | 31 2e 31 2e 31 2c 20 61 |version |1.1.1, a|
|00004580| 20 76 61 6c 75 65 20 6f | 66 20 32 20 69 73 20 72 | value o|f 2 is r|
|00004590| 65 74 75 72 6e 65 64 2e | 20 49 66 20 79 6f 75 20 |eturned.| If you |
|000045a0| 61 72 65 20 75 73 69 6e | 67 20 76 65 72 73 69 6f |are usin|g versio|
|000045b0| 6e 20 32 2e 30 2c 20 61 | 20 76 61 6c 75 65 20 6f |n 2.0, a| value o|
|000045c0| 66 20 33 20 69 73 20 72 | 65 74 75 72 6e 65 64 2e |f 3 is r|eturned.|
|000045d0| 20 41 20 76 61 6c 75 65 | 20 6f 66 20 30 20 69 73 | A value| of 0 is|
|000045e0| 20 72 65 74 75 72 6e 65 | 64 20 69 66 20 74 68 65 | returne|d if the|
|000045f0| 20 64 72 69 76 65 72 20 | 69 73 20 6e 6f 74 20 6f | driver |is not o|
|00004600| 70 65 6e 65 64 2e 0d 49 | 6d 70 6c 65 6d 65 6e 74 |pened..I|mplement|
|00004610| 61 74 69 6f 6e 20 6e 6f | 74 65 73 0d 54 68 69 73 |ation no|tes.This|
|00004620| 20 73 65 63 74 69 6f 6e | 20 64 65 73 63 72 69 62 | section| describ|
|00004630| 65 73 20 69 6e 74 65 72 | 6e 61 6c 20 61 6c 67 6f |es inter|nal algo|
|00004640| 72 69 74 68 6d 73 20 61 | 6e 64 20 64 65 63 69 73 |rithms a|nd decis|
|00004650| 69 6f 6e 73 20 6d 61 64 | 65 20 62 79 20 74 68 65 |ions mad|e by the|
|00004660| 20 4d 61 63 54 43 50 20 | 64 72 69 76 65 72 2e 0d | MacTCP |driver..|
|00004670| 46 72 61 67 6d 65 6e 74 | 61 74 69 6f 6e 20 61 6e |Fragment|ation an|
|00004680| 64 20 72 65 61 73 73 65 | 6d 62 6c 79 0d 54 68 65 |d reasse|mbly.The|
|00004690| 20 49 6e 74 65 72 6e 65 | 74 20 50 72 6f 74 6f 63 | Interne|t Protoc|
|000046a0| 6f 6c 20 28 49 50 29 20 | 68 61 73 20 74 68 65 20 |ol (IP) |has the |
|000046b0| 61 62 69 6c 69 74 79 20 | 74 6f 20 66 72 61 67 6d |ability |to fragm|
|000046c0| 65 6e 74 20 61 20 70 61 | 63 6b 65 74 20 73 6f 20 |ent a pa|cket so |
|000046d0| 74 68 61 74 20 69 74 20 | 63 61 6e 20 62 65 20 73 |that it |can be s|
|000046e0| 65 6e 74 20 61 63 72 6f | 73 73 20 61 20 6e 65 74 |ent acro|ss a net|
|000046f0| 77 6f 72 6b 20 77 69 74 | 68 20 61 20 73 6d 61 6c |work wit|h a smal|
|00004700| 6c 20 6d 61 78 69 6d 75 | 6d 20 74 72 61 6e 73 66 |l maximu|m transf|
|00004710| 65 72 20 75 6e 69 74 20 | 28 4d 54 55 29 2e 20 54 |er unit |(MTU). T|
|00004720| 68 65 20 66 72 61 67 6d | 65 6e 74 73 20 61 72 65 |he fragm|ents are|
|00004730| 20 72 65 61 73 73 65 6d | 62 6c 65 64 20 61 73 20 | reassem|bled as |
|00004740| 74 68 65 79 20 61 72 72 | 69 76 65 20 61 74 20 74 |they arr|ive at t|
|00004750| 68 65 20 64 65 73 74 69 | 6e 61 74 69 6f 6e 2e 20 |he desti|nation. |
|00004760| 53 69 6e 63 65 20 74 68 | 65 20 61 70 70 6c 69 63 |Since th|e applic|
|00004770| 61 74 69 6f 6e 20 64 65 | 76 65 6c 6f 70 65 72 20 |ation de|veloper |
|00004780| 6d 75 73 74 20 73 65 6c | 65 63 74 20 74 68 65 20 |must sel|ect the |
|00004790| 73 69 7a 65 20 6f 66 20 | 55 44 50 20 64 61 74 61 |size of |UDP data|
|000047a0| 67 72 61 6d 73 20 28 75 | 6e 6c 69 6b 65 20 54 43 |grams (u|nlike TC|
|000047b0| 50 2c 20 77 68 69 63 68 | 20 6e 65 67 6f 74 69 61 |P, which| negotia|
|000047c0| 74 65 73 20 70 61 63 6b | 65 74 20 73 69 7a 65 29 |tes pack|et size)|
|000047d0| 2c 20 79 6f 75 20 73 68 | 6f 75 6c 64 20 62 65 20 |, you sh|ould be |
|000047e0| 61 77 61 72 65 20 6f 66 | 20 69 6d 70 6c 65 6d 65 |aware of| impleme|
|000047f0| 6e 74 61 74 69 6f 6e 20 | 6c 69 6d 69 74 61 74 69 |ntation |limitati|
|00004800| 6f 6e 73 20 69 6d 70 6f | 73 65 64 20 6f 6e 20 74 |ons impo|sed on t|
|00004810| 68 65 20 73 69 7a 65 20 | 6f 66 20 74 68 65 73 65 |he size |of these|
|00004820| 20 64 61 74 61 67 72 61 | 6d 73 2e 0d 54 68 65 20 | datagra|ms..The |
|00004830| 4d 61 63 54 43 50 20 64 | 72 69 76 65 72 20 69 6e |MacTCP d|river in|
|00004840| 74 65 72 6e 61 6c 6c 79 | 20 61 6c 6c 6f 63 61 74 |ternally| allocat|
|00004850| 65 73 20 61 20 6d 65 6d | 6f 72 79 20 62 75 66 66 |es a mem|ory buff|
|00004860| 65 72 20 69 6e 20 74 68 | 65 20 73 79 73 74 65 6d |er in th|e system|
|00004870| 20 68 65 61 70 20 74 6f | 20 74 65 6d 70 6f 72 61 | heap to| tempora|
|00004880| 72 69 6c 79 20 68 6f 6c | 64 20 61 6c 6c 20 69 6e |rily hol|d all in|
|00004890| 63 6f 6d 69 6e 67 20 66 | 72 61 67 6d 65 6e 74 73 |coming f|ragments|
|000048a0| 20 77 61 69 74 69 6e 67 | 20 74 6f 20 62 65 20 72 | waiting| to be r|
|000048b0| 65 61 73 73 65 6d 62 6c | 65 64 20 61 6e 64 20 61 |eassembl|ed and a|
|000048c0| 6c 6c 20 6f 75 74 67 6f | 69 6e 67 20 66 72 61 67 |ll outgo|ing frag|
|000048d0| 6d 65 6e 74 73 20 77 61 | 69 74 69 6e 67 20 74 6f |ments wa|iting to|
|000048e0| 20 62 65 20 73 65 6e 74 | 2e 20 54 68 65 20 61 6d | be sent|. The am|
|000048f0| 6f 75 6e 74 20 6f 66 20 | 73 70 61 63 65 20 61 6c |ount of |space al|
|00004900| 6c 6f 63 61 74 65 64 20 | 76 61 72 69 65 73 20 64 |located |varies d|
|00004910| 65 70 65 6e 64 69 6e 67 | 20 6f 6e 20 77 68 65 74 |epending| on whet|
|00004920| 68 65 72 20 31 2c 20 32 | 2c 20 6f 72 20 34 20 6d |her 1, 2|, or 4 m|
|00004930| 65 67 61 62 79 74 65 73 | 20 28 4d 42 29 20 6f 66 |egabytes| (MB) of|
|00004940| 20 6d 65 6d 6f 72 79 20 | 61 72 65 20 69 6e 73 74 | memory |are inst|
|00004950| 61 6c 6c 65 64 2e 20 54 | 68 65 20 6d 61 78 69 6d |alled. T|he maxim|
|00004960| 75 6d 20 73 69 7a 65 20 | 6f 66 20 74 68 65 20 70 |um size |of the p|
|00004970| 61 63 6b 65 74 20 62 65 | 69 6e 67 20 66 72 61 67 |acket be|ing frag|
|00004980| 6d 65 6e 74 65 64 20 6f | 72 20 72 65 61 73 73 65 |mented o|r reasse|
|00004990| 6d 62 6c 65 64 20 64 65 | 70 65 6e 64 73 20 73 6f |mbled de|pends so|
|000049a0| 6c 65 6c 79 20 6f 6e 20 | 74 68 65 20 61 76 61 69 |lely on |the avai|
|000049b0| 6c 61 62 6c 65 20 66 72 | 65 65 20 73 70 61 63 65 |lable fr|ee space|
|000049c0| 20 69 6e 20 74 68 69 73 | 20 62 75 66 66 65 72 2e | in this| buffer.|
|000049d0| 20 42 65 63 61 75 73 65 | 20 74 68 65 20 6d 65 6d | Because| the mem|
|000049e0| 6f 72 79 20 70 6f 6f 6c | 20 69 73 20 73 68 61 72 |ory pool| is shar|
|000049f0| 65 64 20 62 79 20 61 6c | 6c 20 4d 61 63 54 43 50 |ed by al|l MacTCP|
|00004a00| 20 75 73 65 72 73 2c 20 | 74 68 65 20 61 6c 6c 6f | users, |the allo|
|00004a10| 77 61 6e 63 65 20 66 6f | 72 20 74 68 65 20 6d 61 |wance fo|r the ma|
|00004a20| 78 69 6d 75 6d 20 73 69 | 7a 65 20 6f 66 20 61 20 |ximum si|ze of a |
|00004a30| 55 44 50 57 72 69 74 65 | 20 70 61 63 6b 65 74 20 |UDPWrite| packet |
|00004a40| 77 69 6c 6c 20 76 61 72 | 79 2c 20 64 65 70 65 6e |will var|y, depen|
|00004a50| 64 69 6e 67 20 6f 6e 20 | 63 6f 6d 70 65 74 69 6e |ding on |competin|
|00004a60| 67 20 64 65 6d 61 6e 64 | 73 20 6f 6e 20 74 68 65 |g demand|s on the|
|00004a70| 20 6d 65 6d 6f 72 79 20 | 70 6f 6f 6c 2e 20 41 20 | memory |pool. A |
|00004a80| 67 69 76 65 6e 20 64 65 | 73 74 69 6e 61 74 69 6f |given de|stinatio|
|00004a90| 6e 20 63 61 6e 20 6f 6e | 6c 79 20 67 75 61 72 61 |n can on|ly guara|
|00004aa0| 6e 74 65 65 20 74 68 65 | 20 72 65 61 73 73 65 6d |ntee the| reassem|
|00004ab0| 62 6c 79 20 6f 66 20 61 | 20 70 61 63 6b 65 74 20 |bly of a| packet |
|00004ac0| 74 68 61 74 20 69 73 20 | 35 37 36 20 62 79 74 65 |that is |576 byte|
|00004ad0| 73 20 28 69 6e 63 6c 75 | 64 69 6e 67 20 49 50 20 |s (inclu|ding IP |
|00004ae0| 61 6e 64 20 55 44 50 20 | 68 65 61 64 65 72 73 29 |and UDP |headers)|
|00004af0| 3b 20 74 68 65 72 65 66 | 6f 72 65 2c 20 69 74 20 |; theref|ore, it |
|00004b00| 69 73 20 70 6f 73 73 69 | 62 6c 65 20 74 6f 20 73 |is possi|ble to s|
|00004b10| 65 6e 64 20 61 20 70 61 | 63 6b 65 74 20 66 72 6f |end a pa|cket fro|
|00004b20| 6d 20 74 68 65 20 4d 61 | 63 54 43 50 20 64 72 69 |m the Ma|cTCP dri|
|00004b30| 76 65 72 20 74 68 61 74 | 20 63 61 6e 6e 6f 74 20 |ver that| cannot |
|00004b40| 62 65 20 72 65 61 73 73 | 65 6d 62 6c 65 64 20 62 |be reass|embled b|
|00004b50| 79 20 74 68 65 20 64 65 | 73 74 69 6e 61 74 69 6f |y the de|stinatio|
|00004b60| 6e 20 68 6f 73 74 2e 0d | 52 6f 75 74 69 6e 67 0d |n host..|Routing.|
|00004b70| 54 68 65 20 4d 61 63 54 | 43 50 20 64 72 69 76 65 |The MacT|CP drive|
|00004b80| 72 20 73 75 70 70 6f 72 | 74 73 20 72 6f 75 74 69 |r suppor|ts routi|
|00004b90| 6e 67 20 74 68 72 6f 75 | 67 68 20 74 68 65 20 52 |ng throu|gh the R|
|00004ba0| 6f 75 74 69 6e 67 20 49 | 6e 66 6f 72 6d 61 74 69 |outing I|nformati|
|00004bb0| 6f 6e 20 50 72 6f 74 6f | 63 6f 6c 20 28 52 49 50 |on Proto|col (RIP|
|00004bc0| 29 20 61 6e 64 20 69 6e | 74 65 72 6e 61 6c 6c 79 |) and in|ternally|
|00004bd0| 20 6c 69 73 74 65 6e 73 | 20 74 6f 20 52 49 50 20 | listens| to RIP |
|00004be0| 62 72 6f 61 64 63 61 73 | 74 73 2e 20 42 65 63 61 |broadcas|ts. Beca|
|00004bf0| 75 73 65 20 74 68 65 20 | 4d 61 63 54 43 50 20 64 |use the |MacTCP d|
|00004c00| 72 69 76 65 72 20 69 6e | 74 65 72 6e 61 6c 6c 79 |river in|ternally|
|00004c10| 20 6c 69 73 74 65 6e 73 | 20 74 6f 20 52 49 50 20 | listens| to RIP |
|00004c20| 62 72 6f 61 64 63 61 73 | 74 73 2c 20 61 6e 20 61 |broadcas|ts, an a|
|00004c30| 74 74 65 6d 70 74 20 74 | 6f 20 63 72 65 61 74 65 |ttempt t|o create|
|00004c40| 20 61 20 55 44 50 20 73 | 74 72 65 61 6d 20 6f 6e | a UDP s|tream on|
|00004c50| 20 6c 6f 63 61 6c 20 70 | 6f 72 74 20 35 32 30 20 | local p|ort 520 |
|00004c60| 72 65 74 75 72 6e 73 20 | 61 20 64 75 70 6c 69 63 |returns |a duplic|
|00004c70| 61 74 65 53 6f 63 6b 65 | 74 20 65 72 72 6f 72 2e |ateSocke|t error.|
|00004c80| 0d 41 20 64 65 66 61 75 | 6c 74 20 67 61 74 65 77 |.A defau|lt gatew|
|00004c90| 61 79 20 63 61 6e 20 62 | 65 20 63 6f 6e 66 69 67 |ay can b|e config|
|00004ca0| 75 72 65 64 20 75 73 69 | 6e 67 20 74 68 65 20 43 |ured usi|ng the C|
|00004cb0| 6f 6e 74 72 6f 6c 20 50 | 61 6e 65 6c 2e 0d 33 09 |ontrol P|anel..3.|
|00004cc0| 55 73 65 72 20 44 61 74 | 61 67 72 61 6d 20 50 72 |User Dat|agram Pr|
|00004cd0| 6f 74 6f 63 6f 6c 0d 54 | 68 65 20 55 73 65 72 20 |otocol.T|he User |
|00004ce0| 44 61 74 61 67 72 61 6d | 20 50 72 6f 74 6f 63 6f |Datagram| Protoco|
|00004cf0| 6c 20 28 55 44 50 29 20 | 70 72 6f 76 69 64 65 73 |l (UDP) |provides|
|00004d00| 20 61 20 6c 6f 77 2d 6f | 76 65 72 68 65 61 64 20 | a low-o|verhead |
|00004d10| 74 72 61 6e 73 61 63 74 | 69 6f 6e 20 73 65 72 76 |transact|ion serv|
|00004d20| 69 63 65 20 74 6f 20 61 | 6c 6c 6f 77 20 75 70 70 |ice to a|llow upp|
|00004d30| 65 72 2d 6c 61 79 65 72 | 20 70 72 6f 74 6f 63 6f |er-layer| protoco|
|00004d40| 6c 73 20 74 6f 20 73 65 | 6e 64 20 64 61 74 61 67 |ls to se|nd datag|
|00004d50| 72 61 6d 73 20 62 65 74 | 77 65 65 6e 20 6f 6e 65 |rams bet|ween one|
|00004d60| 20 61 6e 6f 74 68 65 72 | 2e 20 55 44 50 20 69 73 | another|. UDP is|
|00004d70| 20 64 61 74 61 67 72 61 | 6d 20 6f 72 69 65 6e 74 | datagra|m orient|
|00004d80| 65 64 20 77 69 74 68 20 | 62 65 73 74 2d 65 66 66 |ed with |best-eff|
|00004d90| 6f 72 74 20 64 65 6c 69 | 76 65 72 79 2c 20 62 75 |ort deli|very, bu|
|00004da0| 74 20 69 74 20 64 6f 65 | 73 20 6e 6f 74 20 75 73 |t it doe|s not us|
|00004db0| 65 20 61 63 6b 6e 6f 77 | 6c 65 64 67 6d 65 6e 74 |e acknow|ledgment|
|00004dc0| 73 20 74 6f 20 6d 61 6b | 65 20 73 75 72 65 20 6d |s to mak|e sure m|
|00004dd0| 65 73 73 61 67 65 73 20 | 61 72 65 20 64 65 6c 69 |essages |are deli|
|00004de0| 76 65 72 65 64 20 74 6f | 20 74 68 65 20 64 65 73 |vered to| the des|
|00004df0| 74 69 6e 61 74 69 6f 6e | 2c 20 64 6f 65 73 20 6e |tination|, does n|
|00004e00| 6f 74 20 6f 72 64 65 72 | 20 69 6e 63 6f 6d 69 6e |ot order| incomin|
|00004e10| 67 20 6d 65 73 73 61 67 | 65 73 2c 20 61 6e 64 20 |g messag|es, and |
|00004e20| 64 6f 65 73 20 6e 6f 74 | 20 70 72 6f 76 69 64 65 |does not| provide|
|00004e30| 20 66 65 65 64 62 61 63 | 6b 20 74 6f 20 63 6f 6e | feedbac|k to con|
|00004e40| 74 72 6f 6c 20 74 68 65 | 20 72 61 74 65 20 61 74 |trol the| rate at|
|00004e50| 20 77 68 69 63 68 20 69 | 6e 66 6f 72 6d 61 74 69 | which i|nformati|
|00004e60| 6f 6e 20 66 6c 6f 77 73 | 20 62 65 74 77 65 65 6e |on flows| between|
|00004e70| 20 6d 61 63 68 69 6e 65 | 73 2e 0d 4c 69 6b 65 20 | machine|s..Like |
|00004e80| 74 68 65 20 54 72 61 6e | 73 6d 69 73 73 69 6f 6e |the Tran|smission|
|00004e90| 20 43 6f 6e 74 72 6f 6c | 20 50 72 6f 74 6f 63 6f | Control| Protoco|
|00004ea0| 6c 20 28 54 43 50 29 2c | 20 55 44 50 20 75 73 65 |l (TCP),| UDP use|
|00004eb0| 73 20 70 6f 72 74 20 66 | 69 65 6c 64 73 20 74 6f |s port f|ields to|
|00004ec0| 20 73 70 65 63 69 66 79 | 20 74 68 65 20 73 6f 75 | specify| the sou|
|00004ed0| 72 63 65 20 61 6e 64 20 | 64 65 73 74 69 6e 61 74 |rce and |destinat|
|00004ee0| 69 6f 6e 20 70 72 6f 63 | 65 73 73 65 73 20 6f 66 |ion proc|esses of|
|00004ef0| 20 65 61 63 68 20 74 72 | 61 6e 73 61 63 74 69 6f | each tr|ansactio|
|00004f00| 6e 2e 20 41 6e 20 6f 70 | 74 69 6f 6e 61 6c 20 63 |n. An op|tional c|
|00004f10| 68 65 63 6b 73 75 6d 20 | 69 73 20 61 6c 73 6f 20 |hecksum |is also |
|00004f20| 75 73 65 64 2e 20 0d 44 | 61 74 61 20 73 74 72 75 |used. .D|ata stru|
|00004f30| 63 74 75 72 65 73 0d 54 | 68 65 20 55 44 50 20 70 |ctures.T|he UDP p|
|00004f40| 61 63 6b 65 74 20 69 73 | 20 63 6f 6d 70 6f 73 65 |acket is| compose|
|00004f50| 64 20 6f 66 20 61 6e 20 | 38 2d 62 79 74 65 20 68 |d of an |8-byte h|
|00004f60| 65 61 64 65 72 2c 20 66 | 6f 6c 6c 6f 77 65 64 20 |eader, f|ollowed |
|00004f70| 62 79 20 75 70 20 74 6f | 20 36 35 2c 35 30 37 20 |by up to| 65,507 |
|00004f80| 62 79 74 65 73 20 6f 66 | 20 64 61 74 61 2e 20 54 |bytes of| data. T|
|00004f90| 68 65 20 55 44 50 20 68 | 65 61 64 65 72 20 68 61 |he UDP h|eader ha|
|00004fa0| 73 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |s the fo|llowing |
|00004fb0| 73 74 72 75 63 74 75 72 | 65 3a 0d 30 09 77 6f 72 |structur|e:.0.wor|
|00004fc0| 64 09 73 6f 75 72 63 65 | 20 70 6f 72 74 0d 32 09 |d.source| port.2.|
|00004fd0| 77 6f 72 64 09 64 65 73 | 74 69 6e 61 74 69 6f 6e |word.des|tination|
|00004fe0| 20 70 6f 72 74 0d 34 09 | 77 6f 72 64 09 6c 65 6e | port.4.|word.len|
|00004ff0| 67 74 68 0d 36 09 77 6f | 72 64 09 63 68 65 63 6b |gth.6.wo|rd.check|
|00005000| 73 75 6d 0d 38 09 76 61 | 72 69 61 62 6c 65 09 64 |sum.8.va|riable.d|
|00005010| 61 74 61 0d 57 72 69 74 | 65 20 44 61 74 61 20 53 |ata.Writ|e Data S|
|00005020| 74 72 75 63 74 75 72 65 | 73 0d 54 6f 20 73 65 6e |tructure|s.To sen|
|00005030| 64 20 61 20 55 44 50 20 | 64 61 74 61 67 72 61 6d |d a UDP |datagram|
|00005040| 2c 20 79 6f 75 20 6d 75 | 73 74 20 66 6f 72 6d 61 |, you mu|st forma|
|00005050| 74 20 61 20 57 72 69 74 | 65 20 44 61 74 61 20 53 |t a Writ|e Data S|
|00005060| 74 72 75 63 74 75 72 65 | 20 28 57 44 53 29 2c 20 |tructure| (WDS), |
|00005070| 77 68 69 63 68 20 68 61 | 73 20 74 68 65 20 66 6f |which ha|s the fo|
|00005080| 72 6d 61 74 20 73 68 6f | 77 6e 20 69 6e 20 46 69 |rmat sho|wn in Fi|
|00005090| 67 75 72 65 20 33 2d 31 | 2e 20 41 20 57 44 53 20 |gure 3-1|. A WDS |
|000050a0| 73 70 65 63 69 66 69 65 | 73 20 61 20 6c 69 73 74 |specifie|s a list|
|000050b0| 20 6f 66 20 62 75 66 66 | 65 72 73 20 74 6f 20 77 | of buff|ers to w|
|000050c0| 72 69 74 65 20 69 6e 20 | 61 20 73 69 6e 67 6c 65 |rite in |a single|
|000050d0| 20 6f 70 65 72 61 74 69 | 6f 6e 2e 0d 54 68 65 20 | operati|on..The |
|000050e0| 73 69 6d 70 6c 65 73 74 | 20 57 44 53 20 64 65 73 |simplest| WDS des|
|000050f0| 63 72 69 62 65 73 20 61 | 20 73 69 6e 67 6c 65 20 |cribes a| single |
|00005100| 62 75 66 66 65 72 20 61 | 6e 64 20 69 73 20 38 20 |buffer a|nd is 8 |
|00005110| 62 79 74 65 73 20 69 6e | 20 6c 65 6e 67 74 68 3a |bytes in| length:|
|00005120| 20 61 20 77 6f 72 64 20 | 6c 65 6e 67 74 68 2c 20 | a word |length, |
|00005130| 61 20 6c 6f 6e 67 20 70 | 6f 69 6e 74 65 72 2c 20 |a long p|ointer, |
|00005140| 66 6f 6c 6c 6f 77 65 64 | 20 62 79 20 61 20 74 65 |followed| by a te|
|00005150| 72 6d 69 6e 61 74 69 6e | 67 20 77 6f 72 64 20 6f |rminatin|g word o|
|00005160| 66 20 30 2e 20 54 68 65 | 20 6d 6f 73 74 20 63 6f |f 0. The| most co|
|00005170| 6d 70 6c 65 78 20 57 44 | 53 20 74 68 61 74 20 63 |mplex WD|S that c|
|00005180| 61 6e 20 62 65 20 75 73 | 65 64 20 74 6f 20 73 65 |an be us|ed to se|
|00005190| 6e 64 20 61 20 55 44 50 | 20 64 61 74 61 67 72 61 |nd a UDP| datagra|
|000051a0| 6d 20 64 65 73 63 72 69 | 62 65 73 20 36 20 62 75 |m descri|bes 6 bu|
|000051b0| 66 66 65 72 73 20 61 6e | 64 20 69 73 20 33 38 20 |ffers an|d is 38 |
|000051c0| 62 79 74 65 73 20 69 6e | 20 6c 65 6e 67 74 68 2e |bytes in| length.|
|000051d0| 0d 0d 46 69 67 75 72 65 | 20 33 2d 31 20 20 55 44 |..Figure| 3-1 UD|
|000051e0| 50 20 57 72 69 74 65 20 | 44 61 74 61 20 53 74 72 |P Write |Data Str|
|000051f0| 75 63 74 75 72 65 0d 52 | 65 63 65 69 76 65 20 62 |ucture.R|eceive b|
|00005200| 75 66 66 65 72 20 61 72 | 65 61 0d 54 68 65 20 55 |uffer ar|ea.The U|
|00005210| 73 65 72 20 44 61 74 61 | 67 72 61 6d 20 50 72 6f |ser Data|gram Pro|
|00005220| 74 6f 63 6f 6c 20 28 55 | 44 50 29 20 64 6f 65 73 |tocol (U|DP) does|
|00005230| 20 6e 6f 74 20 61 6c 6c | 6f 63 61 74 65 20 6d 65 | not all|ocate me|
|00005240| 6d 6f 72 79 20 66 6f 72 | 20 73 74 6f 72 69 6e 67 |mory for| storing|
|00005250| 20 55 44 50 20 73 74 72 | 65 61 6d 20 64 61 74 61 | UDP str|eam data|
|00005260| 62 61 73 65 73 20 6f 72 | 20 66 6f 72 20 62 75 66 |bases or| for buf|
|00005270| 66 65 72 69 6e 67 20 72 | 65 63 65 69 76 65 64 20 |fering r|eceived |
|00005280| 64 61 74 61 67 72 61 6d | 73 2e 20 49 6e 73 74 65 |datagram|s. Inste|
|00005290| 61 64 2c 20 79 6f 75 20 | 6d 75 73 74 20 70 61 73 |ad, you |must pas|
|000052a0| 73 20 55 44 50 20 65 6e | 6f 75 67 68 20 6d 65 6d |s UDP en|ough mem|
|000052b0| 6f 72 79 20 66 6f 72 20 | 74 68 65 73 65 20 70 75 |ory for |these pu|
|000052c0| 72 70 6f 73 65 73 20 69 | 6e 20 74 68 65 20 55 44 |rposes i|n the UD|
|000052d0| 50 43 72 65 61 74 65 20 | 63 61 6c 6c 2e 20 54 68 |PCreate |call. Th|
|000052e0| 69 73 20 68 61 73 20 74 | 77 6f 20 61 64 76 61 6e |is has t|wo advan|
|000052f0| 74 61 67 65 73 3a 0d 6e | 09 54 68 65 20 62 75 66 |tages:.n|.The buf|
|00005300| 66 65 72 20 6d 65 6d 6f | 72 79 20 63 61 6e 20 62 |fer memo|ry can b|
|00005310| 65 20 61 6c 6c 6f 63 61 | 74 65 64 20 6f 66 66 20 |e alloca|ted off |
|00005320| 74 68 65 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |the appl|ication |
|00005330| 68 65 61 70 20 69 6e 73 | 74 65 61 64 20 6f 66 20 |heap ins|tead of |
|00005340| 74 68 65 20 73 79 73 74 | 65 6d 20 68 65 61 70 2c |the syst|em heap,|
|00005350| 20 77 68 69 63 68 20 69 | 73 20 76 65 72 79 20 6c | which i|s very l|
|00005360| 69 6d 69 74 65 64 2e 0d | 6e 09 59 6f 75 20 68 61 |imited..|n.You ha|
|00005370| 76 65 20 63 6f 6e 74 72 | 6f 6c 20 6f 76 65 72 20 |ve contr|ol over |
|00005380| 74 68 65 20 62 75 66 66 | 65 72 69 6e 67 20 70 72 |the buff|ering pr|
|00005390| 6f 76 69 64 65 64 20 62 | 79 20 55 44 50 20 61 6e |ovided b|y UDP an|
|000053a0| 64 20 63 61 6e 20 61 6c | 6c 6f 63 61 74 65 20 74 |d can al|locate t|
|000053b0| 68 65 20 61 70 70 72 6f | 70 72 69 61 74 65 20 61 |he appro|priate a|
|000053c0| 6d 6f 75 6e 74 20 6f 66 | 20 6d 65 6d 6f 72 79 20 |mount of| memory |
|000053d0| 66 6f 72 20 74 68 65 20 | 74 79 70 65 20 6f 66 20 |for the |type of |
|000053e0| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 61 6e 64 20 |applicat|ion and |
|000053f0| 70 65 72 66 6f 72 6d 61 | 6e 63 65 20 6c 65 76 65 |performa|nce leve|
|00005400| 6c 20 64 65 73 69 72 65 | 64 2e 0d 54 68 69 73 20 |l desire|d..This |
|00005410| 62 75 66 66 65 72 20 61 | 72 65 61 20 66 6f 72 20 |buffer a|rea for |
|00005420| 69 6e 63 6f 6d 69 6e 67 | 20 64 61 74 61 67 72 61 |incoming| datagra|
|00005430| 6d 73 20 62 65 6c 6f 6e | 67 73 20 74 6f 20 74 68 |ms belon|gs to th|
|00005440| 65 20 4d 61 63 54 43 50 | 20 64 72 69 76 65 72 20 |e MacTCP| driver |
|00005450| 61 73 20 6c 6f 6e 67 20 | 61 73 20 74 68 65 20 55 |as long |as the U|
|00005460| 44 50 20 73 74 72 65 61 | 6d 20 69 73 20 6f 70 65 |DP strea|m is ope|
|00005470| 6e 2e 20 57 68 65 6e 20 | 55 44 50 52 65 6c 65 61 |n. When |UDPRelea|
|00005480| 73 65 20 69 73 20 63 61 | 6c 6c 65 64 2c 20 74 68 |se is ca|lled, th|
|00005490| 69 73 20 6d 65 6d 6f 72 | 79 20 69 73 20 72 65 74 |is memor|y is ret|
|000054a0| 75 72 6e 65 64 20 74 6f | 20 79 6f 75 20 61 6e 64 |urned to| you and|
|000054b0| 20 79 6f 75 20 63 61 6e | 20 74 68 65 6e 20 72 65 | you can| then re|
|000054c0| 75 73 65 20 69 74 20 6f | 72 20 72 65 74 75 72 6e |use it o|r return|
|000054d0| 20 69 74 20 74 6f 20 74 | 68 65 20 73 79 73 74 65 | it to t|he syste|
|000054e0| 6d 2e 0d 55 73 69 6e 67 | 20 55 44 50 0d 54 6f 20 |m..Using| UDP.To |
|000054f0| 73 65 6e 64 20 6f 72 20 | 72 65 63 65 69 76 65 20 |send or |receive |
|00005500| 55 44 50 20 64 61 74 61 | 67 72 61 6d 73 2c 20 79 |UDP data|grams, y|
|00005510| 6f 75 20 6d 75 73 74 20 | 66 69 72 73 74 20 63 61 |ou must |first ca|
|00005520| 6c 6c 20 55 44 50 43 72 | 65 61 74 65 20 74 6f 20 |ll UDPCr|eate to |
|00005530| 63 72 65 61 74 65 20 61 | 20 55 44 50 20 73 74 72 |create a| UDP str|
|00005540| 65 61 6d 2c 20 63 72 65 | 61 74 69 6e 67 20 61 20 |eam, cre|ating a |
|00005550| 70 6f 72 74 20 6c 69 73 | 74 65 6e 65 72 20 66 6f |port lis|tener fo|
|00005560| 72 20 74 68 65 20 67 69 | 76 65 6e 20 55 44 50 20 |r the gi|ven UDP |
|00005570| 70 6f 72 74 20 61 6e 64 | 20 70 61 73 73 69 6e 67 |port and| passing|
|00005580| 20 61 20 6d 65 6d 6f 72 | 79 20 62 6c 6f 63 6b 20 | a memor|y block |
|00005590| 74 6f 20 74 68 65 20 55 | 44 50 20 64 72 69 76 65 |to the U|DP drive|
|000055a0| 72 20 74 6f 20 75 73 65 | 20 69 6e 20 62 75 66 66 |r to use| in buff|
|000055b0| 65 72 69 6e 67 20 69 6e | 63 6f 6d 69 6e 67 20 64 |ering in|coming d|
|000055c0| 61 74 61 67 72 61 6d 73 | 2e 20 55 44 50 43 72 65 |atagrams|. UDPCre|
|000055d0| 61 74 65 20 61 6c 73 6f | 20 72 65 67 69 73 74 65 |ate also| registe|
|000055e0| 72 73 20 61 6e 20 61 73 | 79 6e 63 68 72 6f 6e 6f |rs an as|ynchrono|
|000055f0| 75 73 20 6e 6f 74 69 66 | 69 63 61 74 69 6f 6e 20 |us notif|ication |
|00005600| 72 6f 75 74 69 6e 65 20 | 28 41 53 52 29 20 74 68 |routine |(ASR) th|
|00005610| 61 74 20 55 44 50 20 75 | 73 65 73 20 74 6f 20 6e |at UDP u|ses to n|
|00005620| 6f 74 69 66 79 20 79 6f | 75 20 6f 66 20 61 73 79 |otify yo|u of asy|
|00005630| 6e 63 68 72 6f 6e 6f 75 | 73 20 65 76 65 6e 74 73 |nchronou|s events|
|00005640| 20 61 73 73 6f 63 69 61 | 74 65 64 20 77 69 74 68 | associa|ted with|
|00005650| 20 74 68 69 73 20 55 44 | 50 20 73 74 72 65 61 6d | this UD|P stream|
|00005660| 2e 20 54 68 65 20 4d 61 | 63 54 43 50 20 64 72 69 |. The Ma|cTCP dri|
|00005670| 76 65 72 20 63 61 6e 20 | 73 75 70 70 6f 72 74 20 |ver can |support |
|00005680| 36 33 20 6f 70 65 6e 20 | 55 44 50 20 73 74 72 65 |63 open |UDP stre|
|00005690| 61 6d 73 20 73 69 6d 75 | 6c 74 61 6e 65 6f 75 73 |ams simu|ltaneous|
|000056a0| 6c 79 2e 20 54 68 65 20 | 52 49 50 20 70 72 6f 63 |ly. The |RIP proc|
|000056b0| 65 73 73 20 61 6c 77 61 | 79 73 20 68 61 73 20 61 |ess alwa|ys has a|
|000056c0| 20 73 74 72 65 61 6d 20 | 6f 70 65 6e 20 6f 6e 20 | stream |open on |
|000056d0| 70 6f 72 74 20 35 32 30 | 2e 0d 54 6f 20 72 65 63 |port 520|..To rec|
|000056e0| 65 69 76 65 20 61 20 55 | 44 50 20 64 61 74 61 67 |eive a U|DP datag|
|000056f0| 72 61 6d 2c 20 63 61 6c | 6c 20 55 44 50 52 65 61 |ram, cal|l UDPRea|
|00005700| 64 2e 20 54 68 65 6e 2c | 20 77 68 65 6e 20 79 6f |d. Then,| when yo|
|00005710| 75 20 66 69 6e 69 73 68 | 20 77 69 74 68 20 74 68 |u finish| with th|
|00005720| 65 20 62 75 66 66 65 72 | 20 74 68 61 74 20 68 6f |e buffer| that ho|
|00005730| 6c 64 73 20 74 68 65 20 | 72 65 63 65 69 76 65 64 |lds the |received|
|00005740| 20 64 61 74 61 67 72 61 | 6d 2c 20 63 61 6c 6c 20 | datagra|m, call |
|00005750| 55 44 50 42 66 72 52 65 | 74 75 72 6e 2e 20 54 6f |UDPBfrRe|turn. To|
|00005760| 20 73 65 6e 64 20 61 20 | 55 44 50 20 64 61 74 61 | send a |UDP data|
|00005770| 67 72 61 6d 2c 20 63 61 | 6c 6c 20 55 44 50 57 72 |gram, ca|ll UDPWr|
|00005780| 69 74 65 2e 20 57 68 65 | 6e 20 79 6f 75 20 66 69 |ite. Whe|n you fi|
|00005790| 6e 69 73 68 20 75 73 69 | 6e 67 20 61 20 55 44 50 |nish usi|ng a UDP|
|000057a0| 20 70 6f 72 74 2c 20 63 | 61 6c 6c 20 55 44 50 52 | port, c|all UDPR|
|000057b0| 65 6c 65 61 73 65 20 74 | 6f 20 63 6c 6f 73 65 20 |elease t|o close |
|000057c0| 74 68 65 20 55 44 50 20 | 73 74 72 65 61 6d 2e 0d |the UDP |stream..|
|000057d0| 4e 6f 74 65 3a 20 20 55 | 73 65 20 6f 66 20 6c 69 |Note: U|se of li|
|000057e0| 6e 6b 2d 6c 65 76 65 6c | 20 70 61 63 6b 65 74 73 |nk-level| packets|
|000057f0| 20 6c 61 72 67 65 72 20 | 74 68 61 6e 20 74 68 65 | larger |than the|
|00005800| 20 6d 61 78 69 6d 75 6d | 20 74 72 61 6e 73 66 65 | maximum| transfe|
|00005810| 72 20 75 6e 69 74 20 28 | 4d 54 55 29 20 6f 6e 20 |r unit (|MTU) on |
|00005820| 4c 6f 63 61 6c 54 61 6c | 6b 20 6e 65 74 77 6f 72 |LocalTal|k networ|
|00005830| 6b 73 20 69 73 20 6e 6f | 74 20 61 64 76 69 73 65 |ks is no|t advise|
|00005840| 64 20 62 65 63 61 75 73 | 65 20 74 68 65 72 65 20 |d becaus|e there |
|00005850| 61 72 65 20 73 65 76 65 | 72 61 6c 20 70 72 6f 62 |are seve|ral prob|
|00005860| 6c 65 6d 73 20 77 69 74 | 68 20 74 68 65 73 65 20 |lems wit|h these |
|00005870| 70 61 63 6b 65 74 73 20 | 6f 6e 20 44 61 74 61 67 |packets |on Datag|
|00005880| 72 61 6d 20 44 65 6c 69 | 76 65 72 79 20 50 72 6f |ram Deli|very Pro|
|00005890| 74 6f 63 6f 6c 2d 49 6e | 74 65 72 6e 65 74 20 50 |tocol-In|ternet P|
|000058a0| 72 6f 74 6f 63 6f 6c 20 | 28 44 44 50 2d 49 50 29 |rotocol |(DDP-IP)|
|000058b0| 20 67 61 74 65 77 61 79 | 73 2e 20 54 68 65 20 70 | gateway|s. The p|
|000058c0| 61 63 6b 65 74 20 4d 54 | 55 20 73 69 7a 65 20 73 |acket MT|U size s|
|000058d0| 68 6f 75 6c 64 20 62 65 | 20 6e 65 67 6f 74 69 61 |hould be| negotia|
|000058e0| 74 65 64 20 62 79 20 75 | 70 70 65 72 2d 6c 61 79 |ted by u|pper-lay|
|000058f0| 65 72 20 70 72 6f 74 6f | 63 6f 6c 73 2e 0d 55 44 |er proto|cols..UD|
|00005900| 50 20 72 6f 75 74 69 6e | 65 73 0d 54 68 69 73 20 |P routin|es.This |
|00005910| 73 65 63 74 69 6f 6e 20 | 64 65 73 63 72 69 62 65 |section |describe|
|00005920| 73 20 63 61 6c 6c 73 20 | 74 6f 20 74 68 65 20 55 |s calls |to the U|
|00005930| 44 50 20 64 72 69 76 65 | 72 2e 20 54 61 62 6c 65 |DP drive|r. Table|
|00005940| 20 33 2d 31 20 6c 69 73 | 74 73 20 65 61 63 68 20 | 3-1 lis|ts each |
|00005950| 55 44 50 20 72 6f 75 74 | 69 6e 65 20 61 6e 64 20 |UDP rout|ine and |
|00005960| 69 74 73 20 66 75 6e 63 | 74 69 6f 6e 2e 0d 54 61 |its func|tion..Ta|
|00005970| 62 6c 65 20 33 2d 31 20 | 20 55 44 50 20 72 6f 75 |ble 3-1 | UDP rou|
|00005980| 74 69 6e 65 73 0d 52 6f | 75 74 69 6e 65 09 46 75 |tines.Ro|utine.Fu|
|00005990| 6e 63 74 69 6f 6e 0d 55 | 44 50 43 72 65 61 74 65 |nction.U|DPCreate|
|000059a0| 09 4f 70 65 6e 73 20 61 | 20 55 44 50 20 73 74 72 |.Opens a| UDP str|
|000059b0| 65 61 6d 0d 55 44 50 52 | 65 61 64 09 52 65 74 72 |eam.UDPR|ead.Retr|
|000059c0| 69 65 76 65 73 20 61 20 | 64 61 74 61 67 72 61 6d |ieves a |datagram|
|000059d0| 20 72 65 63 65 69 76 65 | 64 20 6f 6e 20 61 20 55 | receive|d on a U|
|000059e0| 44 50 20 73 74 72 65 61 | 6d 0d 55 44 50 42 66 72 |DP strea|m.UDPBfr|
|000059f0| 52 65 74 75 72 6e 09 52 | 65 74 75 72 6e 73 20 61 |Return.R|eturns a|
|00005a00| 20 72 65 63 65 69 76 65 | 20 62 75 66 66 65 72 20 | receive| buffer |
|00005a10| 74 6f 20 74 68 65 20 55 | 44 50 20 64 72 69 76 65 |to the U|DP drive|
|00005a20| 72 0d 55 44 50 57 72 69 | 74 65 09 53 65 6e 64 73 |r.UDPWri|te.Sends|
|00005a30| 20 61 20 64 61 74 61 67 | 72 61 6d 20 6f 6e 20 61 | a datag|ram on a|
|00005a40| 20 55 44 50 20 73 74 72 | 65 61 6d 0d 55 44 50 52 | UDP str|eam.UDPR|
|00005a50| 65 6c 65 61 73 65 09 43 | 6c 6f 73 65 73 20 61 20 |elease.C|loses a |
|00005a60| 55 44 50 20 73 74 72 65 | 61 6d 0d 55 44 50 4d 54 |UDP stre|am.UDPMT|
|00005a70| 55 09 52 65 74 75 72 6e | 73 20 74 68 65 20 6d 61 |U.Return|s the ma|
|00005a80| 78 69 6d 75 6d 20 73 69 | 7a 65 20 6f 66 20 55 44 |ximum si|ze of UD|
|00005a90| 50 20 64 61 74 61 20 74 | 68 61 74 20 63 61 6e 20 |P data t|hat can |
|00005aa0| 62 65 20 73 65 6e 74 20 | 69 6e 20 61 20 64 61 74 |be sent |in a dat|
|00005ab0| 61 67 72 61 6d 20 77 69 | 74 68 6f 75 74 20 49 50 |agram wi|thout IP|
|00005ac0| 20 66 72 61 67 6d 65 6e | 74 61 74 69 6f 6e 0d 55 | fragmen|tation.U|
|00005ad0| 44 50 20 4d 75 6c 74 69 | 70 6f 72 74 20 43 72 65 |DP Multi|port Cre|
|00005ae0| 61 74 65 09 4f 70 65 6e | 73 20 55 44 50 20 63 6f |ate.Open|s UDP co|
|00005af0| 6e 6e 65 63 74 69 6f 6e | 73 20 6f 6e 20 61 20 63 |nnection|s on a c|
|00005b00| 6f 6e 73 65 63 75 74 69 | 76 65 20 73 65 72 69 65 |onsecuti|ve serie|
|00005b10| 73 20 6f 66 20 70 6f 72 | 74 73 0d 55 44 50 20 4d |s of por|ts.UDP M|
|00005b20| 75 6c 74 69 70 6f 72 74 | 20 53 65 6e 64 09 53 65 |ultiport| Send.Se|
|00005b30| 6e 64 73 20 61 20 64 61 | 74 61 67 72 61 6d 20 66 |nds a da|tagram f|
|00005b40| 72 6f 6d 20 61 20 73 70 | 65 63 69 66 69 65 64 20 |rom a sp|ecified |
|00005b50| 70 6f 72 74 0d 0d 55 44 | 50 20 4d 75 6c 74 69 70 |port..UD|P Multip|
|00005b60| 6f 72 74 20 52 65 63 65 | 69 76 65 09 52 65 63 65 |ort Rece|ive.Rece|
|00005b70| 69 76 65 73 20 64 61 74 | 61 20 66 72 6f 6d 20 61 |ives dat|a from a|
|00005b80| 20 70 6f 72 74 20 74 68 | 61 74 20 77 61 73 20 63 | port th|at was c|
|00005b90| 72 65 61 74 65 64 20 77 | 69 74 68 20 74 68 65 20 |reated w|ith the |
|00005ba0| 55 44 50 20 4d 75 6c 74 | 69 70 6f 72 74 20 43 72 |UDP Mult|iport Cr|
|00005bb0| 65 61 74 65 20 63 6f 6d | 6d 61 6e 64 0d 55 44 50 |eate com|mand.UDP|
|00005bc0| 43 72 65 61 74 65 0d 50 | 61 72 61 6d 65 74 65 72 |Create.P|arameter|
|00005bd0| 20 62 6c 6f 63 6b 09 ae | 09 32 36 09 77 6f 72 64 | block..|.26.word|
|00005be0| 09 63 73 43 6f 64 65 20 | 3d 55 50 44 43 72 65 61 |.csCode |=UPDCrea|
|00005bf0| 74 65 0d ac 09 32 38 09 | 6c 6f 6e 67 09 73 74 72 |te...28.|long.str|
|00005c00| 65 61 6d 20 70 6f 69 6e | 74 65 72 0d ae 09 33 32 |eam poin|ter...32|
|00005c10| 09 6c 6f 6e 67 09 70 6f | 69 6e 74 65 72 20 74 6f |.long.po|inter to|
|00005c20| 20 72 65 63 65 69 76 65 | 20 62 75 66 66 65 72 20 | receive| buffer |
|00005c30| 61 72 65 61 0d ae 09 33 | 36 09 6c 6f 6e 67 09 6c |area...3|6.long.l|
|00005c40| 65 6e 67 74 68 20 6f 66 | 20 72 65 63 65 69 76 65 |ength of| receive|
|00005c50| 20 62 75 66 66 65 72 20 | 61 72 65 61 0d ae 09 34 | buffer |area...4|
|00005c60| 30 09 6c 6f 6e 67 09 70 | 6f 69 6e 74 65 72 20 74 |0.long.p|ointer t|
|00005c70| 6f 20 61 73 79 6e 63 68 | 72 6f 6e 6f 75 73 20 6e |o asynch|ronous n|
|00005c80| 6f 74 69 66 69 63 61 74 | 69 6f 6e 20 72 6f 75 74 |otificat|ion rout|
|00005c90| 69 6e 65 20 28 41 53 52 | 29 0d ab 09 34 34 09 77 |ine (ASR|)...44.w|
|00005ca0| 6f 72 64 09 6c 6f 63 61 | 6c 20 55 44 50 20 70 6f |ord.loca|l UDP po|
|00005cb0| 72 74 0d ae 09 34 36 09 | 6c 6f 6e 67 09 75 73 65 |rt...46.|long.use|
|00005cc0| 72 20 64 61 74 61 20 70 | 6f 69 6e 74 65 72 0d 55 |r data p|ointer.U|
|00005cd0| 44 50 43 72 65 61 74 65 | 20 6f 70 65 6e 73 20 61 |DPCreate| opens a|
|00005ce0| 20 55 44 50 20 73 74 72 | 65 61 6d 2e 20 49 74 20 | UDP str|eam. It |
|00005cf0| 6d 75 73 74 20 62 65 20 | 63 61 6c 6c 65 64 20 62 |must be |called b|
|00005d00| 65 66 6f 72 65 20 61 6e | 79 20 55 44 50 20 64 61 |efore an|y UDP da|
|00005d10| 74 61 67 72 61 6d 73 20 | 63 61 6e 20 62 65 20 73 |tagrams |can be s|
|00005d20| 65 6e 74 20 6f 72 20 72 | 65 63 65 69 76 65 64 20 |ent or r|eceived |
|00005d30| 6f 6e 20 61 20 70 61 72 | 74 69 63 75 6c 61 72 20 |on a par|ticular |
|00005d40| 55 44 50 20 70 6f 72 74 | 2e 20 55 44 50 43 72 65 |UDP port|. UDPCre|
|00005d50| 61 74 65 20 72 65 74 75 | 72 6e 73 20 61 20 73 74 |ate retu|rns a st|
|00005d60| 72 65 61 6d 20 70 6f 69 | 6e 74 65 72 20 74 68 61 |ream poi|nter tha|
|00005d70| 74 20 6d 75 73 74 20 62 | 65 20 75 73 65 64 20 69 |t must b|e used i|
|00005d80| 6e 20 61 6c 6c 20 73 75 | 62 73 65 71 75 65 6e 74 |n all su|bsequent|
|00005d90| 20 55 44 50 20 63 61 6c | 6c 73 20 74 68 61 74 20 | UDP cal|ls that |
|00005da0| 6f 70 65 72 61 74 65 20 | 6f 6e 20 74 68 69 73 20 |operate |on this |
|00005db0| 55 44 50 20 73 74 72 65 | 61 6d 2e 0d 54 68 65 20 |UDP stre|am..The |
|00005dc0| 72 65 63 65 69 76 65 20 | 62 75 66 66 65 72 20 61 |receive |buffer a|
|00005dd0| 72 65 61 20 69 73 20 61 | 20 62 6c 6f 63 6b 20 6f |rea is a| block o|
|00005de0| 66 20 6d 65 6d 6f 72 79 | 20 74 68 61 74 20 79 6f |f memory| that yo|
|00005df0| 75 20 6d 75 73 74 20 67 | 69 76 65 20 74 6f 20 74 |u must g|ive to t|
|00005e00| 68 65 20 55 44 50 20 64 | 72 69 76 65 72 2e 20 55 |he UDP d|river. U|
|00005e10| 44 50 20 75 73 65 73 20 | 74 68 69 73 20 6d 65 6d |DP uses |this mem|
|00005e20| 6f 72 79 20 74 6f 20 62 | 75 66 66 65 72 20 69 6e |ory to b|uffer in|
|00005e30| 63 6f 6d 69 6e 67 20 64 | 61 74 61 67 72 61 6d 73 |coming d|atagrams|
|00005e40| 2e 20 54 68 69 73 20 62 | 6c 6f 63 6b 20 6f 66 20 |. This b|lock of |
|00005e50| 6d 65 6d 6f 72 79 20 62 | 65 6c 6f 6e 67 73 20 74 |memory b|elongs t|
|00005e60| 6f 20 55 44 50 20 77 68 | 69 6c 65 20 74 68 65 20 |o UDP wh|ile the |
|00005e70| 73 74 72 65 61 6d 20 69 | 73 20 6f 70 65 6e 3b 20 |stream i|s open; |
|00005e80| 69 74 20 63 61 6e 6e 6f | 74 20 62 65 20 6d 6f 64 |it canno|t be mod|
|00005e90| 69 66 69 65 64 20 6f 72 | 20 72 65 6c 6f 63 61 74 |ified or| relocat|
|00005ea0| 65 64 20 75 6e 74 69 6c | 20 55 44 50 52 65 6c 65 |ed until| UDPRele|
|00005eb0| 61 73 65 20 69 73 20 63 | 61 6c 6c 65 64 2e 20 54 |ase is c|alled. T|
|00005ec0| 68 65 20 6d 69 6e 69 6d | 75 6d 20 61 6c 6c 6f 77 |he minim|um allow|
|00005ed0| 65 64 20 73 69 7a 65 20 | 6f 66 20 74 68 65 20 72 |ed size |of the r|
|00005ee0| 65 63 65 69 76 65 20 62 | 75 66 66 65 72 20 61 72 |eceive b|uffer ar|
|00005ef0| 65 61 20 69 73 20 32 30 | 34 38 20 62 79 74 65 73 |ea is 20|48 bytes|
|00005f00| 2c 20 62 75 74 20 69 74 | 20 73 68 6f 75 6c 64 20 |, but it| should |
|00005f10| 62 65 20 61 74 20 6c 65 | 61 73 74 20 32 4e 20 2b |be at le|ast 2N +|
|00005f20| 20 32 35 36 20 62 79 74 | 65 73 20 69 6e 20 6c 65 | 256 byt|es in le|
|00005f30| 6e 67 74 68 2c 20 77 68 | 65 72 65 20 4e 20 69 73 |ngth, wh|ere N is|
|00005f40| 20 74 68 65 20 73 69 7a | 65 20 69 6e 20 62 79 74 | the siz|e in byt|
|00005f50| 65 73 20 6f 66 20 74 68 | 65 20 6c 61 72 67 65 73 |es of th|e larges|
|00005f60| 74 20 55 44 50 20 64 61 | 74 61 67 72 61 6d 20 79 |t UDP da|tagram y|
|00005f70| 6f 75 20 65 78 70 65 63 | 74 20 74 6f 20 72 65 63 |ou expec|t to rec|
|00005f80| 65 69 76 65 2e 20 49 66 | 20 79 6f 75 20 65 78 70 |eive. If| you exp|
|00005f90| 65 63 74 20 74 6f 20 72 | 65 63 65 69 76 65 20 64 |ect to r|eceive d|
|00005fa0| 61 74 61 67 72 61 6d 73 | 20 74 68 61 74 20 61 72 |atagrams| that ar|
|00005fb0| 65 20 6f 66 20 74 68 65 | 20 70 68 79 73 69 63 61 |e of the| physica|
|00005fc0| 6c 20 4d 61 78 69 6d 75 | 6d 20 54 72 61 6e 73 6d |l Maximu|m Transm|
|00005fd0| 69 73 73 69 6f 6e 20 55 | 6e 69 74 20 28 4d 54 55 |ission U|nit (MTU|
|00005fe0| 29 20 73 69 7a 65 2c 20 | 6d 61 6b 65 20 74 68 65 |) size, |make the|
|00005ff0| 20 55 44 50 4d 54 55 20 | 63 61 6c 6c 20 61 6e 64 | UDPMTU |call and|
|00006000| 20 75 73 65 20 74 68 65 | 20 72 65 74 75 72 6e 65 | use the| returne|
|00006010| 64 20 6e 75 6d 62 65 72 | 20 4e 20 74 6f 20 63 61 |d number| N to ca|
|00006020| 6c 63 75 6c 61 74 65 20 | 6d 65 6d 6f 72 79 20 73 |lculate |memory s|
|00006030| 69 7a 65 2e 0d 54 68 65 | 20 41 53 52 20 69 73 20 |ize..The| ASR is |
|00006040| 63 61 6c 6c 65 64 20 62 | 79 20 55 44 50 20 74 6f |called b|y UDP to|
|00006050| 20 6e 6f 74 69 66 79 20 | 74 68 65 20 75 73 65 72 | notify |the user|
|00006060| 20 6f 66 20 61 73 79 6e | 63 68 72 6f 6e 6f 75 73 | of asyn|chronous|
|00006070| 20 65 76 65 6e 74 73 20 | 73 75 63 68 20 61 73 20 | events |such as |
|00006080| 64 61 74 61 20 61 72 72 | 69 76 61 6c 20 61 6e 64 |data arr|ival and|
|00006090| 20 49 6e 74 65 72 6e 65 | 74 20 43 6f 6e 74 72 6f | Interne|t Contro|
|000060a0| 6c 20 4d 65 73 73 61 67 | 65 20 50 72 6f 74 6f 63 |l Messag|e Protoc|
|000060b0| 6f 6c 20 28 49 43 4d 50 | 29 20 6d 65 73 73 61 67 |ol (ICMP|) messag|
|000060c0| 65 73 2e 20 49 66 20 74 | 68 65 20 72 6f 75 74 69 |es. If t|he routi|
|000060d0| 6e 65 20 69 73 20 30 2c | 20 79 6f 75 20 61 72 65 |ne is 0,| you are|
|000060e0| 20 6e 6f 74 20 6e 6f 74 | 69 66 69 65 64 20 6f 66 | not not|ified of|
|000060f0| 20 61 73 79 6e 63 68 72 | 6f 6e 6f 75 73 20 65 76 | asynchr|onous ev|
|00006100| 65 6e 74 73 2e 20 53 65 | 65 20 74 68 65 20 6e 65 |ents. Se|e the ne|
|00006110| 78 74 20 73 65 63 74 69 | 6f 6e 2c 20 d2 55 44 50 |xt secti|on, .UDP|
|00006120| 20 41 73 79 6e 63 68 72 | 6f 6e 6f 75 73 20 4e 6f | Asynchr|onous No|
|00006130| 74 69 66 69 63 61 74 69 | 6f 6e 20 52 6f 75 74 69 |tificati|on Routi|
|00006140| 6e 65 2c d3 20 66 6f 72 | 20 6d 6f 72 65 20 69 6e |ne,. for| more in|
|00006150| 66 6f 72 6d 61 74 69 6f | 6e 2e 0d 49 66 20 74 68 |formatio|n..If th|
|00006160| 65 20 6c 6f 63 61 6c 20 | 70 6f 72 74 20 69 73 20 |e local |port is |
|00006170| 30 2c 20 55 44 50 20 61 | 73 73 69 67 6e 73 20 61 |0, UDP a|ssigns a|
|00006180| 6e 20 75 6e 75 73 65 64 | 20 6c 6f 63 61 6c 20 70 |n unused| local p|
|00006190| 6f 72 74 2e 0d 54 68 65 | 20 75 73 65 72 20 64 61 |ort..The| user da|
|000061a0| 74 61 20 70 6f 69 6e 74 | 65 72 20 69 73 20 72 65 |ta point|er is re|
|000061b0| 74 75 72 6e 65 64 20 69 | 6e 20 61 6c 6c 20 41 53 |turned i|n all AS|
|000061c0| 52 73 20 66 6f 72 20 74 | 68 65 20 63 72 65 61 74 |Rs for t|he creat|
|000061d0| 65 64 20 55 44 50 20 73 | 74 72 65 61 6d 2e 0d 52 |ed UDP s|tream..R|
|000061e0| 65 73 75 6c 74 20 63 6f | 64 65 73 09 6e 6f 45 72 |esult co|des.noEr|
|000061f0| 72 09 6e 6f 20 65 72 72 | 6f 72 0d 73 74 72 65 61 |r.no err|or.strea|
|00006200| 6d 41 6c 72 65 61 64 79 | 4f 70 65 6e 09 61 6e 20 |mAlready|Open.an |
|00006210| 6f 70 65 6e 20 73 74 72 | 65 61 6d 20 69 73 20 61 |open str|eam is a|
|00006220| 6c 72 65 61 64 79 20 75 | 73 69 6e 67 20 74 68 69 |lready u|sing thi|
|00006230| 73 20 72 65 63 65 69 76 | 65 20 62 75 66 66 65 72 |s receiv|e buffer|
|00006240| 20 61 72 65 61 0d 69 6e | 76 61 6c 69 64 4c 65 6e | area.in|validLen|
|00006250| 67 74 68 09 74 68 65 20 | 72 65 63 65 69 76 65 20 |gth.the |receive |
|00006260| 62 75 66 66 65 72 20 61 | 72 65 61 20 69 73 20 74 |buffer a|rea is t|
|00006270| 6f 6f 20 73 6d 61 6c 6c | 0d 69 6e 76 61 6c 69 64 |oo small|.invalid|
|00006280| 42 75 66 50 74 72 09 74 | 68 65 20 72 65 63 65 69 |BufPtr.t|he recei|
|00006290| 76 65 20 62 75 66 66 65 | 72 20 61 72 65 61 20 70 |ve buffe|r area p|
|000062a0| 6f 69 6e 74 65 72 20 69 | 73 20 30 0d 64 75 70 6c |ointer i|s 0.dupl|
|000062b0| 69 63 61 74 65 53 6f 63 | 6b 65 74 09 61 6e 20 6f |icateSoc|ket.an o|
|000062c0| 70 65 6e 20 73 74 72 65 | 61 6d 20 69 73 20 61 6c |pen stre|am is al|
|000062d0| 72 65 61 64 79 20 75 73 | 69 6e 67 20 74 68 69 73 |ready us|ing this|
|000062e0| 20 6c 6f 63 61 6c 20 55 | 44 50 20 70 6f 72 74 0d | local U|DP port.|
|000062f0| 69 6e 73 75 66 66 69 63 | 69 65 6e 74 52 65 73 6f |insuffic|ientReso|
|00006300| 75 72 63 65 73 09 36 34 | 20 55 44 50 20 73 74 72 |urces.64| UDP str|
|00006310| 65 61 6d 73 20 61 72 65 | 20 61 6c 72 65 61 64 79 |eams are| already|
|00006320| 20 6f 70 65 6e 0d 55 44 | 50 20 61 73 79 6e 63 68 | open.UD|P asynch|
|00006330| 72 6f 6e 6f 75 73 20 6e | 6f 74 69 66 69 63 61 74 |ronous n|otificat|
|00006340| 69 6f 6e 20 72 6f 75 74 | 69 6e 65 0d 54 68 65 20 |ion rout|ine.The |
|00006350| 61 73 79 6e 63 68 72 6f | 6e 6f 75 73 20 6e 6f 74 |asynchro|nous not|
|00006360| 69 66 69 63 61 74 69 6f | 6e 20 72 6f 75 74 69 6e |ificatio|n routin|
|00006370| 65 20 28 41 53 52 29 2c | 20 77 68 69 63 68 20 77 |e (ASR),| which w|
|00006380| 61 73 20 72 65 67 69 73 | 74 65 72 65 64 20 77 69 |as regis|tered wi|
|00006390| 74 68 20 55 44 50 20 69 | 6e 20 74 68 65 20 55 44 |th UDP i|n the UD|
|000063a0| 50 43 72 65 61 74 65 20 | 63 61 6c 6c 2c 20 69 73 |PCreate |call, is|
|000063b0| 20 63 61 6c 6c 65 64 20 | 62 79 20 55 44 50 20 74 | called |by UDP t|
|000063c0| 6f 20 6e 6f 74 69 66 79 | 20 79 6f 75 20 6f 66 20 |o notify| you of |
|000063d0| 61 73 79 6e 63 68 72 6f | 6e 6f 75 73 20 65 76 65 |asynchro|nous eve|
|000063e0| 6e 74 73 20 72 65 6c 65 | 76 61 6e 74 20 74 6f 20 |nts rele|vant to |
|000063f0| 61 20 70 61 72 74 69 63 | 75 6c 61 72 20 55 44 50 |a partic|ular UDP|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.