OpenTransportProviders.pas 65 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996
  1. {
  2. File: OSServices/OpenTransportProviders.h
  3. Contains: *** DEPRECATED *** This file contains provider-specific definitions for various built-in providers.
  4. Copyright: (c) 1993-2011 Apple Inc. and Mentat Inc. All rights reserved.
  5. Bugs?: For bug reports, consult the following page on
  6. the World Wide Web:
  7. http://bugs.freepascal.org
  8. }
  9. { Pascal Translation Updated: Peter N Lewis, <[email protected]>, November 2005 }
  10. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2009 }
  11. { Pascal Translation Updated: Jonas Maebe <[email protected]>, September 2012 }
  12. {
  13. Modified for use with Free Pascal
  14. Version 308
  15. Please report any bugs to <[email protected]>
  16. }
  17. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  18. {$mode macpas}
  19. {$modeswitch cblocks}
  20. {$packenum 1}
  21. {$macro on}
  22. {$inline on}
  23. {$calling mwpascal}
  24. {$IFNDEF FPC_DOTTEDUNITS}
  25. unit OpenTransportProviders;
  26. {$ENDIF FPC_DOTTEDUNITS}
  27. interface
  28. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  29. {$setc GAP_INTERFACES_VERSION := $0308}
  30. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  31. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  32. {$endc}
  33. {$ifc defined CPUPOWERPC and defined CPUI386}
  34. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  35. {$endc}
  36. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  37. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  38. {$endc}
  39. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  40. {$setc __ppc__ := 1}
  41. {$elsec}
  42. {$setc __ppc__ := 0}
  43. {$endc}
  44. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  45. {$setc __ppc64__ := 1}
  46. {$elsec}
  47. {$setc __ppc64__ := 0}
  48. {$endc}
  49. {$ifc not defined __i386__ and defined CPUI386}
  50. {$setc __i386__ := 1}
  51. {$elsec}
  52. {$setc __i386__ := 0}
  53. {$endc}
  54. {$ifc not defined __x86_64__ and defined CPUX86_64}
  55. {$setc __x86_64__ := 1}
  56. {$elsec}
  57. {$setc __x86_64__ := 0}
  58. {$endc}
  59. {$ifc not defined __arm__ and defined CPUARM}
  60. {$setc __arm__ := 1}
  61. {$elsec}
  62. {$setc __arm__ := 0}
  63. {$endc}
  64. {$ifc not defined __arm64__ and defined CPUAARCH64}
  65. {$setc __arm64__ := 1}
  66. {$elsec}
  67. {$setc __arm64__ := 0}
  68. {$endc}
  69. {$ifc defined cpu64}
  70. {$setc __LP64__ := 1}
  71. {$elsec}
  72. {$setc __LP64__ := 0}
  73. {$endc}
  74. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  75. {$error Conflicting definitions for __ppc__ and __i386__}
  76. {$endc}
  77. {$ifc defined __ppc__ and __ppc__}
  78. {$setc TARGET_CPU_PPC := TRUE}
  79. {$setc TARGET_CPU_PPC64 := FALSE}
  80. {$setc TARGET_CPU_X86 := FALSE}
  81. {$setc TARGET_CPU_X86_64 := FALSE}
  82. {$setc TARGET_CPU_ARM := FALSE}
  83. {$setc TARGET_CPU_ARM64 := FALSE}
  84. {$setc TARGET_OS_MAC := TRUE}
  85. {$setc TARGET_OS_IPHONE := FALSE}
  86. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  87. {$setc TARGET_OS_EMBEDDED := FALSE}
  88. {$elifc defined __ppc64__ and __ppc64__}
  89. {$setc TARGET_CPU_PPC := FALSE}
  90. {$setc TARGET_CPU_PPC64 := TRUE}
  91. {$setc TARGET_CPU_X86 := FALSE}
  92. {$setc TARGET_CPU_X86_64 := FALSE}
  93. {$setc TARGET_CPU_ARM := FALSE}
  94. {$setc TARGET_CPU_ARM64 := FALSE}
  95. {$setc TARGET_OS_MAC := TRUE}
  96. {$setc TARGET_OS_IPHONE := FALSE}
  97. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  98. {$setc TARGET_OS_EMBEDDED := FALSE}
  99. {$elifc defined __i386__ and __i386__}
  100. {$setc TARGET_CPU_PPC := FALSE}
  101. {$setc TARGET_CPU_PPC64 := FALSE}
  102. {$setc TARGET_CPU_X86 := TRUE}
  103. {$setc TARGET_CPU_X86_64 := FALSE}
  104. {$setc TARGET_CPU_ARM := FALSE}
  105. {$setc TARGET_CPU_ARM64 := FALSE}
  106. {$ifc defined iphonesim}
  107. {$setc TARGET_OS_MAC := FALSE}
  108. {$setc TARGET_OS_IPHONE := TRUE}
  109. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  110. {$elsec}
  111. {$setc TARGET_OS_MAC := TRUE}
  112. {$setc TARGET_OS_IPHONE := FALSE}
  113. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  114. {$endc}
  115. {$setc TARGET_OS_EMBEDDED := FALSE}
  116. {$elifc defined __x86_64__ and __x86_64__}
  117. {$setc TARGET_CPU_PPC := FALSE}
  118. {$setc TARGET_CPU_PPC64 := FALSE}
  119. {$setc TARGET_CPU_X86 := FALSE}
  120. {$setc TARGET_CPU_X86_64 := TRUE}
  121. {$setc TARGET_CPU_ARM := FALSE}
  122. {$setc TARGET_CPU_ARM64 := FALSE}
  123. {$ifc defined iphonesim}
  124. {$setc TARGET_OS_MAC := FALSE}
  125. {$setc TARGET_OS_IPHONE := TRUE}
  126. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  127. {$elsec}
  128. {$setc TARGET_OS_MAC := TRUE}
  129. {$setc TARGET_OS_IPHONE := FALSE}
  130. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  131. {$endc}
  132. {$setc TARGET_OS_EMBEDDED := FALSE}
  133. {$elifc defined __arm__ and __arm__}
  134. {$setc TARGET_CPU_PPC := FALSE}
  135. {$setc TARGET_CPU_PPC64 := FALSE}
  136. {$setc TARGET_CPU_X86 := FALSE}
  137. {$setc TARGET_CPU_X86_64 := FALSE}
  138. {$setc TARGET_CPU_ARM := TRUE}
  139. {$setc TARGET_CPU_ARM64 := FALSE}
  140. {$setc TARGET_OS_MAC := FALSE}
  141. {$setc TARGET_OS_IPHONE := TRUE}
  142. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  143. {$setc TARGET_OS_EMBEDDED := TRUE}
  144. {$elifc defined __arm64__ and __arm64__}
  145. {$setc TARGET_CPU_PPC := FALSE}
  146. {$setc TARGET_CPU_PPC64 := FALSE}
  147. {$setc TARGET_CPU_X86 := FALSE}
  148. {$setc TARGET_CPU_X86_64 := FALSE}
  149. {$setc TARGET_CPU_ARM := FALSE}
  150. {$setc TARGET_CPU_ARM64 := TRUE}
  151. {$ifc defined ios}
  152. {$setc TARGET_OS_MAC := FALSE}
  153. {$setc TARGET_OS_IPHONE := TRUE}
  154. {$setc TARGET_OS_EMBEDDED := TRUE}
  155. {$elsec}
  156. {$setc TARGET_OS_MAC := TRUE}
  157. {$setc TARGET_OS_IPHONE := FALSE}
  158. {$setc TARGET_OS_EMBEDDED := FALSE}
  159. {$endc}
  160. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  161. {$elsec}
  162. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
  163. {$endc}
  164. {$ifc defined __LP64__ and __LP64__ }
  165. {$setc TARGET_CPU_64 := TRUE}
  166. {$elsec}
  167. {$setc TARGET_CPU_64 := FALSE}
  168. {$endc}
  169. {$ifc defined FPC_BIG_ENDIAN}
  170. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  171. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  172. {$elifc defined FPC_LITTLE_ENDIAN}
  173. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  174. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  175. {$elsec}
  176. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  177. {$endc}
  178. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  179. {$setc CALL_NOT_IN_CARBON := FALSE}
  180. {$setc OLDROUTINENAMES := FALSE}
  181. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  182. {$setc OPAQUE_UPP_TYPES := TRUE}
  183. {$setc OTCARBONAPPLICATION := TRUE}
  184. {$setc OTKERNEL := FALSE}
  185. {$setc PM_USE_SESSION_APIS := TRUE}
  186. {$setc TARGET_API_MAC_CARBON := TRUE}
  187. {$setc TARGET_API_MAC_OS8 := FALSE}
  188. {$setc TARGET_API_MAC_OSX := TRUE}
  189. {$setc TARGET_CARBON := TRUE}
  190. {$setc TARGET_CPU_68K := FALSE}
  191. {$setc TARGET_CPU_MIPS := FALSE}
  192. {$setc TARGET_CPU_SPARC := FALSE}
  193. {$setc TARGET_OS_UNIX := FALSE}
  194. {$setc TARGET_OS_WIN32 := FALSE}
  195. {$setc TARGET_RT_MAC_68881 := FALSE}
  196. {$setc TARGET_RT_MAC_CFM := FALSE}
  197. {$setc TARGET_RT_MAC_MACHO := TRUE}
  198. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  199. {$setc TYPE_BOOL := FALSE}
  200. {$setc TYPE_EXTENDED := FALSE}
  201. {$setc TYPE_LONGLONG := TRUE}
  202. {$IFDEF FPC_DOTTEDUNITS}
  203. uses MacOsApi.MacTypes,MacOsApi.OpenTransport;
  204. {$ELSE FPC_DOTTEDUNITS}
  205. uses MacTypes,OpenTransport;
  206. {$ENDIF FPC_DOTTEDUNITS}
  207. {$endc} {not MACOSALLINCLUDE}
  208. { this header is only supported on Mac OS X < 10.4, and Mac OS X < 10.4 does
  209. not support i386
  210. }
  211. {$ifc TARGET_OS_MAC and TARGET_CPU_PPC}
  212. {$ALIGN MAC68K}
  213. {
  214. All OpenTransport Manager APIs are deprecated in MacOSX 10.4, instead of using OpenTransport,
  215. consider using CFNetwork or socket library.
  216. }
  217. { ***** TCP/IP *****}
  218. { Basic types}
  219. type
  220. InetPort = UInt16;
  221. InetHost = UInt32;
  222. { Enums used as address type designations.}
  223. const
  224. AF_INET = 2;
  225. const
  226. AF_DNS = 42;
  227. {
  228. Enum which can be used to bind to all IP interfaces
  229. rather than a specific one.
  230. }
  231. const
  232. kOTAnyInetAddress = 0; { Wildcard}
  233. {
  234. Define the InetSvcRef type. This type needs special
  235. processing because in C++ it's a subclass of TProvider.
  236. See the definition of TEndpointRef in "OpenTransport.h"
  237. for the logic behind this definition.
  238. }
  239. type
  240. InetSvcRef = ProviderRef; { an opaque type }
  241. InetSvcRefPtr = ^InetSvcRef;
  242. const
  243. kDefaultInternetServicesPath = -3;
  244. { Shared library prefixes}
  245. const
  246. kInetVersion = '3.1.1';
  247. const
  248. kInetPrefix = 'ot:inet$';
  249. { Module Names}
  250. const
  251. kDNRName = 'dnr';
  252. const
  253. kTCPName = 'tcp';
  254. const
  255. kUDPName = 'udp';
  256. const
  257. kRawIPName = 'rawip';
  258. { XTI Options}
  259. { Protocol levels}
  260. const
  261. INET_IP = $00;
  262. INET_TCP = $06;
  263. INET_UDP = $11;
  264. { TCP Level Options}
  265. const
  266. TCP_NODELAY = $01;
  267. TCP_MAXSEG = $02;
  268. TCP_NOTIFY_THRESHOLD = $10; {* not a real XTI option }
  269. TCP_ABORT_THRESHOLD = $11; {* not a real XTI option }
  270. TCP_CONN_NOTIFY_THRESHOLD = $12; {* not a real XTI option }
  271. TCP_CONN_ABORT_THRESHOLD = $13; {* not a real XTI option }
  272. TCP_OOBINLINE = $14; {* not a real XTI option }
  273. TCP_URGENT_PTR_TYPE = $15; {* not a real XTI option }
  274. TCP_KEEPALIVE = $0008; { keepalive defined in OpenTransport.h }
  275. const
  276. T_GARBAGE = 2;
  277. { UDP Level Options}
  278. const
  279. UDP_CHECKSUM = $0600;
  280. UDP_RX_ICMP = $02;
  281. { IP Level Options}
  282. const
  283. kIP_OPTIONS = $01;
  284. kIP_TOS = $02;
  285. kIP_TTL = $03;
  286. kIP_REUSEADDR = $04;
  287. kIP_DONTROUTE = $10;
  288. kIP_BROADCAST = $20;
  289. kIP_REUSEPORT = $0200;
  290. kIP_HDRINCL = $1002;
  291. kIP_RCVOPTS = $1005;
  292. kIP_RCVDSTADDR = $1007;
  293. kIP_MULTICAST_IF = $1010; { set/get IP multicast interface }
  294. kIP_MULTICAST_TTL = $1011; { set/get IP multicast timetolive }
  295. kIP_MULTICAST_LOOP = $1012; { set/get IP multicast loopback }
  296. kIP_ADD_MEMBERSHIP = $1013; { add an IP group membership }
  297. kIP_DROP_MEMBERSHIP = $1014; { drop an IP group membership }
  298. kIP_BROADCAST_IFNAME = $1015; { Set interface for broadcasts }
  299. kIP_RCVIFADDR = $1016; { Set interface for broadcasts }
  300. const
  301. IP_OPTIONS = 1;
  302. {
  303. BSD's netinet/in.h uses different values for the same IP_ logical constants.
  304. If you are using OT and want those values, prefix your use with k
  305. e.g. change IP_TTL to kIP_TTL in your source code
  306. }
  307. const
  308. DVMRP_INIT = 100; { DVMRP-specific setsockopt commands, from ip_mroute.h}
  309. DVMRP_DONE = 101;
  310. DVMRP_ADD_VIF = 102;
  311. DVMRP_DEL_VIF = 103;
  312. DVMRP_ADD_LGRP = 104;
  313. DVMRP_DEL_LGRP = 105;
  314. DVMRP_ADD_MRT = 106;
  315. DVMRP_DEL_MRT = 107;
  316. { IP_TOS precdence levels}
  317. const
  318. T_ROUTINE = 0;
  319. T_PRIORITY = 1;
  320. T_IMMEDIATE = 2;
  321. T_FLASH = 3;
  322. T_OVERRIDEFLASH = 4;
  323. T_CRITIC_ECP = 5;
  324. T_INETCONTROL = 6;
  325. T_NETCONTROL = 7;
  326. { IP_TOS type of service}
  327. const
  328. T_NOTOS = $00;
  329. T_LDELAY = 1 shl 4;
  330. T_HITHRPT = 1 shl 3;
  331. T_HIREL = 1 shl 2;
  332. // #define SET_TOS(prec,tos) (((0x7 & (prec)) << 5) | (0x1c & (tos)))
  333. { IP Multicast option structures}
  334. type
  335. TIPAddMulticastPtr = ^TIPAddMulticast;
  336. TIPAddMulticast = record
  337. multicastGroupAddress: InetHost;
  338. interfaceAddress: InetHost;
  339. end;
  340. { Protocol-specific events}
  341. const
  342. T_DNRSTRINGTOADDRCOMPLETE = kPRIVATEEVENT + 1;
  343. T_DNRADDRTONAMECOMPLETE = kPRIVATEEVENT + 2;
  344. T_DNRSYSINFOCOMPLETE = kPRIVATEEVENT + 3;
  345. T_DNRMAILEXCHANGECOMPLETE = kPRIVATEEVENT + 4;
  346. T_DNRQUERYCOMPLETE = kPRIVATEEVENT + 5;
  347. { InetAddress}
  348. type
  349. InetAddressPtr = ^InetAddress;
  350. InetAddress = record
  351. fAddressType: OTAddressType; { always AF_INET}
  352. fPort: InetPort; { Port number }
  353. fHost: InetHost; { Host address in net byte order}
  354. fUnused: packed array [0..7] of UInt8; { Traditional unused bytes }
  355. end;
  356. { Domain Name Resolver (DNR) }
  357. const
  358. kMaxHostAddrs = 10;
  359. kMaxSysStringLen = 32;
  360. kMaxHostNameLen = 255;
  361. type
  362. InetDomainName = packed array [0..255] of AnsiChar;
  363. InetHostInfoPtr = ^InetHostInfo;
  364. InetHostInfo = record
  365. name: InetDomainName;
  366. addrs: array [0..9] of InetHost;
  367. end;
  368. type
  369. InetSysInfoPtr = ^InetSysInfo;
  370. InetSysInfo = record
  371. cpuType: packed array [0..31] of AnsiChar;
  372. osType: packed array [0..31] of AnsiChar;
  373. end;
  374. type
  375. InetMailExchangePtr = ^InetMailExchange;
  376. InetMailExchange = record
  377. preference: UInt16;
  378. exchange: InetDomainName;
  379. end;
  380. type
  381. DNSQueryInfoPtr = ^DNSQueryInfo;
  382. DNSQueryInfo = record
  383. qType: UInt16;
  384. qClass: UInt16;
  385. ttl: UInt32;
  386. name: InetDomainName;
  387. responseType: UInt16; { answer, authority, or additional}
  388. resourceLen: UInt16; { actual length of array which follows}
  389. resourceData: packed array [0..3] of AnsiChar; { size varies}
  390. end;
  391. { DNSAddress}
  392. {
  393. The DNSAddress format is optional and may be used in connects,
  394. datagram sends, and resolve address calls. The name takes the
  395. format "somewhere.com" or "somewhere.com:portnumber" where
  396. the ":portnumber" is optional. The length of this structure
  397. is arbitrarily limited to the overall max length of a domain
  398. name (255 chars), although a longer one can be use successfully
  399. if you use this as a template for doing so. However, the domain name
  400. is still limited to 255 characters.
  401. }
  402. type
  403. DNSAddressPtr = ^DNSAddress;
  404. DNSAddress = record
  405. fAddressType: OTAddressType; { always AF_DNS}
  406. fName: InetDomainName;
  407. end;
  408. { InetInterfaceInfo}
  409. const
  410. kDefaultInetInterface = -1;
  411. const
  412. kInetInterfaceInfoVersion = 3;
  413. type
  414. InetInterfaceInfoPtr = ^InetInterfaceInfo;
  415. InetInterfaceInfo = record
  416. fAddress: InetHost;
  417. fNetmask: InetHost;
  418. fBroadcastAddr: InetHost;
  419. fDefaultGatewayAddr: InetHost;
  420. fDNSAddr: InetHost;
  421. fVersion: UInt16;
  422. fHWAddrLen: UInt16;
  423. fHWAddr: UInt8Ptr;
  424. fIfMTU: UInt32;
  425. fReservedPtrs: array [0..1] of Ptr;
  426. fDomainName: InetDomainName;
  427. fIPSecondaryCount: UInt32;
  428. fReserved: packed array [0..251] of UInt8;
  429. end;
  430. { InetDHCPOption}
  431. const
  432. kAllDHCPOptions = -1;
  433. kDHCPLongOption = 126;
  434. kDHCPLongOptionReq = 127;
  435. type
  436. InetDHCPOptionPtr = ^InetDHCPOption;
  437. InetDHCPOption = record
  438. fOptionTag: UInt8;
  439. fOptionLen: UInt8;
  440. fOptionValue: UInt8;
  441. pad: SInt8
  442. end;
  443. { TCP/IP Utility Routines}
  444. {$ifc not TARGET_CPU_64}
  445. {
  446. * OTInitInetAddress() *** DEPRECATED ***
  447. *
  448. * Availability:
  449. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  450. * CarbonLib: in CarbonLib 1.0 and later
  451. * Non-Carbon CFM: not available
  452. }
  453. procedure OTInitInetAddress( var addr: InetAddress; port: InetPort; host: InetHost ); external name '_OTInitInetAddress';
  454. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  455. {
  456. * OTInitDNSAddress() *** DEPRECATED ***
  457. *
  458. * Availability:
  459. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  460. * CarbonLib: in CarbonLib 1.0 and later
  461. * Non-Carbon CFM: not available
  462. }
  463. function OTInitDNSAddress( var addr: DNSAddress; str: CStringPtr ): OTByteCount; external name '_OTInitDNSAddress';
  464. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  465. {
  466. * OTInetStringToHost() *** DEPRECATED ***
  467. *
  468. * Availability:
  469. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  470. * CarbonLib: in CarbonLib 1.0 and later
  471. * Non-Carbon CFM: not available
  472. }
  473. function OTInetStringToHost( str: ConstCStringPtr; var host: InetHost ): OSStatus; external name '_OTInetStringToHost';
  474. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  475. {
  476. * OTInetHostToString() *** DEPRECATED ***
  477. *
  478. * Availability:
  479. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  480. * CarbonLib: in CarbonLib 1.0 and later
  481. * Non-Carbon CFM: not available
  482. }
  483. procedure OTInetHostToString( host: InetHost; str: CStringPtr ); external name '_OTInetHostToString';
  484. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  485. {
  486. * OTInetGetInterfaceInfo() *** DEPRECATED ***
  487. *
  488. * Availability:
  489. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  490. * CarbonLib: in CarbonLib 1.0 and later
  491. * Non-Carbon CFM: not available
  492. }
  493. function OTInetGetInterfaceInfo( var info: InetInterfaceInfo; val: SInt32 ): OSStatus; external name '_OTInetGetInterfaceInfo';
  494. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  495. {
  496. * OTInetGetSecondaryAddresses() *** DEPRECATED ***
  497. *
  498. * Availability:
  499. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  500. * CarbonLib: in CarbonLib 1.0 and later
  501. * Non-Carbon CFM: not available
  502. }
  503. function OTInetGetSecondaryAddresses( var addr: InetHost; var count: UInt32; val: SInt32 ): OSStatus; external name '_OTInetGetSecondaryAddresses';
  504. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  505. {$endc} {not TARGET_CPU_64}
  506. {
  507. * OTInetGetDHCPConfigInfo()
  508. *
  509. * Availability:
  510. * Mac OS X: not available
  511. * CarbonLib: not available
  512. * Non-Carbon CFM: not available
  513. }
  514. { InetServices & DNR Calls}
  515. {$ifc NOT OTKERNEL}
  516. {
  517. Under Carbon, OTOpenInternetServices routines take a client context pointer. Applications may pass NULL
  518. after calling InitOpenTransport(kInitOTForApplicationMask, ...). Non-applications must always pass a
  519. valid client context.
  520. }
  521. {$ifc not TARGET_CPU_64}
  522. {
  523. * OTOpenInternetServicesInContext() *** DEPRECATED ***
  524. *
  525. * Availability:
  526. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  527. * CarbonLib: in CarbonLib 1.0 and later
  528. * Non-Carbon CFM: not available
  529. }
  530. function OTOpenInternetServicesInContext( cfig: OTConfigurationRef; oflag: OTOpenFlags; var err: OSStatus; clientContext: OTClientContextPtr ): InetSvcRef; external name '_OTOpenInternetServicesInContext';
  531. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  532. {
  533. * OTAsyncOpenInternetServicesInContext() *** DEPRECATED ***
  534. *
  535. * Availability:
  536. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  537. * CarbonLib: in CarbonLib 1.0 and later
  538. * Non-Carbon CFM: not available
  539. }
  540. function OTAsyncOpenInternetServicesInContext( cfig: OTConfigurationRef; oflag: OTOpenFlags; upp: OTNotifyUPP; contextPtr: UnivPtr; clientContext: OTClientContextPtr ): OSStatus; external name '_OTAsyncOpenInternetServicesInContext';
  541. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  542. {$endc} {not TARGET_CPU_64}
  543. {
  544. * OTOpenInternetServices()
  545. *
  546. * Availability:
  547. * Mac OS X: not available
  548. * CarbonLib: not available
  549. * Non-Carbon CFM: not available
  550. }
  551. {
  552. * OTAsyncOpenInternetServices()
  553. *
  554. * Availability:
  555. * Mac OS X: not available
  556. * CarbonLib: not available
  557. * Non-Carbon CFM: not available
  558. }
  559. { The following macro may be used by applications only.}
  560. // #define OTOpenInternetServices(cfig, oflags, err) OTOpenInternetServicesInContext(cfig, oflags, err, NULL)
  561. // #define OTAsyncOpenInternetServices(cfig, oflags, proc, contextPtr) OTAsyncOpenInternetServicesInContext(cfig, oflags, proc, contextPtr, NULL)
  562. {$ifc not TARGET_CPU_64}
  563. {
  564. * OTInetStringToAddress() *** DEPRECATED ***
  565. *
  566. * Availability:
  567. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  568. * CarbonLib: in CarbonLib 1.0 and later
  569. * Non-Carbon CFM: not available
  570. }
  571. function OTInetStringToAddress( ref: InetSvcRef; name: CStringPtr; var hinfo: InetHostInfo ): OSStatus; external name '_OTInetStringToAddress';
  572. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  573. {
  574. * OTInetAddressToName() *** DEPRECATED ***
  575. *
  576. * Availability:
  577. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  578. * CarbonLib: in CarbonLib 1.0 and later
  579. * Non-Carbon CFM: not available
  580. }
  581. function OTInetAddressToName( ref: InetSvcRef; addr: InetHost; var name: InetDomainName ): OSStatus; external name '_OTInetAddressToName';
  582. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  583. {
  584. * OTInetSysInfo() *** DEPRECATED ***
  585. *
  586. * Availability:
  587. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  588. * CarbonLib: in CarbonLib 1.0 and later
  589. * Non-Carbon CFM: not available
  590. }
  591. function OTInetSysInfo( ref: InetSvcRef; name: CStringPtr; var sysinfo: InetSysInfo ): OSStatus; external name '_OTInetSysInfo';
  592. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  593. {
  594. * OTInetMailExchange() *** DEPRECATED ***
  595. *
  596. * Availability:
  597. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  598. * CarbonLib: in CarbonLib 1.0 and later
  599. * Non-Carbon CFM: not available
  600. }
  601. function OTInetMailExchange( ref: InetSvcRef; name: CStringPtr; var num: UInt16; mx: InetMailExchangePtr ): OSStatus; external name '_OTInetMailExchange';
  602. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  603. {
  604. * OTInetQuery() *** DEPRECATED ***
  605. *
  606. * Availability:
  607. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  608. * CarbonLib: in CarbonLib 1.0 and later
  609. * Non-Carbon CFM: not available
  610. }
  611. function OTInetQuery( ref: InetSvcRef; name: CStringPtr; qClass: UInt16; qType: UInt16; buf: CStringPtr; buflen: OTByteCount; var argv: UnivPtr; argvlen: OTByteCount; flags: OTFlags ): OSStatus; external name '_OTInetQuery';
  612. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  613. {$endc} {not TARGET_CPU_64}
  614. {$endc} { !OTKERNEL }
  615. { ***** AppleTalk *****}
  616. { Shared library prefixes}
  617. const
  618. kATalkVersion = '1.1';
  619. const
  620. kATalkPrefix = 'ot:atlk$';
  621. const
  622. kATBinderID = 'ot:atbd$';
  623. {******************************************************************************
  624. ** Module definitions
  625. *******************************************************************************}
  626. { XTI Levels}
  627. const
  628. ATK_DDP = FourCharCode('DDP ');
  629. ATK_AARP = FourCharCode('AARP');
  630. ATK_ATP = FourCharCode('ATP ');
  631. ATK_ADSP = FourCharCode('ADSP');
  632. ATK_ASP = FourCharCode('ASP ');
  633. ATK_PAP = FourCharCode('PAP ');
  634. ATK_NBP = FourCharCode('NBP ');
  635. ATK_ZIP = FourCharCode('ZIP ');
  636. { Module Names}
  637. const
  638. kDDPName = 'ddp';
  639. const
  640. kATPName = 'atp';
  641. const
  642. kADSPName = 'adsp';
  643. const
  644. kASPName = 'asp';
  645. const
  646. kPAPName = 'pap';
  647. const
  648. kNBPName = 'nbp';
  649. const
  650. kZIPName = 'zip';
  651. const
  652. kLTalkName = 'ltlk';
  653. const
  654. kLTalkAName = 'ltlkA';
  655. const
  656. kLTalkBName = 'ltlkB';
  657. {
  658. Protocol-specific Options
  659. NOTE:
  660. All Protocols support OPT_CHECKSUM (Value is (unsigned long)T_YES/T_NO)
  661. ATP supports OPT_RETRYCNT (# Retries, 0 = try once) and
  662. OPT_INTERVAL (# Milliseconds to wait)
  663. }
  664. const
  665. DDP_OPT_HOPCOUNT = $2100; { DDP UnitDataReq Only - set hop count, Value is (unsigned long) hop count }
  666. const
  667. DDP_OPT_CHECKSUM = $0600;
  668. DDP_OPT_SRCADDR = $2101; { DDP UnitDataReq Only - set src address, Value is DDPAddress }
  669. ATP_OPT_REPLYCNT = $2110; { AppleTalk - ATP Resp Pkt Ct Type, Value is (unsigned long) pkt count }
  670. ATP_OPT_DATALEN = $2111; { AppleTalk - ATP Pkt Data Len Type, Value is (unsigned long) length }
  671. ATP_OPT_RELTIMER = $2112; { AppleTalk - ATP Release Timer Type, Value is (unsigned long) timer, (See Inside AppleTalk, second edition }
  672. ATP_OPT_TRANID = $2113; { Value is (unsigned long) Boolean, Used to request Transaction ID, Returned with Transaction ID on requests }
  673. PAP_OPT_OPENRETRY = $2120; { AppleTalk - PAP OpenConn Retry count, Value is (unsigned long) T_YES/T_NO }
  674. { Protocol-Specific Events}
  675. {
  676. If you send the IOCTL: OTIoctl(I_OTGetMiscellaneousEvents, 1),
  677. you will receive the T_ATALKxxx events on your endpoint.
  678. NOTE: The endpoint does not need to be bound.
  679. }
  680. const
  681. kAppleTalkEvent = kPROTOCOLEVENT or $00010000;
  682. T_GETMYZONECOMPLETE = kAppleTalkEvent + 1;
  683. T_GETLOCALZONESCOMPLETE = kAppleTalkEvent + 2;
  684. T_GETZONELISTCOMPLETE = kAppleTalkEvent + 3;
  685. T_GETATALKINFOCOMPLETE = kAppleTalkEvent + 4;
  686. T_ATALKROUTERDOWNEVENT = kAppleTalkEvent + 51; { No routers have been seen for a while. If the cookie is NULL, all routers are gone. Otherwise, there is still an ARA router hanging around being used, and only the local cable has been timed out.}
  687. T_ATALKROUTERUPEVENT = kAppleTalkEvent + 52; { We didn't have a router, but now one has come up. Cookie is NULL for a normal router coming up, non-NULL for an ARA router coming on-line}
  688. T_ATALKZONENAMECHANGEDEVENT = kAppleTalkEvent + 53; { A Zone name change was issued from the router, so our AppleTalk Zone has changed.}
  689. T_ATALKCONNECTIVITYCHANGEDEVENT = kAppleTalkEvent + 54; { An ARA connection was established (cookie != NULL), or was disconnected (cookie == NULL)}
  690. T_ATALKINTERNETAVAILABLEEVENT = kAppleTalkEvent + 55; { A router has appeared, and our address is in the startup range. Cookie is hi/lo of new cable range.}
  691. T_ATALKCABLERANGECHANGEDEVENT = kAppleTalkEvent + 56; { A router has appeared, and it's incompatible with our current address. Cookie is hi/lo of new cable range.}
  692. const
  693. T_ATALKBADROUTEREVENT = kAppleTalkEvent + 70; { A bad router has appeared/disappeared on our network.}
  694. T_ALLNODESTAKENEVENT = kAppleTalkEvent + 71;
  695. T_FIXEDNODETAKENEVENT = kAppleTalkEvent + 72;
  696. T_MPPCOMPATCFIGEVENT = kAppleTalkEvent + 73;
  697. T_FIXEDNODEBADEVENT = kAppleTalkEvent + 74;
  698. const
  699. kAllATalkRoutersDown = 0; { This indicates that all routers are offline}
  700. kLocalATalkRoutersDown = -1; { This indicates that all local routers went offline, but an ARA router is still active}
  701. kARARouterDisconnected = -2; { This indicates that ARA was disconnected, do it's router went offline, and we have no local routers to fall back onto.}
  702. const
  703. kARARouterOnline = -1; { We had no local routers, but an ARA router is now online.}
  704. kATalkRouterOnline = 0; { We had no routers, but a local router is now online}
  705. kLocalATalkRouterOnline = -2; { We have an ARA router, but now we've seen a local router as well}
  706. // #define IsAppleTalkEvent(x) ((x) & 0xffff0000) == kAppleTalkEvent)
  707. { Protocol-specific IOCTLs}
  708. const
  709. ATALK_IOC_FULLSELFSEND = $542F; { Turn on/off full self-send (it's automatic for non-backward-compatible links) }
  710. ADSP_IOC_FORWARDRESET = $543C; { ADSP Forward Reset }
  711. { Protocol-specific constants}
  712. { ECHO}
  713. const
  714. kECHO_TSDU = 585; { Max. # of data bytes.}
  715. { NBP}
  716. const
  717. kNBPMaxNameLength = 32;
  718. kNBPMaxTypeLength = 32;
  719. kNBPMaxZoneLength = 32;
  720. kNBPSlushLength = 9; { Extra space for @, : and a few escape chars}
  721. kNBPMaxEntityLength = kNBPMaxNameLength + kNBPMaxTypeLength + kNBPMaxZoneLength + 3;
  722. kNBPEntityBufferSize = kNBPMaxNameLength + kNBPMaxTypeLength + kNBPMaxZoneLength + kNBPSlushLength;
  723. kNBPWildCard = $3D; { NBP name and type match anything '='}
  724. kNBPImbeddedWildCard = $C5; { NBP name and type match some 'Å'}
  725. kNBPDefaultZone = $2A; { NBP default zone '*'}
  726. { ZIP}
  727. const
  728. kZIPMaxZoneLength = kNBPMaxZoneLength;
  729. const
  730. kDDPAddressLength = 8; { value to use in netbuf.len field, Maximum length of AppleTalk address}
  731. kNBPAddressLength = kNBPEntityBufferSize;
  732. kAppleTalkAddressLength = kDDPAddressLength + kNBPEntityBufferSize;
  733. // #define OTCopyDDPAddress(addr, dest) \
  734. // { \
  735. // ((UInt32*)(dest))[0] = ((UInt32*)(addr))[0]; \
  736. // ((UInt32*)(dest))[1] = ((UInt32*)(addr))[1]; \
  737. // }
  738. {******************************************************************************
  739. ** CLASS TAppleTalkServices
  740. *******************************************************************************}
  741. {$ifc NOT OTKERNEL}
  742. {
  743. Define the ATSvcRef type. This type needs special
  744. processing because in C++ it's a subclass of TProvider.
  745. See the definition of TEndpointRef in "OpenTransport.h"
  746. for the logic behind this definition.
  747. }
  748. type
  749. ATSvcRef = ^SInt32; { an opaque type }
  750. ATSvcRefPtr = ^ATSvcRef;
  751. const
  752. kDefaultAppleTalkServicesPath = -3;
  753. {
  754. Under Carbon, OpenAppleTalkServices routines take a client context pointer. Applications may pass NULL
  755. after calling InitOpenTransport(kInitOTForApplicationMask, ...). Non-applications must always pass a
  756. valid client context.
  757. }
  758. {$ifc not TARGET_CPU_64}
  759. {
  760. * OTAsyncOpenAppleTalkServicesInContext() *** DEPRECATED ***
  761. *
  762. * Availability:
  763. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  764. * CarbonLib: in CarbonLib 1.0 and later
  765. * Non-Carbon CFM: not available
  766. }
  767. function OTAsyncOpenAppleTalkServicesInContext( cfig: OTConfigurationRef; flags: OTOpenFlags; proc: OTNotifyUPP; contextPtr: UnivPtr; clientContext: OTClientContextPtr ): OSStatus; external name '_OTAsyncOpenAppleTalkServicesInContext';
  768. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  769. {
  770. * OTOpenAppleTalkServicesInContext() *** DEPRECATED ***
  771. *
  772. * Availability:
  773. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  774. * CarbonLib: in CarbonLib 1.0 and later
  775. * Non-Carbon CFM: not available
  776. }
  777. function OTOpenAppleTalkServicesInContext( cfig: OTConfigurationRef; flags: OTOpenFlags; var err: OSStatus; clientContext: OTClientContextPtr ): ATSvcRef; external name '_OTOpenAppleTalkServicesInContext';
  778. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  779. {$endc} {not TARGET_CPU_64}
  780. {
  781. * OTAsyncOpenAppleTalkServices()
  782. *
  783. * Availability:
  784. * Mac OS X: not available
  785. * CarbonLib: not available
  786. * Non-Carbon CFM: not available
  787. }
  788. {
  789. * OTOpenAppleTalkServices()
  790. *
  791. * Availability:
  792. * Mac OS X: not available
  793. * CarbonLib: not available
  794. * Non-Carbon CFM: not available
  795. }
  796. { The following macro may be used by applications only.}
  797. // #define OTOpenAppleTalkServices(cfig, oflags, err) OTOpenAppleTalkServicesInContext(cfig, oflags, err, NULL)
  798. // #define OTAsyncOpenAppleTalkServices(cfig, oflags, proc, contextPtr) OTAsyncOpenAppleTalkServicesInContext(cfig, oflags, proc, contextPtr, NULL)
  799. { Get the zone associated with the ATSvcRef}
  800. {$ifc not TARGET_CPU_64}
  801. {
  802. * OTATalkGetMyZone() *** DEPRECATED ***
  803. *
  804. * Availability:
  805. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  806. * CarbonLib: in CarbonLib 1.0.2 and later
  807. * Non-Carbon CFM: not available
  808. }
  809. function OTATalkGetMyZone( ref: ATSvcRef; var zone: TNetbuf ): OSStatus; external name '_OTATalkGetMyZone';
  810. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  811. {
  812. Get the list of available zones associated with the local cable
  813. of the ATSvcRef
  814. }
  815. {
  816. * OTATalkGetLocalZones() *** DEPRECATED ***
  817. *
  818. * Availability:
  819. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  820. * CarbonLib: in CarbonLib 1.0.2 and later
  821. * Non-Carbon CFM: not available
  822. }
  823. function OTATalkGetLocalZones( ref: ATSvcRef; var zones: TNetbuf ): OSStatus; external name '_OTATalkGetLocalZones';
  824. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  825. { Get the list of all zones on the internet specified by the ATSvcRef}
  826. {
  827. * OTATalkGetZoneList() *** DEPRECATED ***
  828. *
  829. * Availability:
  830. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  831. * CarbonLib: in CarbonLib 1.0.2 and later
  832. * Non-Carbon CFM: not available
  833. }
  834. function OTATalkGetZoneList( ref: ATSvcRef; var zones: TNetbuf ): OSStatus; external name '_OTATalkGetZoneList';
  835. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  836. { Stores an AppleTalkInfo structure into the TNetbuf (see later in this file)}
  837. {
  838. * OTATalkGetInfo() *** DEPRECATED ***
  839. *
  840. * Availability:
  841. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  842. * CarbonLib: in CarbonLib 1.0.2 and later
  843. * Non-Carbon CFM: not available
  844. }
  845. function OTATalkGetInfo( ref: ATSvcRef; var info: TNetbuf ): OSStatus; external name '_OTATalkGetInfo';
  846. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  847. {$endc} {not TARGET_CPU_64}
  848. {$endc} { !OTKERNEL }
  849. { AppleTalk Addressing}
  850. {
  851. The NBPEntity structure is used to manipulate NBP names without regard
  852. to issues of what kind of "special" characters are in the name.
  853. When stored as an address in an NBPAddress or DDPNBPAddress, they are
  854. stored as a character string, which is currently just ASCII, but in the
  855. future may be UniChar, or some other internationalizable scripting set.
  856. The string following an NBPAddress or DDPNBPAddress is intended to be
  857. suitable for showing to users, whereas NBPEntity is not.
  858. WARNING: NBPAddress and DDPNBPAddress structures do not "know" the length
  859. of the address. That must have been obtained as part of a Lookup or
  860. ResolveAddress call.
  861. }
  862. const
  863. AF_ATALK_FAMILY = $0100;
  864. AF_ATALK_DDP = $0100;
  865. AF_ATALK_DDPNBP = AF_ATALK_FAMILY + 1;
  866. AF_ATALK_NBP = AF_ATALK_FAMILY + 2;
  867. AF_ATALK_MNODE = AF_ATALK_FAMILY + 3;
  868. type
  869. NBPEntityPtr = ^NBPEntity;
  870. NBPEntity = record
  871. fEntity: packed array [0..99] of UInt8; {one extra pad byte}
  872. end;
  873. type
  874. DDPAddressPtr = ^DDPAddress;
  875. DDPAddress = record
  876. fAddressType: OTAddressType; { One of the enums above}
  877. fNetwork: UInt16;
  878. fNodeID: UInt8;
  879. fSocket: UInt8;
  880. fDDPType: UInt8;
  881. fPad: UInt8;
  882. end;
  883. type
  884. NBPAddressPtr = ^NBPAddress;
  885. NBPAddress = record
  886. fAddressType: OTAddressType; { One of the enums above}
  887. fNBPNameBuffer: packed array [0..104] of UInt8;
  888. end;
  889. type
  890. DDPNBPAddressPtr = ^DDPNBPAddress;
  891. DDPNBPAddress = record
  892. fAddressType: OTAddressType; { One of the enums above}
  893. fNetwork: UInt16;
  894. fNodeID: UInt8;
  895. fSocket: UInt8;
  896. fDDPType: UInt8;
  897. fPad: UInt8;
  898. fNBPNameBuffer: packed array [0..104] of UInt8;
  899. end;
  900. { These are some utility routines for dealing with NBP and DDP addresses. }
  901. { Functions to initialize the various AppleTalk Address types}
  902. {$ifc not TARGET_CPU_64}
  903. {
  904. * OTInitDDPAddress() *** DEPRECATED ***
  905. *
  906. * Availability:
  907. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  908. * CarbonLib: in CarbonLib 1.0 and later
  909. * Non-Carbon CFM: not available
  910. }
  911. procedure OTInitDDPAddress( var addr: DDPAddress; net: UInt16; node: ByteParameter; socket: ByteParameter; ddpType: ByteParameter ); external name '_OTInitDDPAddress';
  912. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  913. {
  914. * OTInitNBPAddress() *** DEPRECATED ***
  915. *
  916. * Availability:
  917. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  918. * CarbonLib: in CarbonLib 1.0 and later
  919. * Non-Carbon CFM: not available
  920. }
  921. function OTInitNBPAddress( var addr: NBPAddress; name: ConstCStringPtr ): OTByteCount; external name '_OTInitNBPAddress';
  922. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  923. {
  924. * OTInitDDPNBPAddress() *** DEPRECATED ***
  925. *
  926. * Availability:
  927. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  928. * CarbonLib: in CarbonLib 1.0 and later
  929. * Non-Carbon CFM: not available
  930. }
  931. function OTInitDDPNBPAddress( var addr: DDPNBPAddress; name: ConstCStringPtr; net: UInt16; node: ByteParameter; socket: ByteParameter; ddpType: ByteParameter ): OTByteCount; external name '_OTInitDDPNBPAddress';
  932. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  933. { Compare 2 DDP addresses for equality}
  934. {
  935. * OTCompareDDPAddresses() *** DEPRECATED ***
  936. *
  937. * Availability:
  938. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  939. * CarbonLib: in CarbonLib 1.0 and later
  940. * Non-Carbon CFM: not available
  941. }
  942. function OTCompareDDPAddresses( const (*var*) addr1: DDPAddress; const (*var*) addr2: DDPAddress ): Boolean; external name '_OTCompareDDPAddresses';
  943. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  944. { Init an NBPEntity to a NULL name}
  945. {
  946. * OTInitNBPEntity() *** DEPRECATED ***
  947. *
  948. * Availability:
  949. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  950. * CarbonLib: in CarbonLib 1.0 and later
  951. * Non-Carbon CFM: not available
  952. }
  953. procedure OTInitNBPEntity( var entity: NBPEntity ); external name '_OTInitNBPEntity';
  954. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  955. { Get the length an NBPEntity would have when stored as an address}
  956. {
  957. * OTGetNBPEntityLengthAsAddress() *** DEPRECATED ***
  958. *
  959. * Availability:
  960. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  961. * CarbonLib: in CarbonLib 1.0 and later
  962. * Non-Carbon CFM: not available
  963. }
  964. function OTGetNBPEntityLengthAsAddress( const (*var*) entity: NBPEntity ): OTByteCount; external name '_OTGetNBPEntityLengthAsAddress';
  965. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  966. { Store an NBPEntity into an address buffer}
  967. {
  968. * OTSetAddressFromNBPEntity() *** DEPRECATED ***
  969. *
  970. * Availability:
  971. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  972. * CarbonLib: in CarbonLib 1.0 and later
  973. * Non-Carbon CFM: not available
  974. }
  975. function OTSetAddressFromNBPEntity( nameBuf: UInt8Ptr; const (*var*) entity: NBPEntity ): OTByteCount; external name '_OTSetAddressFromNBPEntity';
  976. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  977. { Create an address buffer from a string (use -1 for len to use strlen)}
  978. {
  979. * OTSetAddressFromNBPString() *** DEPRECATED ***
  980. *
  981. * Availability:
  982. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  983. * CarbonLib: in CarbonLib 1.0 and later
  984. * Non-Carbon CFM: not available
  985. }
  986. function OTSetAddressFromNBPString( addrBuf: UInt8Ptr; name: ConstCStringPtr; len: SInt32 ): OTByteCount; external name '_OTSetAddressFromNBPString';
  987. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  988. {
  989. Create an NBPEntity from an address buffer. False is returned if
  990. the address was truncated.
  991. }
  992. {
  993. * OTSetNBPEntityFromAddress() *** DEPRECATED ***
  994. *
  995. * Availability:
  996. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  997. * CarbonLib: in CarbonLib 1.0 and later
  998. * Non-Carbon CFM: not available
  999. }
  1000. function OTSetNBPEntityFromAddress( var entity: NBPEntity; addrBuf: UInt8Ptr; len: OTByteCount ): Boolean; external name '_OTSetNBPEntityFromAddress';
  1001. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  1002. { Routines to set a piece of an NBP entity from a character string}
  1003. {
  1004. * OTSetNBPName() *** DEPRECATED ***
  1005. *
  1006. * Availability:
  1007. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  1008. * CarbonLib: in CarbonLib 1.0 and later
  1009. * Non-Carbon CFM: not available
  1010. }
  1011. function OTSetNBPName( var entity: NBPEntity; name: ConstCStringPtr ): Boolean; external name '_OTSetNBPName';
  1012. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  1013. {
  1014. * OTSetNBPType() *** DEPRECATED ***
  1015. *
  1016. * Availability:
  1017. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  1018. * CarbonLib: in CarbonLib 1.0 and later
  1019. * Non-Carbon CFM: not available
  1020. }
  1021. function OTSetNBPType( var entity: NBPEntity; typeVal: ConstCStringPtr ): Boolean; external name '_OTSetNBPType';
  1022. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  1023. {
  1024. * OTSetNBPZone() *** DEPRECATED ***
  1025. *
  1026. * Availability:
  1027. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  1028. * CarbonLib: in CarbonLib 1.0 and later
  1029. * Non-Carbon CFM: not available
  1030. }
  1031. function OTSetNBPZone( var entity: NBPEntity; zone: ConstCStringPtr ): Boolean; external name '_OTSetNBPZone';
  1032. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  1033. { Routines to extract pieces of an NBP entity}
  1034. {
  1035. * OTExtractNBPName() *** DEPRECATED ***
  1036. *
  1037. * Availability:
  1038. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  1039. * CarbonLib: in CarbonLib 1.0 and later
  1040. * Non-Carbon CFM: not available
  1041. }
  1042. procedure OTExtractNBPName( const (*var*) entity: NBPEntity; name: CStringPtr ); external name '_OTExtractNBPName';
  1043. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  1044. {
  1045. * OTExtractNBPType() *** DEPRECATED ***
  1046. *
  1047. * Availability:
  1048. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  1049. * CarbonLib: in CarbonLib 1.0 and later
  1050. * Non-Carbon CFM: not available
  1051. }
  1052. procedure OTExtractNBPType( const (*var*) entity: NBPEntity; typeVal: CStringPtr ); external name '_OTExtractNBPType';
  1053. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  1054. {
  1055. * OTExtractNBPZone() *** DEPRECATED ***
  1056. *
  1057. * Availability:
  1058. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  1059. * CarbonLib: in CarbonLib 1.0 and later
  1060. * Non-Carbon CFM: not available
  1061. }
  1062. procedure OTExtractNBPZone( const (*var*) entity: NBPEntity; zone: CStringPtr ); external name '_OTExtractNBPZone';
  1063. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_4,__IPHONE_NA,__IPHONE_NA) *)
  1064. { AppleTalkInfo as used by the OTGetATalkInfo function}
  1065. {$endc} {not TARGET_CPU_64}
  1066. type
  1067. AppleTalkInfoPtr = ^AppleTalkInfo;
  1068. AppleTalkInfo = record
  1069. fOurAddress: DDPAddress; { Our DDP address (network # & node)}
  1070. fRouterAddress: DDPAddress; { The address of a router on our cable}
  1071. fCableRange: array [0..1] of UInt16; { The current cable range }
  1072. fFlags: UInt16; { See below}
  1073. end;
  1074. { For the fFlags field in AppleTalkInfo}
  1075. const
  1076. kATalkInfoIsExtended = $0001; { This is an extended (phase 2) network}
  1077. kATalkInfoHasRouter = $0002; { This cable has a router}
  1078. kATalkInfoOneZone = $0004; { This cable has only one zone}
  1079. { ***** Ethernet *****}
  1080. { Interface option flags}
  1081. { Ethernet framing options}
  1082. const
  1083. kOTFramingEthernet = $01;
  1084. kOTFramingEthernetIPX = $02;
  1085. kOTFraming8023 = $04;
  1086. kOTFraming8022 = $08;
  1087. {
  1088. These are obsolete and will be going away in OT 1.5.
  1089. Hmmm, OT 1.5 got cancelled. The status of these options
  1090. is uncertain.
  1091. }
  1092. { RawMode options}
  1093. const
  1094. kOTRawRcvOn = 0;
  1095. kOTRawRcvOff = 1;
  1096. kOTRawRcvOnWithTimeStamp = 2;
  1097. const
  1098. DL_PROMISC_OFF = 0; { OPT_SETPROMISCUOUS value}
  1099. { Module definitions}
  1100. { Module IDs}
  1101. const
  1102. kT8022ModuleID = 7100;
  1103. kEnetModuleID = 7101;
  1104. kTokenRingModuleID = 7102;
  1105. kFDDIModuleID = 7103;
  1106. { Module Names}
  1107. const
  1108. kEnet8022Name = 'enet8022x';
  1109. const
  1110. kEnetName = 'enet';
  1111. const
  1112. kFastEnetName = 'fenet';
  1113. const
  1114. kTokenRingName = 'tokn';
  1115. const
  1116. kFDDIName = 'fddi';
  1117. const
  1118. kIRTalkName = 'irtlk';
  1119. const
  1120. kSMDSName = 'smds';
  1121. const
  1122. kATMName = 'atm';
  1123. const
  1124. kT8022Name = 'tpi8022x';
  1125. const
  1126. kATMSNAPName = 'atmsnap';
  1127. const
  1128. kFireWireName = 'firewire';
  1129. const
  1130. kFibreChannelName = 'fibre';
  1131. { Address Family}
  1132. const
  1133. AF_8022 = 8200; { Our 802.2 generic address family}
  1134. { XTI Levels}
  1135. const
  1136. LNK_ENET = FourCharCode('ENET');
  1137. LNK_TOKN = FourCharCode('TOKN');
  1138. LNK_FDDI = FourCharCode('FDDI');
  1139. LNK_TPI = FourCharCode('LTPI');
  1140. { Options}
  1141. const
  1142. OPT_ADDMCAST = $1000;
  1143. OPT_DELMCAST = $1001;
  1144. OPT_RCVPACKETTYPE = $1002;
  1145. OPT_RCVDESTADDR = $1003;
  1146. OPT_SETRAWMODE = $1004;
  1147. OPT_SETPROMISCUOUS = $1005;
  1148. type
  1149. OTPacketType = UInt32;
  1150. const
  1151. kETypeStandard = 0;
  1152. kETypeMulticast = 1;
  1153. kETypeBroadcast = 2;
  1154. kETRawPacketBit = $80000000;
  1155. kETTimeStampBit = $40000000;
  1156. { Link related constants}
  1157. const
  1158. kMulticastLength = 6; { length of an ENET hardware addressaddress}
  1159. k48BitAddrLength = 6;
  1160. k8022DLSAPLength = 2; { The protocol type is our DLSAP}
  1161. k8022SNAPLength = 5;
  1162. kEnetAddressLength = k48BitAddrLength + k8022DLSAPLength; { length of an address field used by the ENET enpoint}
  1163. { = k48BitAddrLength + sizeof(protocol type)}
  1164. kSNAPSAP = $00AA; { Special DLSAPS for ENET}
  1165. kIPXSAP = $00FF;
  1166. kMax8022SAP = $00FE;
  1167. k8022GlobalSAP = $00FF;
  1168. kMinDIXSAP = 1501;
  1169. kMaxDIXSAP = $FFFF;
  1170. { Generic Address Structure}
  1171. type
  1172. T8022AddressPtr = ^T8022Address;
  1173. T8022Address = record
  1174. fAddrFamily: OTAddressType;
  1175. fHWAddr: packed array [0..5] of UInt8;
  1176. fSAP: UInt16;
  1177. fSNAP: packed array [0..4] of UInt8;
  1178. end;
  1179. const
  1180. k8022BasicAddressLength = SizeOf(OTAddressType) + k48BitAddrLength + sizeof(UInt16);
  1181. k8022SNAPAddressLength = SizeOf(OTAddressType) + k48BitAddrLength + sizeof(UInt16) + k8022SNAPLength;
  1182. { Some helpful stuff for dealing with 48 bit addresses}
  1183. // #define OTCompare48BitAddresses(p1, p2) \
  1184. // (*(const UInt32*)((const UInt8*)(p1)) == *(const UInt32*)((const UInt8*)(p2)) && \
  1185. // *(const UInt16*)(((const UInt8*)(p1))+4) == *(const UInt16*)(((const UInt8*)(p2))+4) )
  1186. //
  1187. // #define OTCopy48BitAddress(p1, p2) \
  1188. // (*(UInt32*)((UInt8*)(p2)) = *(const UInt32*)((const UInt8*)(p1)), \
  1189. // *(UInt16*)(((UInt8*)(p2))+4) = *(const UInt16*)(((const UInt8*)(p1))+4) )
  1190. //
  1191. // #define OTClear48BitAddress(p1) \
  1192. // (*(UInt32*)((UInt8*)(p1)) = 0, \
  1193. // *(UInt16*)(((UInt8*)(p1))+4) = 0 )
  1194. //
  1195. // #define OTCompare8022SNAP(p1, p2) \
  1196. // (*(const UInt32*)((const UInt8*)(p1)) == *(const UInt32*)((const UInt8*)(p2)) && \
  1197. // *(((const UInt8*)(p1))+4) == *(((const UInt8*)(p2))+4) )
  1198. //
  1199. // #define OTCopy8022SNAP(p1, p2) \
  1200. // (*(UInt32*)((UInt8*)(p2)) = *(const UInt32*)((const UInt8*)(p1)), \
  1201. // *(((UInt8*)(p2))+4) = *(((const UInt8*)(p1))+4) )
  1202. //
  1203. // #define OTIs48BitBroadcastAddress(p1) \
  1204. // (*(UInt32*)((UInt8*)(p1)) == 0xffffffff && \
  1205. // *(UInt16*)(((UInt8*)(p1))+4) == 0xffff )
  1206. //
  1207. // #define OTSet48BitBroadcastAddress(p1) \
  1208. // (*(UInt32*)((UInt8*)(p1)) = 0xffffffff, \
  1209. // *(UInt16*)(((UInt8*)(p1))+4) = 0xffff )
  1210. //
  1211. // #define OTIs48BitZeroAddress(p1) \
  1212. // (*(UInt32*)((UInt8*)(p1)) == 0 && \
  1213. // *(UInt16*)(((UInt8*)(p1))+4) == 0 )
  1214. { Link related constants}
  1215. const
  1216. kEnetPacketHeaderLength = (2 * k48BitAddrLength) + k8022DLSAPLength;
  1217. kEnetTSDU = 1514; { The TSDU for ethernet.}
  1218. kTokenRingTSDU = 4458; { The TSDU for TokenRing.}
  1219. kFDDITSDU = 4458; { The TSDU for FDDI. }
  1220. k8022SAPLength = 1;
  1221. k8022BasicHeaderLength = 3; { define the length of the header portion of an 802.2 packet.}
  1222. { = SSAP+DSAP+ControlByte}
  1223. k8022SNAPHeaderLength = k8022SNAPLength + k8022BasicHeaderLength;
  1224. {******************************************************************************
  1225. ** Address Types recognized by the Enet DLPI
  1226. *******************************************************************************}
  1227. type
  1228. EAddrType = UInt32;
  1229. const
  1230. keaStandardAddress = 0;
  1231. keaMulticast = 1;
  1232. keaBroadcast = 2;
  1233. keaBadAddress = 3;
  1234. keaRawPacketBit = $80000000;
  1235. keaTimeStampBit = $40000000;
  1236. { Packet Header Structures}
  1237. type
  1238. EnetPacketHeaderPtr = ^EnetPacketHeader;
  1239. EnetPacketHeader = packed record
  1240. fDestAddr: packed array [0..5] of UInt8;
  1241. fSourceAddr: packed array [0..5] of UInt8;
  1242. fProto: UInt16;
  1243. end;
  1244. type
  1245. T8022HeaderPtr = ^T8022Header;
  1246. T8022Header = record
  1247. fDSAP: UInt8;
  1248. fSSAP: UInt8;
  1249. fCtrl: UInt8;
  1250. pad: SInt8
  1251. end;
  1252. type
  1253. T8022SNAPHeaderPtr = ^T8022SNAPHeader;
  1254. T8022SNAPHeader = record
  1255. fDSAP: UInt8;
  1256. fSSAP: UInt8;
  1257. fCtrl: UInt8;
  1258. fSNAP0: UInt8;
  1259. fSNAP1: UInt8;
  1260. fSNAP2: UInt8;
  1261. fSNAP3: UInt8;
  1262. fSNAP4: UInt8;
  1263. end;
  1264. type
  1265. T8022FullPacketHeaderPtr = ^T8022FullPacketHeader;
  1266. T8022FullPacketHeader = record
  1267. fEnetPart: EnetPacketHeader;
  1268. f8022Part: T8022SNAPHeader;
  1269. end;
  1270. { Define the lengths of the structures above}
  1271. const
  1272. kT8022HeaderLength = 3;
  1273. kT8022SNAPHeaderLength = 3 + k8022SNAPLength;
  1274. kT8022FullPacketHeaderLength = kEnetPacketHeaderLength + kT8022SNAPHeaderLength;
  1275. { ***** Serial *****}
  1276. { Module Definitions}
  1277. { XTI Level}
  1278. const
  1279. COM_SERIAL = FourCharCode('SERL');
  1280. { Version Number}
  1281. const
  1282. kSerialABVersion = '1.1.1';
  1283. { Module Names}
  1284. const
  1285. kSerialABName = 'serialAB';
  1286. const
  1287. kSerialName = 'serial';
  1288. const
  1289. kSerialPortAName = 'serialA';
  1290. const
  1291. kSerialPortBName = 'serialB';
  1292. const
  1293. kSerialABModuleID = 7200;
  1294. const
  1295. kOTSerialFramingAsync = $01; { Support Async serial mode }
  1296. kOTSerialFramingHDLC = $02; { Support HDLC synchronous serial mode }
  1297. kOTSerialFramingSDLC = $04; { Support SDLC synchronous serial mode }
  1298. kOTSerialFramingAsyncPackets = $08; { Support Async "packet" serial mode }
  1299. kOTSerialFramingPPP = $10; { Port does its own PPP framing - wants unframed packets from PPP }
  1300. { IOCTL Calls for Serial Drivers}
  1301. const
  1302. I_SetSerialDTR = $5500; { Set DTR (0 = off, 1 = on) }
  1303. kOTSerialSetDTROff = 0;
  1304. kOTSerialSetDTROn = 1;
  1305. I_SetSerialBreak = $5501; { Send a break on the line - kOTSerialSetBreakOff = off, kOTSerialSetBreakOn = on,}
  1306. { Any other number is the number of milliseconds to leave break on, then}
  1307. { auto shutoff}
  1308. kOTSerialSetBreakOn = $FFFFFFFF;
  1309. kOTSerialSetBreakOff = 0;
  1310. I_SetSerialXOffState = $5502; { Force XOFF state - 0 = Unconditionally clear XOFF state, 1 = unconditionally set it}
  1311. kOTSerialForceXOffTrue = 1;
  1312. kOTSerialForceXOffFalse = 0;
  1313. I_SetSerialXOn = $5503; { Send an XON character, 0 = send only if in XOFF state, 1 = send always}
  1314. kOTSerialSendXOnAlways = 1;
  1315. kOTSerialSendXOnIfXOffTrue = 0;
  1316. I_SetSerialXOff = $5504; { Send an XOFF character, 0 = send only if in XON state, 1 = send always}
  1317. kOTSerialSendXOffAlways = 1;
  1318. kOTSerialSendXOffIfXOnTrue = 0;
  1319. { Option Management for Serial Drivers}
  1320. {
  1321. These options are all 4-byte values.
  1322. BaudRate is the baud rate.
  1323. DataBits is the number of data bits.
  1324. StopBits is the number of stop bits times 10.
  1325. Parity is an enum
  1326. }
  1327. const
  1328. SERIAL_OPT_BAUDRATE = $0100; { UInt32 }
  1329. SERIAL_OPT_DATABITS = $0101; { UInt32 }
  1330. SERIAL_OPT_STOPBITS = $0102; { UInt32 10, 15 or 20 for 1, 1.5 or 2 }
  1331. SERIAL_OPT_PARITY = $0103; { UInt32 }
  1332. SERIAL_OPT_STATUS = $0104; { UInt32 }
  1333. { The "Status" option is a 4-byte value option that is ReadOnly}
  1334. { It returns a bitmap of the current serial status}
  1335. SERIAL_OPT_HANDSHAKE = $0105; { UInt32 }
  1336. { The "Handshake" option defines what kind of handshaking the serial port}
  1337. { will do for line flow control. The value is a 32-bit value defined by}
  1338. { the function or macro SerialHandshakeData below.}
  1339. { For no handshake, or CTS handshake, the onChar and offChar parameters}
  1340. { are ignored.}
  1341. SERIAL_OPT_RCVTIMEOUT = $0106; { The "RcvTimeout" option defines how long the receiver should wait before delivering}
  1342. { less than the RcvLoWat number of characters. If RcvLoWat is 0, then the RcvTimeout}
  1343. { is how long a gap to wait for before delivering characters. This parameter is advisory,}
  1344. { and serial drivers are free to deliver data whenever they deem it convenient. For instance,}
  1345. { many serial drivers will deliver data whenever 64 bytes have been received, since 64 bytes}
  1346. { is the smallest STREAMS buffer size. Keep in mind that timeouts are quantized, so be sure to}
  1347. { look at the return value of the option to determine what it was negotiated to.}
  1348. SERIAL_OPT_ERRORCHARACTER = $0107; { This option defines how characters with parity errors are handled.}
  1349. { A 0 value will disable all replacement. A single character value in the low}
  1350. { byte designates the replacement character. When characters are received with a }
  1351. { parity error, they are replaced by this specified character. If a valid incoming}
  1352. { character matches the replacement character, then the received character's msb is}
  1353. { cleared. For this situation, the alternate character is used, if specified in bits}
  1354. { 8 through 15 of the option long, with 0xff being place in bits 16 through 23.}
  1355. { Whenever a valid character is received that matches the first replacement character,}
  1356. { it is replaced with this alternate character.}
  1357. SERIAL_OPT_EXTCLOCK = $0108; { The "ExtClock" requests an external clock. A 0-value turns off external clocking.}
  1358. { Any other value is a requested divisor for the external clock. Be aware that}
  1359. { not all serial implementations support an external clock, and that not all}
  1360. { requested divisors will be supported if it does support an external clock.}
  1361. SERIAL_OPT_BURSTMODE = $0109; { The "BurstMode" option informs the serial driver that it should continue looping,}
  1362. { reading incoming characters, rather than waiting for an interrupt for each character.}
  1363. { This option may not be supported by all Serial driver}
  1364. SERIAL_OPT_DUMMY = $010A; { placeholder}
  1365. type
  1366. ParityOptionValues = UInt32;
  1367. const
  1368. kOTSerialNoParity = 0;
  1369. kOTSerialOddParity = 1;
  1370. kOTSerialEvenParity = 2;
  1371. const
  1372. kOTSerialSwOverRunErr = $01;
  1373. kOTSerialBreakOn = $08;
  1374. kOTSerialParityErr = $10;
  1375. kOTSerialOverrunErr = $20;
  1376. kOTSerialFramingErr = $40;
  1377. kOTSerialXOffSent = $00010000;
  1378. kOTSerialDTRNegated = $00020000;
  1379. kOTSerialCTLHold = $00040000;
  1380. kOTSerialXOffHold = $00080000;
  1381. kOTSerialOutputBreakOn = $01000000;
  1382. const
  1383. kOTSerialXOnOffInputHandshake = 1; { Want XOn/XOff handshake for incoming characters }
  1384. kOTSerialXOnOffOutputHandshake = 2; { Want XOn/XOff handshake for outgoing characters }
  1385. kOTSerialCTSInputHandshake = 4; { Want CTS handshake for incoming characters }
  1386. kOTSerialDTROutputHandshake = 8; { Want DTR handshake for outoing characters }
  1387. // #define OTSerialHandshakeData(type, onChar, offChar) \
  1388. // ((((UInt32)type) << 16) | (((UInt32)onChar) << 8) | offChar)
  1389. //
  1390. // #define OTSerialSetErrorCharacter(rep) \
  1391. // ((rep) & 0xff)
  1392. //
  1393. // #define OTSerialSetErrorCharacterWithAlternate(rep, alternate) \
  1394. // ((((rep) & 0xff) | (((alternate) & 0xff) << 8)) | 0x80000000L)
  1395. { Default attributes for the serial ports}
  1396. const
  1397. kOTSerialDefaultBaudRate = 19200;
  1398. kOTSerialDefaultDataBits = 8;
  1399. kOTSerialDefaultStopBits = 10;
  1400. kOTSerialDefaultParity = kOTSerialNoParity;
  1401. kOTSerialDefaultHandshake = 0;
  1402. kOTSerialDefaultOnChar = 17;
  1403. kOTSerialDefaultOffChar = 19;
  1404. kOTSerialDefaultSndBufSize = 1024;
  1405. kOTSerialDefaultRcvBufSize = 1024;
  1406. kOTSerialDefaultSndLoWat = 96;
  1407. kOTSerialDefaultRcvLoWat = 1;
  1408. kOTSerialDefaultRcvTimeout = 10;
  1409. { ***** ISDN *****}
  1410. { Module Definitions}
  1411. { XTI Level}
  1412. const
  1413. COM_ISDN = FourCharCode('ISDN');
  1414. { Module Names}
  1415. const
  1416. kISDNName = 'isdn';
  1417. const
  1418. kISDNModuleID = 7300;
  1419. { ISDN framing methods, set using the I_OTSetFramingType IOCTL}
  1420. const
  1421. kOTISDNFramingTransparentSupported = $0010; { Support Transparent mode }
  1422. kOTISDNFramingHDLCSupported = $0020; { Support HDLC Synchronous mode }
  1423. kOTISDNFramingV110Supported = $0040; { Support V.110 Asynchronous mode }
  1424. kOTISDNFramingV14ESupported = $0080; { Support V.14 Asynchronous mode }
  1425. { Miscellaneous equates}
  1426. { Disconnect reason codes (from Q.931)}
  1427. const
  1428. kOTISDNUnallocatedNumber = 1;
  1429. kOTISDNNoRouteToSpecifiedTransitNetwork = 2;
  1430. kOTISDNNoRouteToDestination = 3;
  1431. kOTISDNChannelUnacceptable = 6;
  1432. kOTISDNNormal = 16;
  1433. kOTISDNUserBusy = 17;
  1434. kOTISDNNoUserResponding = 18;
  1435. kOTISDNNoAnswerFromUser = 19;
  1436. kOTISDNCallRejected = 21;
  1437. kOTISDNNumberChanged = 22;
  1438. kOTISDNNonSelectedUserClearing = 26;
  1439. kOTISDNDestinationOutOfOrder = 27;
  1440. kOTISDNInvalidNumberFormat = 28;
  1441. kOTISDNFacilityRejected = 29;
  1442. kOTISDNNormalUnspecified = 31;
  1443. kOTISDNNoCircuitChannelAvailable = 34;
  1444. kOTISDNNetworkOutOfOrder = 41;
  1445. kOTISDNSwitchingEquipmentCongestion = 42;
  1446. kOTISDNAccessInformationDiscarded = 43;
  1447. kOTISDNRequestedCircuitChannelNotAvailable = 44;
  1448. kOTISDNResourceUnavailableUnspecified = 45;
  1449. kOTISDNQualityOfServiceUnvailable = 49;
  1450. kOTISDNRequestedFacilityNotSubscribed = 50;
  1451. kOTISDNBearerCapabilityNotAuthorized = 57;
  1452. kOTISDNBearerCapabilityNotPresentlyAvailable = 58;
  1453. kOTISDNCallRestricted = 59;
  1454. kOTISDNServiceOrOptionNotAvilableUnspecified = 63;
  1455. kOTISDNBearerCapabilityNotImplemented = 65;
  1456. kOTISDNRequestedFacilityNotImplemented = 69;
  1457. kOTISDNOnlyRestrictedDigitalBearer = 70;
  1458. kOTISDNServiceOrOptionNotImplementedUnspecified = 79;
  1459. kOTISDNCallIdentityNotUsed = 83;
  1460. kOTISDNCallIdentityInUse = 84;
  1461. kOTISDNNoCallSuspended = 85;
  1462. kOTISDNCallIdentityCleared = 86;
  1463. kOTISDNIncompatibleDestination = 88;
  1464. kOTISDNInvalidTransitNetworkSelection = 91;
  1465. kOTISDNInvalidMessageUnspecified = 95;
  1466. kOTISDNMandatoryInformationElementIsMissing = 96;
  1467. kOTISDNMessageTypeNonExistentOrNotImplemented = 97;
  1468. kOTISDNInterworkingUnspecified = 127;
  1469. { OTISDNAddress}
  1470. {
  1471. The OTISDNAddress has the following format:
  1472. "xxxxxx*yy"
  1473. where 'x' is the phone number and 'y' is the sub address (if available
  1474. in the network. The characters are coded in ASCII (IA5), and valid
  1475. characters are: '0'-'9','#','*'.
  1476. The max length of the each phone number is 21 characters (?) and the max
  1477. subaddress length is network dependent.
  1478. When using bonded channels the phone numbers are separated by '&'.
  1479. The X.25 user data is preceded by '@'.
  1480. }
  1481. const
  1482. kAF_ISDN = $2000;
  1483. { BSD value for AF_ISDN conflicts, so OT Carbon clients must use kAF_ISDN}
  1484. const
  1485. kOTISDNMaxPhoneSize = 32;
  1486. kOTISDNMaxSubSize = 4;
  1487. type
  1488. OTISDNAddressPtr = ^OTISDNAddress;
  1489. OTISDNAddress = record
  1490. fAddressType: OTAddressType;
  1491. fPhoneLength: UInt16;
  1492. fPhoneNumber: packed array [0..36] of AnsiChar;
  1493. end;
  1494. { IOCTL Calls for ISDN}
  1495. { ISDN shares the same ioctl space as serial.}
  1496. const
  1497. MIOC_ISDN = 85; { ISDN ioctl() cmds }
  1498. I_OTISDNAlerting = $5564; { Send or receive an ALERTING message }
  1499. I_OTISDNSuspend = $5565; { Send a SUSPEND message }
  1500. { The parameter is the Call Identity (Maximum 8 octets) }
  1501. I_OTISDNSuspendAcknowledge = $5566; { Receive a SUSPEND ACKNOWLEDGE message }
  1502. I_OTISDNSuspendReject = $5567; { Receive a SUSPEND REJECT message }
  1503. I_OTISDNResume = $5568; { Send a RESUME message }
  1504. { The parameter is the Call Identity (Maximum 8 octets) }
  1505. I_OTISDNResumeAcknowledge = $5569; { Receive a RESUME ACKNOWLEDGE message }
  1506. I_OTISDNResumeReject = $556A; { Receive a RESUME REJECT message }
  1507. I_OTISDNFaciltity = $556B; { Send or receive a FACILITY message }
  1508. { Connect user data size }
  1509. kOTISDNMaxUserDataSize = 32;
  1510. { Option management calls for ISDN}
  1511. const
  1512. ISDN_OPT_COMMTYPE = $0200;
  1513. ISDN_OPT_FRAMINGTYPE = $0201;
  1514. ISDN_OPT_56KADAPTATION = $0202;
  1515. { For ISDN_OPT_COMMTYPE...}
  1516. const
  1517. kOTISDNTelephoneALaw = 1; { G.711 A-law }
  1518. kOTISDNTelephoneMuLaw = 26; { G.711 µ-law }
  1519. kOTISDNDigital64k = 13; { unrestricted digital (default) }
  1520. kOTISDNDigital56k = 37; { user rate 56Kb/s }
  1521. kOTISDNVideo64k = 41; { video terminal at 64Kb/s }
  1522. kOTISDNVideo56k = 42; { video terminal at 56Kb/s }
  1523. { For ISDN_OPT_FRAMINGTYPE...}
  1524. const
  1525. kOTISDNFramingTransparent = $0010; { Transparent mode }
  1526. kOTISDNFramingHDLC = $0020; { HDLC synchronous mode (default) }
  1527. kOTISDNFramingV110 = $0040; { V.110 asynchronous mode }
  1528. kOTISDNFramingV14E = $0080; { V.14E asynchronous mode }
  1529. { For ISDN_OPT_56KADAPTATION...}
  1530. const
  1531. kOTISDNNot56KAdaptation = false; { not 56K Adaptation (default) }
  1532. kOTISDN56KAdaptation = true; { 56K Adaptation }
  1533. { Default options, you do not need to set these}
  1534. const
  1535. kOTISDNDefaultCommType = kOTISDNDigital64k;
  1536. kOTISDNDefaultFramingType = kOTISDNFramingHDLC;
  1537. kOTISDNDefault56KAdaptation = kOTISDNNot56KAdaptation;
  1538. {******************************************************************************
  1539. * Constants for Open Transport-based Remote Access/PPP API
  1540. *******************************************************************************}
  1541. { OTCreateConfiguration name for PPP control endpoint}
  1542. const
  1543. kPPPControlName = 'ppp';
  1544. { XTI Level}
  1545. const
  1546. COM_PPP = FourCharCode('PPPC');
  1547. { Options limits}
  1548. const
  1549. kPPPMaxIDLength = 255;
  1550. kPPPMaxPasswordLength = 255;
  1551. kPPPMaxDTEAddressLength = 127;
  1552. kPPPMaxCallInfoLength = 255;
  1553. { Various XTI option value constants}
  1554. const
  1555. kPPPStateInitial = 1;
  1556. kPPPStateClosed = 2;
  1557. kPPPStateClosing = 3;
  1558. kPPPStateOpening = 4;
  1559. kPPPStateOpened = 5;
  1560. const
  1561. kPPPConnectionStatusIdle = 1;
  1562. kPPPConnectionStatusConnecting = 2;
  1563. kPPPConnectionStatusConnected = 3;
  1564. kPPPConnectionStatusDisconnecting = 4;
  1565. const
  1566. kPPPMinMRU = 0;
  1567. kPPPMaxMRU = 4500;
  1568. const
  1569. kIPCPTCPHdrCompressionDisabled = 0;
  1570. kIPCPTCPHdrCompressionEnabled = 1;
  1571. const
  1572. kPPPCompressionDisabled = $00000000;
  1573. kPPPProtoCompression = $00000001;
  1574. kPPPAddrCompression = $00000002;
  1575. const
  1576. kPPPNoOutAuthentication = 0;
  1577. kPPPCHAPOrPAPOutAuthentication = 1;
  1578. const
  1579. kCCReminderTimerDisabled = 0;
  1580. kCCIPIdleTimerDisabled = 0;
  1581. const
  1582. kPPPScriptTypeModem = 1;
  1583. kPPPScriptTypeConnect = 2;
  1584. kPPPMaxScriptSize = 32000;
  1585. const
  1586. kE164Address = 1;
  1587. kPhoneAddress = 1;
  1588. kCompoundPhoneAddress = 2;
  1589. kX121Address = 3;
  1590. const
  1591. kPPPConnectionStatusDialogsFlag = $00000001;
  1592. kPPPConnectionRemindersFlag = $00000002;
  1593. kPPPConnectionFlashingIconFlag = $00000004;
  1594. kPPPOutPasswordDialogsFlag = $00000008;
  1595. kPPPAllAlertsDisabledFlag = $00000000;
  1596. kPPPAllAlertsEnabledFlag = $0000000F;
  1597. const
  1598. kPPPAsyncMapCharsNone = $00000000;
  1599. kPPPAsyncMapCharsXOnXOff = $000A0000;
  1600. kPPPAsyncMapCharsAll = $FFFFFFFF;
  1601. { Option names}
  1602. const
  1603. IPCP_OPT_GETREMOTEPROTOADDR = $00007000;
  1604. IPCP_OPT_GETLOCALPROTOADDR = $00007001;
  1605. IPCP_OPT_TCPHDRCOMPRESSION = $00007002;
  1606. LCP_OPT_PPPCOMPRESSION = $00007003;
  1607. LCP_OPT_MRU = $00007004;
  1608. LCP_OPT_RCACCMAP = $00007005;
  1609. LCP_OPT_TXACCMAP = $00007006;
  1610. SEC_OPT_OUTAUTHENTICATION = $00007007;
  1611. SEC_OPT_ID = $00007008;
  1612. SEC_OPT_PASSWORD = $00007009;
  1613. CC_OPT_REMINDERTIMER = $00007010;
  1614. CC_OPT_IPIDLETIMER = $00007011;
  1615. CC_OPT_DTEADDRESSTYPE = $00007012;
  1616. CC_OPT_DTEADDRESS = $00007013;
  1617. CC_OPT_CALLINFO = $00007014;
  1618. CC_OPT_GETMISCINFO = $00007015;
  1619. PPP_OPT_GETCURRENTSTATE = $00007016;
  1620. LCP_OPT_ECHO = $00007017; { Available on Mac OS X only }
  1621. CC_OPT_SERIALPORTNAME = $00007200;
  1622. { Endpoint events}
  1623. const
  1624. kPPPEvent = kPROTOCOLEVENT or $000F0000;
  1625. kPPPConnectCompleteEvent = kPPPEvent + 1;
  1626. kPPPSetScriptCompleteEvent = kPPPEvent + 2;
  1627. kPPPDisconnectCompleteEvent = kPPPEvent + 3;
  1628. kPPPDisconnectEvent = kPPPEvent + 4;
  1629. kPPPIPCPUpEvent = kPPPEvent + 5;
  1630. kPPPIPCPDownEvent = kPPPEvent + 6;
  1631. kPPPLCPUpEvent = kPPPEvent + 7;
  1632. kPPPLCPDownEvent = kPPPEvent + 8;
  1633. kPPPLowerLayerUpEvent = kPPPEvent + 9;
  1634. kPPPLowerLayerDownEvent = kPPPEvent + 10;
  1635. kPPPAuthenticationStartedEvent = kPPPEvent + 11;
  1636. kPPPAuthenticationFinishedEvent = kPPPEvent + 12;
  1637. kPPPDCEInitStartedEvent = kPPPEvent + 13;
  1638. kPPPDCEInitFinishedEvent = kPPPEvent + 14;
  1639. kPPPDCECallStartedEvent = kPPPEvent + 15;
  1640. kPPPDCECallFinishedEvent = kPPPEvent + 16;
  1641. {******************************************************************************
  1642. * IOCTL constants for I_OTConnect, I_OTDisconnect and I_OTScript
  1643. * are defined in OpenTransport.h
  1644. *******************************************************************************}
  1645. {******************************************************************************
  1646. * PPPMRULimits
  1647. *******************************************************************************}
  1648. type
  1649. PPPMRULimitsPtr = ^PPPMRULimits;
  1650. PPPMRULimits = record
  1651. mruSize: UInt32; { proposed or actual}
  1652. upperMRULimit: UInt32;
  1653. lowerMRULimit: UInt32;
  1654. end;
  1655. {******************************************************************************
  1656. * CCMiscInfo
  1657. *******************************************************************************}
  1658. type
  1659. CCMiscInfoPtr = ^CCMiscInfo;
  1660. CCMiscInfo = record
  1661. connectionStatus: UInt32;
  1662. connectionTimeElapsed: UInt32;
  1663. connectionTimeRemaining: UInt32;
  1664. bytesTransmitted: UInt32;
  1665. bytesReceived: UInt32;
  1666. reserved: UInt32;
  1667. end;
  1668. {******************************************************************************
  1669. * LCPEcho
  1670. *******************************************************************************}
  1671. { Set both fields to zero to disable sending of LCP echo requests}
  1672. type
  1673. LCPEchoPtr = ^LCPEcho;
  1674. LCPEcho = record
  1675. retryCount: UInt32;
  1676. retryPeriod: UInt32; { in milliseconds}
  1677. end;
  1678. {******************************************************************************
  1679. * Bits used to tell kind of product
  1680. *******************************************************************************}
  1681. const
  1682. kRAProductClientOnly = 2;
  1683. kRAProductOnePortServer = 3;
  1684. kRAProductManyPortServer = 4;
  1685. {$endc} {TARGET_OS_MAC and TARGET_CPU_PPC}
  1686. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  1687. end.
  1688. {$endc} {not MACOSALLINCLUDE}