jwasvcguid.pas 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735
  1. {******************************************************************************}
  2. { }
  3. { Winsock2 Service GUIDs API interface Unit for Object Pascal }
  4. { }
  5. { Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
  6. { Corporation. All Rights Reserved. }
  7. { }
  8. { The original file is: svcguid.h, released June 2000. The original Pascal }
  9. { code is: SvcGuid.pas, released December 2000. The initial developer of the }
  10. { Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
  11. { }
  12. { Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
  13. { Marcel van Brakel. All Rights Reserved. }
  14. { }
  15. { Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
  16. { }
  17. { You may retrieve the latest version of this file at the Project JEDI }
  18. { APILIB home page, located at http://jedi-apilib.sourceforge.net }
  19. { }
  20. { The contents of this file are used with permission, subject to the Mozilla }
  21. { Public License Version 1.1 (the "License"); you may not use this file except }
  22. { in compliance with the License. You may obtain a copy of the License at }
  23. { http://www.mozilla.org/MPL/MPL-1.1.html }
  24. { }
  25. { Software distributed under the License is distributed on an "AS IS" basis, }
  26. { WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
  27. { the specific language governing rights and limitations under the License. }
  28. { }
  29. { Alternatively, the contents of this file may be used under the terms of the }
  30. { GNU Lesser General Public License (the "LGPL License"), in which case the }
  31. { provisions of the LGPL License are applicable instead of those above. }
  32. { If you wish to allow use of your version of this file only under the terms }
  33. { of the LGPL License and not to allow others to use your version of this file }
  34. { under the MPL, indicate your decision by deleting the provisions above and }
  35. { replace them with the notice and other provisions required by the LGPL }
  36. { License. If you do not delete the provisions above, a recipient may use }
  37. { your version of this file under either the MPL or the LGPL License. }
  38. { }
  39. { For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
  40. { }
  41. {******************************************************************************}
  42. unit JwaSvcGuid;
  43. {$WEAKPACKAGEUNIT}
  44. {$HPPEMIT ''}
  45. {$HPPEMIT '#include "svguid.h"'}
  46. {$HPPEMIT ''}
  47. {$I jediapilib.inc}
  48. interface
  49. uses
  50. {$IFDEF USE_DELPHI_TYPES}
  51. Windows;
  52. {$ELSE}
  53. JwaWinType;
  54. {$ENDIF USE_DELPHI_TYPES}
  55. // Defines GUIDs for well-known services including:
  56. //
  57. // HOSTNAME
  58. // RFC 1060 (Assigned Numbers) from IANA (All TCP/IP Services)
  59. // NetWare services
  60. //
  61. // HOSTNAME--special GUID which refers to the name of a host as opposed
  62. // to any particular service on that host.
  63. //
  64. const
  65. SVCID_HOSTNAME: TGUID = '{0002a800-0000-0000-C000-000000000046}';
  66. {$EXTERNALSYM SVCID_HOSTNAME}
  67. //
  68. // GUIDs for dealing with AF_INET address spaces alone. These are
  69. // intended to be used when fetching hostent or servent information
  70. // from such a provider. These are not general-purpose types and
  71. // should be used only when the intent is getting at down-level
  72. // information.
  73. //
  74. SVCID_INET_HOSTADDRBYINETSTRING: TGUID = '{0002a801-0000-0000-C000-000000000046}';
  75. {$EXTERNALSYM SVCID_INET_HOSTADDRBYINETSTRING}
  76. SVCID_INET_SERVICEBYNAME: TGUID = '{0002a802-0000-0000-C000-000000000046}';
  77. {$EXTERNALSYM SVCID_INET_SERVICEBYNAME}
  78. SVCID_INET_HOSTADDRBYNAME: TGUID = '{0002a803-0000-0000-C000-000000000046}';
  79. {$EXTERNALSYM SVCID_INET_HOSTADDRBYNAME}
  80. //
  81. // Macros for defining and testing TCP and UDP GUIDs from a well-known
  82. // port.
  83. //
  84. function SVCID_TCP_RR(Port, RR: Word): TGUID;
  85. {$EXTERNALSYM SVCID_TCP_RR}
  86. function SVCID_TCP(Port: Word): TGUID;
  87. {$EXTERNALSYM SVCID_TCP}
  88. function SVCID_DNS(RecordType: Word): TGUID;
  89. {$EXTERNALSYM SVCID_DNS}
  90. function IS_SVCID_DNS(const Guid: TGUID): Boolean;
  91. {$EXTERNALSYM IS_SVCID_DNS}
  92. function IS_SVCID_TCP(const Guid: TGUID): Boolean;
  93. {$EXTERNALSYM IS_SVCID_TCP}
  94. function PORT_FROM_SVCID_TCP(const Guid: TGUID): Word;
  95. {$EXTERNALSYM PORT_FROM_SVCID_TCP}
  96. function RR_FROM_SVCID(const Guid: TGUID): Word;
  97. {$EXTERNALSYM RR_FROM_SVCID}
  98. procedure SET_TCP_SVCID_RR(var Guid: TGUID; _Port, _RR: Word);
  99. {$EXTERNALSYM SET_TCP_SVCID_RR}
  100. procedure SET_TCP_SVCID(var Guid: TGUID; Port: Word);
  101. {$EXTERNALSYM SET_TCP_SVCID}
  102. function SVCID_UDP_RR(Port, RR: Word): TGUID;
  103. {$EXTERNALSYM SVCID_UDP_RR}
  104. function SVCID_UDP(Port: Word): TGUID;
  105. {$EXTERNALSYM SVCID_UDP}
  106. function IS_SVCID_UDP(const Guid: TGUID): Boolean;
  107. {$EXTERNALSYM IS_SVCID_UDP}
  108. function PORT_FROM_SVCID_UDP(const Guid: TGUID): WORD;
  109. {$EXTERNALSYM PORT_FROM_SVCID_UDP}
  110. procedure SET_UDP_SVCID_RR(var Guid: TGUID; Port, RR: WORD);
  111. {$EXTERNALSYM SET_UDP_SVCID_RR}
  112. procedure SET_UDP_SVCID(var Guid: TGUID; Port: WORD);
  113. {$EXTERNALSYM SET_UDP_SVCID}
  114. //
  115. // Macros for defining and testing Netware (SAP) services based on the
  116. // SAP ID.
  117. //
  118. function SVCID_NETWARE(SapId: WORD): TGUID;
  119. {$EXTERNALSYM SVCID_NETWARE}
  120. function IS_SVCID_NETWARE(const Guid: TGUID): Boolean;
  121. {$EXTERNALSYM IS_SVCID_NETWARE}
  122. function SAPID_FROM_SVCID_NETWARE(const Guid: TGUID): WORD;
  123. {$EXTERNALSYM SAPID_FROM_SVCID_NETWARE}
  124. procedure SET_NETWARE_SVCID(var Guid: TGUID; SapId: WORD);
  125. {$EXTERNALSYM SET_NETWARE_SVCID}
  126. //
  127. // RFC 1060 services as defined by the IANA
  128. // GUID block = 0009xxxx-0000-0000-C0000-000000000046
  129. //
  130. const
  131. SVCID_ECHO_TCP: TGUID = '{00090007-0000-0000-C000-000000000046}';
  132. {$EXTERNALSYM SVCID_ECHO_TCP}
  133. SVCID_DISCARD_TCP: TGUID = '{00090009-0000-0000-C000-000000000046}';
  134. {$EXTERNALSYM SVCID_DISCARD_TCP}
  135. SVCID_SYSTAT_TCP: TGUID = '{0009000B-0000-0000-C000-000000000046}';
  136. {$EXTERNALSYM SVCID_SYSTAT_TCP}
  137. SVCID_DAYTIME_TCP: TGUID = '{0009000D-0000-0000-C000-000000000046}';
  138. {$EXTERNALSYM SVCID_DAYTIME_TCP}
  139. SVCID_NETSTAT_TCP: TGUID = '{0009000F-0000-0000-C000-000000000046}';
  140. {$EXTERNALSYM SVCID_NETSTAT_TCP}
  141. SVCID_QOTD_TCP: TGUID = '{00090011-0000-0000-C000-000000000046}';
  142. {$EXTERNALSYM SVCID_QOTD_TCP}
  143. SVCID_CHARGEN_TCP: TGUID = '{00090013-0000-0000-C000-000000000046}';
  144. {$EXTERNALSYM SVCID_CHARGEN_TCP}
  145. SVCID_FTP_DATA_TCP: TGUID = '{00090014-0000-0000-C000-000000000046}';
  146. {$EXTERNALSYM SVCID_FTP_DATA_TCP}
  147. SVCID_FTP_TCP: TGUID = '{00090015-0000-0000-C000-000000000046}';
  148. {$EXTERNALSYM SVCID_FTP_TCP}
  149. SVCID_TELNET_TCP: TGUID = '{00090017-0000-0000-C000-000000000046}';
  150. {$EXTERNALSYM SVCID_TELNET_TCP}
  151. SVCID_SMTP_TCP: TGUID = '{00090019-0000-0000-C000-000000000046}';
  152. {$EXTERNALSYM SVCID_SMTP_TCP}
  153. SVCID_TIME_TCP: TGUID = '{00090025-0000-0000-C000-000000000046}';
  154. {$EXTERNALSYM SVCID_TIME_TCP}
  155. SVCID_NAME_TCP: TGUID = '{0009002A-0000-0000-C000-000000000046}';
  156. {$EXTERNALSYM SVCID_NAME_TCP}
  157. SVCID_WHOIS_TCP: TGUID = '{0009002B-0000-0000-C000-000000000046}';
  158. {$EXTERNALSYM SVCID_WHOIS_TCP}
  159. SVCID_DOMAIN_TCP: TGUID = '{00090035-0000-0000-C000-000000000046}';
  160. {$EXTERNALSYM SVCID_DOMAIN_TCP}
  161. SVCID_NAMESERVER_TCP: TGUID = '{00090035-0000-0000-C000-000000000046}';
  162. {$EXTERNALSYM SVCID_NAMESERVER_TCP}
  163. SVCID_MTP_TCP: TGUID = '{00090039-0000-0000-C000-000000000046}';
  164. {$EXTERNALSYM SVCID_MTP_TCP}
  165. SVCID_RJE_TCP: TGUID = '{0009004D-0000-0000-C000-000000000046}';
  166. {$EXTERNALSYM SVCID_RJE_TCP}
  167. SVCID_FINGER_TCP: TGUID = '{0009004F-0000-0000-C000-000000000046}';
  168. {$EXTERNALSYM SVCID_FINGER_TCP}
  169. SVCID_LINK_TCP: TGUID = '{00090057-0000-0000-C000-000000000046}';
  170. {$EXTERNALSYM SVCID_LINK_TCP}
  171. SVCID_SUPDUP_TCP: TGUID = '{0009005F-0000-0000-C000-000000000046}';
  172. {$EXTERNALSYM SVCID_SUPDUP_TCP}
  173. SVCID_HOSTNAMES_TCP: TGUID = '{00090065-0000-0000-C000-000000000046}';
  174. {$EXTERNALSYM SVCID_HOSTNAMES_TCP}
  175. SVCID_ISO_TSAP_TCP: TGUID = '{00090066-0000-0000-C000-000000000046}';
  176. {$EXTERNALSYM SVCID_ISO_TSAP_TCP}
  177. SVCID_DICTIONARY_TCP: TGUID = '{00090067-0000-0000-C000-000000000046}';
  178. {$EXTERNALSYM SVCID_DICTIONARY_TCP}
  179. SVCID_X400_TCP: TGUID = '{00090067-0000-0000-C000-000000000046}';
  180. {$EXTERNALSYM SVCID_X400_TCP}
  181. SVCID_X400_SND_TCP: TGUID = '{00090068-0000-0000-C000-000000000046}';
  182. {$EXTERNALSYM SVCID_X400_SND_TCP}
  183. SVCID_CSNET_NS_TCP: TGUID = '{00090069-0000-0000-C000-000000000046}';
  184. {$EXTERNALSYM SVCID_CSNET_NS_TCP}
  185. SVCID_POP_TCP: TGUID = '{0009006D-0000-0000-C000-000000000046}';
  186. {$EXTERNALSYM SVCID_POP_TCP}
  187. SVCID_POP2_TCP: TGUID = '{0009006D-0000-0000-C000-000000000046}';
  188. {$EXTERNALSYM SVCID_POP2_TCP}
  189. SVCID_POP3_TCP: TGUID = '{0009006E-0000-0000-C000-000000000046}';
  190. {$EXTERNALSYM SVCID_POP3_TCP}
  191. SVCID_PORTMAP_TCP: TGUID = '{0009006F-0000-0000-C000-000000000046}';
  192. {$EXTERNALSYM SVCID_PORTMAP_TCP}
  193. SVCID_SUNRPC_TCP: TGUID = '{0009006F-0000-0000-C000-000000000046}';
  194. {$EXTERNALSYM SVCID_SUNRPC_TCP}
  195. SVCID_AUTH_TCP: TGUID = '{00090071-0000-0000-C000-000000000046}';
  196. {$EXTERNALSYM SVCID_AUTH_TCP}
  197. SVCID_SFTP_TCP: TGUID = '{00090073-0000-0000-C000-000000000046}';
  198. {$EXTERNALSYM SVCID_SFTP_TCP}
  199. SVCID_PATH_TCP: TGUID = '{00090075-0000-0000-C000-000000000046}';
  200. {$EXTERNALSYM SVCID_PATH_TCP}
  201. SVCID_UUCP_PATH_TCP: TGUID = '{00090075-0000-0000-C000-000000000046}';
  202. {$EXTERNALSYM SVCID_UUCP_PATH_TCP}
  203. SVCID_NNTP_TCP: TGUID = '{00090077-0000-0000-C000-000000000046}';
  204. {$EXTERNALSYM SVCID_NNTP_TCP}
  205. SVCID_NBSESSION_TCP: TGUID = '{0009008B-0000-0000-C000-000000000046}';
  206. {$EXTERNALSYM SVCID_NBSESSION_TCP}
  207. SVCID_NEWS_TCP: TGUID = '{00090090-0000-0000-C000-000000000046}';
  208. {$EXTERNALSYM SVCID_NEWS_TCP}
  209. SVCID_TCPREPO_TCP: TGUID = '{0009009E-0000-0000-C000-000000000046}';
  210. {$EXTERNALSYM SVCID_TCPREPO_TCP}
  211. SVCID_PRINT_SRV_TCP: TGUID = '{000900AA-0000-0000-C000-000000000046}';
  212. {$EXTERNALSYM SVCID_PRINT_SRV_TCP}
  213. SVCID_VMNET_TCP: TGUID = '{000900AF-0000-0000-C000-000000000046}';
  214. {$EXTERNALSYM SVCID_VMNET_TCP}
  215. SVCID_VMNET0_TCP: TGUID = '{00090190-0000-0000-C000-000000000046}';
  216. {$EXTERNALSYM SVCID_VMNET0_TCP}
  217. SVCID_EXEC_TCP: TGUID = '{00090200-0000-0000-C000-000000000046}';
  218. {$EXTERNALSYM SVCID_EXEC_TCP}
  219. SVCID_LOGIN_TCP: TGUID = '{00090201-0000-0000-C000-000000000046}';
  220. {$EXTERNALSYM SVCID_LOGIN_TCP}
  221. SVCID_SHELL_TCP: TGUID = '{00090202-0000-0000-C000-000000000046}';
  222. {$EXTERNALSYM SVCID_SHELL_TCP}
  223. SVCID_PRINTER_TCP: TGUID = '{00090203-0000-0000-C000-000000000046}';
  224. {$EXTERNALSYM SVCID_PRINTER_TCP}
  225. SVCID_EFS_TCP: TGUID = '{00090208-0000-0000-C000-000000000046}';
  226. {$EXTERNALSYM SVCID_EFS_TCP}
  227. SVCID_TEMPO_TCP: TGUID = '{0009020E-0000-0000-C000-000000000046}';
  228. {$EXTERNALSYM SVCID_TEMPO_TCP}
  229. SVCID_COURIER_TCP: TGUID = '{00090212-0000-0000-C000-000000000046}';
  230. {$EXTERNALSYM SVCID_COURIER_TCP}
  231. SVCID_CONFERENCE_TCP: TGUID = '{00090213-0000-0000-C000-000000000046}';
  232. {$EXTERNALSYM SVCID_CONFERENCE_TCP}
  233. SVCID_NETNEWS_TCP: TGUID = '{00090214-0000-0000-C000-000000000046}';
  234. {$EXTERNALSYM SVCID_NETNEWS_TCP}
  235. SVCID_UUCP_TCP: TGUID = '{0009021C-0000-0000-C000-000000000046}';
  236. {$EXTERNALSYM SVCID_UUCP_TCP}
  237. SVCID_KLOGIN_TCP: TGUID = '{0009021F-0000-0000-C000-000000000046}';
  238. {$EXTERNALSYM SVCID_KLOGIN_TCP}
  239. SVCID_KSHELL_TCP: TGUID = '{00090220-0000-0000-C000-000000000046}';
  240. {$EXTERNALSYM SVCID_KSHELL_TCP}
  241. SVCID_REMOTEFS_TCP: TGUID = '{0009022C-0000-0000-C000-000000000046}';
  242. {$EXTERNALSYM SVCID_REMOTEFS_TCP}
  243. SVCID_GARCON_TCP: TGUID = '{00090258-0000-0000-C000-000000000046}';
  244. {$EXTERNALSYM SVCID_GARCON_TCP}
  245. SVCID_MAITRD_TCP: TGUID = '{00090259-0000-0000-C000-000000000046}';
  246. {$EXTERNALSYM SVCID_MAITRD_TCP}
  247. SVCID_BUSBOY_TCP: TGUID = '{0009025A-0000-0000-C000-000000000046}';
  248. {$EXTERNALSYM SVCID_BUSBOY_TCP}
  249. SVCID_KERBEROS_TCP: TGUID = '{000902EE-0000-0000-C000-000000000046}';
  250. {$EXTERNALSYM SVCID_KERBEROS_TCP}
  251. SVCID_KERBEROS_MASTER_TCP: TGUID = '{000902EF-0000-0000-C000-000000000046}';
  252. {$EXTERNALSYM SVCID_KERBEROS_MASTER_TCP}
  253. SVCID_KRB_PROP_TCP: TGUID = '{000902F2-0000-0000-C000-000000000046}';
  254. {$EXTERNALSYM SVCID_KRB_PROP_TCP}
  255. SVCID_ERLOGIN_TCP: TGUID = '{00090378-0000-0000-C000-000000000046}';
  256. {$EXTERNALSYM SVCID_ERLOGIN_TCP}
  257. SVCID_KPOP_TCP: TGUID = '{00090455-0000-0000-C000-000000000046}';
  258. {$EXTERNALSYM SVCID_KPOP_TCP}
  259. SVCID_INGRESLOCK_TCP: TGUID = '{000905F4-0000-0000-C000-000000000046}';
  260. {$EXTERNALSYM SVCID_INGRESLOCK_TCP}
  261. SVCID_KNETD_TCP: TGUID = '{00090805-0000-0000-C000-000000000046}';
  262. {$EXTERNALSYM SVCID_KNETD_TCP}
  263. SVCID_EKLOGIN_TCP: TGUID = '{00090839-0000-0000-C000-000000000046}';
  264. {$EXTERNALSYM SVCID_EKLOGIN_TCP}
  265. SVCID_RMT_TCP: TGUID = '{000915B3-0000-0000-C000-000000000046}';
  266. {$EXTERNALSYM SVCID_RMT_TCP}
  267. SVCID_MTB_TCP: TGUID = '{000915B4-0000-0000-C000-000000000046}';
  268. {$EXTERNALSYM SVCID_MTB_TCP}
  269. SVCID_MAN_TCP: TGUID = '{0009253F-0000-0000-C000-000000000046}';
  270. {$EXTERNALSYM SVCID_MAN_TCP}
  271. SVCID_W_TCP: TGUID = '{00092540-0000-0000-C000-000000000046}';
  272. {$EXTERNALSYM SVCID_W_TCP}
  273. SVCID_MANTST_TCP: TGUID = '{00092541-0000-0000-C000-000000000046}';
  274. {$EXTERNALSYM SVCID_MANTST_TCP}
  275. SVCID_BNEWS_TCP: TGUID = '{00092710-0000-0000-C000-000000000046}';
  276. {$EXTERNALSYM SVCID_BNEWS_TCP}
  277. SVCID_QUEUE_TCP: TGUID = '{00092711-0000-0000-C000-000000000046}';
  278. {$EXTERNALSYM SVCID_QUEUE_TCP}
  279. SVCID_POKER_TCP: TGUID = '{00092712-0000-0000-C000-000000000046}';
  280. {$EXTERNALSYM SVCID_POKER_TCP}
  281. SVCID_GATEWAY_TCP: TGUID = '{00092713-0000-0000-C000-000000000046}';
  282. {$EXTERNALSYM SVCID_GATEWAY_TCP}
  283. SVCID_REMP_TCP: TGUID = '{00092714-0000-0000-C000-000000000046}';
  284. {$EXTERNALSYM SVCID_REMP_TCP}
  285. SVCID_QMASTER_TCP: TGUID = '{0009271C-0000-0000-C000-000000000046}';
  286. {$EXTERNALSYM SVCID_QMASTER_TCP}
  287. SVCID_ECHO_UDP: TGUID = '{000A0007-0000-0000-C000-000000000046}';
  288. {$EXTERNALSYM SVCID_ECHO_UDP}
  289. SVCID_DISCARD_UDP: TGUID = '{000A0009-0000-0000-C000-000000000046}';
  290. {$EXTERNALSYM SVCID_DISCARD_UDP}
  291. SVCID_DAYTIME_UDP: TGUID = '{000A000D-0000-0000-C000-000000000046}';
  292. {$EXTERNALSYM SVCID_DAYTIME_UDP}
  293. SVCID_QOTD_UDP: TGUID = '{000A0011-0000-0000-C000-000000000046}';
  294. {$EXTERNALSYM SVCID_QOTD_UDP}
  295. SVCID_CHARGEN_UDP: TGUID = '{000A0013-0000-0000-C000-000000000046}';
  296. {$EXTERNALSYM SVCID_CHARGEN_UDP}
  297. SVCID_TIME_UDP: TGUID = '{000A0025-0000-0000-C000-000000000046}';
  298. {$EXTERNALSYM SVCID_TIME_UDP}
  299. SVCID_RLP_UDP: TGUID = '{000A0027-0000-0000-C000-000000000046}';
  300. {$EXTERNALSYM SVCID_RLP_UDP}
  301. SVCID_NAME_UDP: TGUID = '{000A002A-0000-0000-C000-000000000046}';
  302. {$EXTERNALSYM SVCID_NAME_UDP}
  303. SVCID_DOMAIN_UDP: TGUID = '{000A0035-0000-0000-C000-000000000046}';
  304. {$EXTERNALSYM SVCID_DOMAIN_UDP}
  305. SVCID_NAMESERVER_UDP: TGUID = '{000A0035-0000-0000-C000-000000000046}';
  306. {$EXTERNALSYM SVCID_NAMESERVER_UDP}
  307. SVCID_BOOTP_UDP: TGUID = '{000A0043-0000-0000-C000-000000000046}';
  308. {$EXTERNALSYM SVCID_BOOTP_UDP}
  309. SVCID_TFTP_UDP: TGUID = '{000A0045-0000-0000-C000-000000000046}';
  310. {$EXTERNALSYM SVCID_TFTP_UDP}
  311. SVCID_PORTMAP_UDP: TGUID = '{000A006F-0000-0000-C000-000000000046}';
  312. {$EXTERNALSYM SVCID_PORTMAP_UDP}
  313. SVCID_SUNRPC_UDP: TGUID = '{000A006F-0000-0000-C000-000000000046}';
  314. {$EXTERNALSYM SVCID_SUNRPC_UDP}
  315. SVCID_NTP_UDP: TGUID = '{000A007B-0000-0000-C000-000000000046}';
  316. {$EXTERNALSYM SVCID_NTP_UDP}
  317. SVCID_NBNAME_UDP: TGUID = '{000A0089-0000-0000-C000-000000000046}';
  318. {$EXTERNALSYM SVCID_NBNAME_UDP}
  319. SVCID_NBDATAGRAM_UDP: TGUID = '{000A008A-0000-0000-C000-000000000046}';
  320. {$EXTERNALSYM SVCID_NBDATAGRAM_UDP}
  321. SVCID_SGMP_UDP: TGUID = '{000A0099-0000-0000-C000-000000000046}';
  322. {$EXTERNALSYM SVCID_SGMP_UDP}
  323. SVCID_SNMP_UDP: TGUID = '{000A00A1-0000-0000-C000-000000000046}';
  324. {$EXTERNALSYM SVCID_SNMP_UDP}
  325. SVCID_SNMP_TRAP_UDP: TGUID = '{000A00A2-0000-0000-C000-000000000046}';
  326. {$EXTERNALSYM SVCID_SNMP_TRAP_UDP}
  327. SVCID_LOAD_UDP: TGUID = '{000A013B-0000-0000-C000-000000000046}';
  328. {$EXTERNALSYM SVCID_LOAD_UDP}
  329. SVCID_SYTEK_UDP: TGUID = '{000A01F4-0000-0000-C000-000000000046}';
  330. {$EXTERNALSYM SVCID_SYTEK_UDP}
  331. SVCID_BIFF_UDP: TGUID = '{000A0200-0000-0000-C000-000000000046}';
  332. {$EXTERNALSYM SVCID_BIFF_UDP}
  333. SVCID_WHO_UDP: TGUID = '{000A0201-0000-0000-C000-000000000046}';
  334. {$EXTERNALSYM SVCID_WHO_UDP}
  335. SVCID_SYSLOG_UDP: TGUID = '{000A0202-0000-0000-C000-000000000046}';
  336. {$EXTERNALSYM SVCID_SYSLOG_UDP}
  337. SVCID_TALK_UDP: TGUID = '{000A0205-0000-0000-C000-000000000046}';
  338. {$EXTERNALSYM SVCID_TALK_UDP}
  339. SVCID_NTALK_UDP: TGUID = '{000A0206-0000-0000-C000-000000000046}';
  340. {$EXTERNALSYM SVCID_NTALK_UDP}
  341. SVCID_ROUTE_UDP: TGUID = '{000A0208-0000-0000-C000-000000000046}';
  342. {$EXTERNALSYM SVCID_ROUTE_UDP}
  343. SVCID_TIMED_UDP: TGUID = '{000A020D-0000-0000-C000-000000000046}';
  344. {$EXTERNALSYM SVCID_TIMED_UDP}
  345. SVCID_RVD_CONTROL_UDP: TGUID = '{000A0213-0000-0000-C000-000000000046}';
  346. {$EXTERNALSYM SVCID_RVD_CONTROL_UDP}
  347. SVCID_NETWALL_UDP: TGUID = '{000A0215-0000-0000-C000-000000000046}';
  348. {$EXTERNALSYM SVCID_NETWALL_UDP}
  349. SVCID_NEW_RWHO_UDP: TGUID = '{000A0226-0000-0000-C000-000000000046}';
  350. {$EXTERNALSYM SVCID_NEW_RWHO_UDP}
  351. SVCID_RMONITOR_UDP: TGUID = '{000A0230-0000-0000-C000-000000000046}';
  352. {$EXTERNALSYM SVCID_RMONITOR_UDP}
  353. SVCID_MONITOR_UDP: TGUID = '{000A0231-0000-0000-C000-000000000046}';
  354. {$EXTERNALSYM SVCID_MONITOR_UDP}
  355. SVCID_ACCTMASTER_UDP: TGUID = '{000A02BC-0000-0000-C000-000000000046}';
  356. {$EXTERNALSYM SVCID_ACCTMASTER_UDP}
  357. SVCID_ACCTSLAVE_UDP: TGUID = '{000A02BD-0000-0000-C000-000000000046}';
  358. {$EXTERNALSYM SVCID_ACCTSLAVE_UDP}
  359. SVCID_ACCT_UDP: TGUID = '{000A02BE-0000-0000-C000-000000000046}';
  360. {$EXTERNALSYM SVCID_ACCT_UDP}
  361. SVCID_ACCTLOGIN_UDP: TGUID = '{000A02BF-0000-0000-C000-000000000046}';
  362. {$EXTERNALSYM SVCID_ACCTLOGIN_UDP}
  363. SVCID_ACCTPRINTER_UDP: TGUID = '{000A02C0-0000-0000-C000-000000000046}';
  364. {$EXTERNALSYM SVCID_ACCTPRINTER_UDP}
  365. SVCID_ELCSD_UDP: TGUID = '{000A02C0-0000-0000-C000-000000000046}';
  366. {$EXTERNALSYM SVCID_ELCSD_UDP}
  367. SVCID_ACCTINFO_UDP: TGUID = '{000A02C1-0000-0000-C000-000000000046}';
  368. {$EXTERNALSYM SVCID_ACCTINFO_UDP}
  369. SVCID_ACCTSLAVE2_UDP: TGUID = '{000A02C2-0000-0000-C000-000000000046}';
  370. {$EXTERNALSYM SVCID_ACCTSLAVE2_UDP}
  371. SVCID_ACCTDISK_UDP: TGUID = '{000A02C3-0000-0000-C000-000000000046}';
  372. {$EXTERNALSYM SVCID_ACCTDISK_UDP}
  373. SVCID_KERBEROS_UDP: TGUID = '{000A02EE-0000-0000-C000-000000000046}';
  374. {$EXTERNALSYM SVCID_KERBEROS_UDP}
  375. SVCID_KERBEROS_MASTER_UDP: TGUID = '{000A02EF-0000-0000-C000-000000000046}';
  376. {$EXTERNALSYM SVCID_KERBEROS_MASTER_UDP}
  377. SVCID_PASSWD_SERVER_UDP: TGUID = '{000A02F0-0000-0000-C000-000000000046}';
  378. {$EXTERNALSYM SVCID_PASSWD_SERVER_UDP}
  379. SVCID_USERREG_SERVER_UDP: TGUID = '{000A02F1-0000-0000-C000-000000000046}';
  380. {$EXTERNALSYM SVCID_USERREG_SERVER_UDP}
  381. SVCID_PHONE_UDP: TGUID = '{000A048F-0000-0000-C000-000000000046}';
  382. {$EXTERNALSYM SVCID_PHONE_UDP}
  383. SVCID_MAZE_UDP: TGUID = '{000A0682-0000-0000-C000-000000000046}';
  384. {$EXTERNALSYM SVCID_MAZE_UDP}
  385. SVCID_NFS_UDP: TGUID = '{000A0801-0000-0000-C000-000000000046}';
  386. {$EXTERNALSYM SVCID_NFS_UDP}
  387. SVCID_RSCS0_UDP: TGUID = '{000A2710-0000-0000-C000-000000000046}';
  388. {$EXTERNALSYM SVCID_RSCS0_UDP}
  389. SVCID_RSCS1_UDP: TGUID = '{000A2711-0000-0000-C000-000000000046}';
  390. {$EXTERNALSYM SVCID_RSCS1_UDP}
  391. SVCID_RSCS2_UDP: TGUID = '{000A2712-0000-0000-C000-000000000046}';
  392. {$EXTERNALSYM SVCID_RSCS2_UDP}
  393. SVCID_RSCS3_UDP: TGUID = '{000A2713-0000-0000-C000-000000000046}';
  394. {$EXTERNALSYM SVCID_RSCS3_UDP}
  395. SVCID_RSCS4_UDP: TGUID = '{000A2714-0000-0000-C000-000000000046}';
  396. {$EXTERNALSYM SVCID_RSCS4_UDP}
  397. SVCID_RSCS5_UDP: TGUID = '{000A2715-0000-0000-C000-000000000046}';
  398. {$EXTERNALSYM SVCID_RSCS5_UDP}
  399. SVCID_RSCS6_UDP: TGUID = '{000A2716-0000-0000-C000-000000000046}';
  400. {$EXTERNALSYM SVCID_RSCS6_UDP}
  401. SVCID_RSCS7_UDP: TGUID = '{000A2717-0000-0000-C000-000000000046}';
  402. {$EXTERNALSYM SVCID_RSCS7_UDP}
  403. SVCID_RSCS8_UDP: TGUID = '{000A2718-0000-0000-C000-000000000046}';
  404. {$EXTERNALSYM SVCID_RSCS8_UDP}
  405. SVCID_RSCS9_UDP: TGUID = '{000A2719-0000-0000-C000-000000000046}';
  406. {$EXTERNALSYM SVCID_RSCS9_UDP}
  407. SVCID_RSCSA_UDP: TGUID = '{000A271A-0000-0000-C000-000000000046}';
  408. {$EXTERNALSYM SVCID_RSCSA_UDP}
  409. SVCID_RSCSB_UDP: TGUID = '{000A271B-0000-0000-C000-000000000046}';
  410. {$EXTERNALSYM SVCID_RSCSB_UDP}
  411. SVCID_QMASTER_UDP: TGUID = '{000A271C-0000-0000-C000-000000000046}';
  412. {$EXTERNALSYM SVCID_QMASTER_UDP}
  413. //
  414. // NetWare services
  415. // GUID block = 000axxxx-0000-0000-C0000-000000000046
  416. //
  417. SVCID_PRINT_QUEUE: TGUID = '{000B0003-0000-0000-C000-000000000046}';
  418. {$EXTERNALSYM SVCID_PRINT_QUEUE}
  419. SVCID_FILE_SERVER: TGUID = '{000B0004-0000-0000-C000-000000000046}';
  420. {$EXTERNALSYM SVCID_FILE_SERVER}
  421. SVCID_JOB_SERVER: TGUID = '{000B0005-0000-0000-C000-000000000046}';
  422. {$EXTERNALSYM SVCID_JOB_SERVER}
  423. SVCID_GATEWAY: TGUID = '{000B0006-0000-0000-C000-000000000046}';
  424. {$EXTERNALSYM SVCID_GATEWAY}
  425. SVCID_PRINT_SERVER: TGUID = '{000B0007-0000-0000-C000-000000000046}';
  426. {$EXTERNALSYM SVCID_PRINT_SERVER}
  427. SVCID_ARCHIVE_QUEUE: TGUID = '{000B0008-0000-0000-C000-000000000046}';
  428. {$EXTERNALSYM SVCID_ARCHIVE_QUEUE}
  429. SVCID_ARCHIVE_SERVER: TGUID = '{000B0009-0000-0000-C000-000000000046}';
  430. {$EXTERNALSYM SVCID_ARCHIVE_SERVER}
  431. SVCID_JOB_QUEUE: TGUID = '{000B000A-0000-0000-C000-000000000046}';
  432. {$EXTERNALSYM SVCID_JOB_QUEUE}
  433. SVCID_ADMINISTRATION: TGUID = '{000B000B-0000-0000-C000-000000000046}';
  434. {$EXTERNALSYM SVCID_ADMINISTRATION}
  435. SVCID_NAS_SNA_GATEWAY: TGUID = '{000B0021-0000-0000-C000-000000000046}';
  436. {$EXTERNALSYM SVCID_NAS_SNA_GATEWAY}
  437. SVCID_REMOTE_BRIDGE_SERVER: TGUID = '{000B0024-0000-0000-C000-000000000046}';
  438. {$EXTERNALSYM SVCID_REMOTE_BRIDGE_SERVER}
  439. SVCID_TIME_SYNCHRONIZATION_SERVER: TGUID = '{000B002D-0000-0000-C000-000000000046}';
  440. {$EXTERNALSYM SVCID_TIME_SYNCHRONIZATION_SERVER}
  441. SVCID_ARCHIVE_SERVER_DYNAMIC_SAP: TGUID = '{000B002E-0000-0000-C000-000000000046}';
  442. {$EXTERNALSYM SVCID_ARCHIVE_SERVER_DYNAMIC_SAP}
  443. SVCID_ADVERTISING_PRINT_SERVER: TGUID = '{000B0047-0000-0000-C000-000000000046}';
  444. {$EXTERNALSYM SVCID_ADVERTISING_PRINT_SERVER}
  445. SVCID_BTRIEVE_VAP: TGUID = '{000B004B-0000-0000-C000-000000000046}';
  446. {$EXTERNALSYM SVCID_BTRIEVE_VAP}
  447. SVCID_DIRECTORY_SERVER: TGUID = '{000B0278-0000-0000-C000-000000000046}';
  448. {$EXTERNALSYM SVCID_DIRECTORY_SERVER}
  449. SVCID_NETWARE_386: TGUID = '{000B0107-0000-0000-C000-000000000046}';
  450. {$EXTERNALSYM SVCID_NETWARE_386}
  451. SVCID_HP_PRINT_SERVER: TGUID = '{000B030C-0000-0000-C000-000000000046}';
  452. {$EXTERNALSYM SVCID_HP_PRINT_SERVER}
  453. SVCID_SNA_SERVER: TGUID = '{000B0444-0000-0000-C000-000000000046}';
  454. {$EXTERNALSYM SVCID_SNA_SERVER}
  455. SVCID_SAA_SERVER: TGUID = '{000B0130-0000-0000-C000-000000000046}';
  456. {$EXTERNALSYM SVCID_SAA_SERVER}
  457. //
  458. // DNS services by record type
  459. // GUID block = 00090035-0000-xxxx-C0000-000000000046
  460. //
  461. SVCID_DNS_TYPE_A: TGUID = '{00090035-0000-0001-C000-000000000046}';
  462. {$EXTERNALSYM SVCID_DNS_TYPE_A}
  463. SVCID_DNS_TYPE_NS: TGUID = '{00090035-0000-0002-C000-000000000046}';
  464. {$EXTERNALSYM SVCID_DNS_TYPE_NS}
  465. SVCID_DNS_TYPE_MD: TGUID = '{00090035-0000-0003-C000-000000000046}';
  466. {$EXTERNALSYM SVCID_DNS_TYPE_MD}
  467. SVCID_DNS_TYPE_MF: TGUID = '{00090035-0000-0004-C000-000000000046}';
  468. {$EXTERNALSYM SVCID_DNS_TYPE_MF}
  469. SVCID_DNS_TYPE_CNAME: TGUID = '{00090035-0000-0005-C000-000000000046}';
  470. {$EXTERNALSYM SVCID_DNS_TYPE_CNAME}
  471. SVCID_DNS_TYPE_SOA: TGUID = '{00090035-0000-0006-C000-000000000046}';
  472. {$EXTERNALSYM SVCID_DNS_TYPE_SOA}
  473. SVCID_DNS_TYPE_MB: TGUID = '{00090035-0000-0007-C000-000000000046}';
  474. {$EXTERNALSYM SVCID_DNS_TYPE_MB}
  475. SVCID_DNS_TYPE_MG: TGUID = '{00090035-0000-0008-C000-000000000046}';
  476. {$EXTERNALSYM SVCID_DNS_TYPE_MG}
  477. SVCID_DNS_TYPE_MR: TGUID = '{00090035-0000-0009-C000-000000000046}';
  478. {$EXTERNALSYM SVCID_DNS_TYPE_MR}
  479. SVCID_DNS_TYPE_NULL: TGUID = '{00090035-0000-000A-C000-000000000046}';
  480. {$EXTERNALSYM SVCID_DNS_TYPE_NULL}
  481. SVCID_DNS_TYPE_WKS: TGUID = '{00090035-0000-000B-C000-000000000046}';
  482. {$EXTERNALSYM SVCID_DNS_TYPE_WKS}
  483. SVCID_DNS_TYPE_PTR: TGUID = '{00090035-0000-000C-C000-000000000046}';
  484. {$EXTERNALSYM SVCID_DNS_TYPE_PTR}
  485. SVCID_DNS_TYPE_HINFO: TGUID = '{00090035-0000-000D-C000-000000000046}';
  486. {$EXTERNALSYM SVCID_DNS_TYPE_HINFO}
  487. SVCID_DNS_TYPE_MINFO: TGUID = '{00090035-0000-000E-C000-000000000046}';
  488. {$EXTERNALSYM SVCID_DNS_TYPE_MINFO}
  489. SVCID_DNS_TYPE_MX: TGUID = '{00090035-0000-000F-C000-000000000046}';
  490. {$EXTERNALSYM SVCID_DNS_TYPE_MX}
  491. SVCID_DNS_TYPE_TEXT: TGUID = '{00090035-0000-0010-C000-000000000046}';
  492. {$EXTERNALSYM SVCID_DNS_TYPE_TEXT}
  493. SVCID_DNS_TYPE_RP: TGUID = '{00090035-0000-0011-C000-000000000046}';
  494. {$EXTERNALSYM SVCID_DNS_TYPE_RP}
  495. SVCID_DNS_TYPE_AFSDB: TGUID = '{00090035-0000-0012-C000-000000000046}';
  496. {$EXTERNALSYM SVCID_DNS_TYPE_AFSDB}
  497. SVCID_DNS_TYPE_X25: TGUID = '{00090035-0000-0013-C000-000000000046}';
  498. {$EXTERNALSYM SVCID_DNS_TYPE_X25}
  499. SVCID_DNS_TYPE_ISDN: TGUID = '{00090035-0000-0014-C000-000000000046}';
  500. {$EXTERNALSYM SVCID_DNS_TYPE_ISDN}
  501. SVCID_DNS_TYPE_RT: TGUID = '{00090035-0000-0015-C000-000000000046}';
  502. {$EXTERNALSYM SVCID_DNS_TYPE_RT}
  503. SVCID_DNS_TYPE_NSAP: TGUID = '{00090035-0000-0016-C000-000000000046}';
  504. {$EXTERNALSYM SVCID_DNS_TYPE_NSAP}
  505. SVCID_DNS_TYPE_NSAPPTR: TGUID = '{00090035-0000-0017-C000-000000000046}';
  506. {$EXTERNALSYM SVCID_DNS_TYPE_NSAPPTR}
  507. SVCID_DNS_TYPE_SIG: TGUID = '{00090035-0000-0018-C000-000000000046}';
  508. {$EXTERNALSYM SVCID_DNS_TYPE_SIG}
  509. SVCID_DNS_TYPE_KEY: TGUID = '{00090035-0000-0019-C000-000000000046}';
  510. {$EXTERNALSYM SVCID_DNS_TYPE_KEY}
  511. SVCID_DNS_TYPE_PX: TGUID = '{00090035-0000-001A-C000-000000000046}';
  512. {$EXTERNALSYM SVCID_DNS_TYPE_PX}
  513. SVCID_DNS_TYPE_GPOS: TGUID = '{00090035-0000-001B-C000-000000000046}';
  514. {$EXTERNALSYM SVCID_DNS_TYPE_GPOS}
  515. SVCID_DNS_TYPE_AAAA: TGUID = '{00090035-0000-001C-C000-000000000046}';
  516. {$EXTERNALSYM SVCID_DNS_TYPE_AAAA}
  517. SVCID_DNS_TYPE_LOC: TGUID = '{00090035-0000-001D-C000-000000000046}';
  518. {$EXTERNALSYM SVCID_DNS_TYPE_LOC}
  519. SVCID_DNS_TYPE_NXT: TGUID = '{00090035-0000-001E-C000-000000000046}';
  520. {$EXTERNALSYM SVCID_DNS_TYPE_NXT}
  521. SVCID_DNS_TYPE_SRV: TGUID = '{00090035-0000-0021-C000-000000000046}';
  522. {$EXTERNALSYM SVCID_DNS_TYPE_SRV}
  523. SVCID_DNS_TYPE_ATMA: TGUID = '{00090035-0000-0022-C000-000000000046}';
  524. {$EXTERNALSYM SVCID_DNS_TYPE_ATMA}
  525. implementation
  526. function SVCID_TCP_RR(Port, RR: Word): TGUID;
  527. begin
  528. Result.D1 := ($0009 shl 16) or Port;
  529. Result.D2 := $0;
  530. Result.D3 := RR;
  531. Result.D4[0] := $C0;
  532. Result.D4[1] := $00;
  533. Result.D4[2] := $00;
  534. Result.D4[3] := $00;
  535. Result.D4[4] := $00;
  536. Result.D4[5] := $00;
  537. Result.D4[6] := $00;
  538. Result.D4[7] := $46;
  539. end;
  540. function SVCID_TCP(Port: Word): TGUID;
  541. begin
  542. Result := SVCID_TCP_RR(Port, 0)
  543. end;
  544. function SVCID_DNS(RecordType: Word): TGUID;
  545. begin
  546. Result := SVCID_TCP_RR(53, RecordType);
  547. end;
  548. function IS_SVCID_DNS(const Guid: TGUID): Boolean;
  549. begin
  550. Result := (Guid.D1 = $00090035) and (Guid.D2 = $0) and
  551. (Guid.D4[0] = $C0) and (Guid.D4[1] = $00) and (Guid.D4[2] = $00) and
  552. (Guid.D4[3] = $00) and (Guid.D4[4] = $00) and (Guid.D4[5] = $00) and
  553. (Guid.D4[6] = $00) and (Guid.D4[7] = $46);
  554. end;
  555. function IS_SVCID_TCP(const Guid: TGUID): Boolean;
  556. begin
  557. Result :=
  558. ((Guid.D1 and DWORD($FFFF0000)) = $00090000) and (Guid.D2 = $0) and
  559. (Guid.D4[0] = $C0) and (Guid.D4[1] = $00) and (Guid.D4[2] = $00) and
  560. (Guid.D4[3] = $00) and (Guid.D4[4] = $00) and (Guid.D4[5] = $00) and
  561. (Guid.D4[6] = $00) and (Guid.D4[7] = $46);
  562. end;
  563. function PORT_FROM_SVCID_TCP(const Guid: TGUID): Word;
  564. begin
  565. Result := WORD(Guid.D1 and $FFFF);
  566. end;
  567. function RR_FROM_SVCID(const Guid: TGUID): Word;
  568. begin
  569. Result := Guid.D3;
  570. end;
  571. procedure SET_TCP_SVCID_RR(var Guid: TGUID; _Port, _RR: Word);
  572. begin
  573. Guid.D1 := ($0009 shl 16) or _Port;
  574. Guid.D2 := $0;
  575. Guid.D3 := _RR;
  576. Guid.D4[0] := $C0;
  577. Guid.D4[1] := $00;
  578. Guid.D4[2] := $00;
  579. Guid.D4[3] := $00;
  580. Guid.D4[4] := $00;
  581. Guid.D4[5] := $00;
  582. Guid.D4[6] := $00;
  583. Guid.D4[7] := $46;
  584. end;
  585. procedure SET_TCP_SVCID(var Guid: TGUID; Port: Word);
  586. begin
  587. SET_TCP_SVCID_RR(Guid, Port, 0);
  588. end;
  589. function SVCID_UDP_RR(Port, RR: Word): TGUID;
  590. begin
  591. Result.D1 := ($000A shl 16) or Port;
  592. Result.D2 := $0;
  593. Result.D3 := RR;
  594. Result.D4[0] := $C0;
  595. Result.D4[1] := $00;
  596. Result.D4[2] := $00;
  597. Result.D4[3] := $00;
  598. Result.D4[4] := $00;
  599. Result.D4[5] := $00;
  600. Result.D4[6] := $00;
  601. Result.D4[7] := $46;
  602. end;
  603. function SVCID_UDP(Port: Word): TGUID;
  604. begin
  605. Result := SVCID_UDP_RR(Port, 0);
  606. end;
  607. function IS_SVCID_UDP(const Guid: TGUID): Boolean;
  608. begin
  609. Result := (Guid.D1 and DWORD($FFFF0000) = $000A0000) and (Guid.D2 = $0) and
  610. (Guid.D4[0] = $C0) and (Guid.D4[1] = $00) and (Guid.D4[2] = $00) and
  611. (Guid.D4[3] = $00) and (Guid.D4[4] = $00) and (Guid.D4[5] = $00) and
  612. (Guid.D4[6] = $00) and (Guid.D4[7] = $46);
  613. end;
  614. function PORT_FROM_SVCID_UDP(const Guid: TGUID): WORD;
  615. begin
  616. Result := WORD(Guid.D1 and $FFFF);
  617. end;
  618. procedure SET_UDP_SVCID_RR(var Guid: TGUID; Port, RR: WORD);
  619. begin
  620. Guid.D1 := ($000A shl 16) or Port;
  621. Guid.D2 := $0;
  622. Guid.D3 := RR;
  623. Guid.D4[0] := $C0;
  624. Guid.D4[1] := $00;
  625. Guid.D4[2] := $00;
  626. Guid.D4[3] := $00;
  627. Guid.D4[4] := $00;
  628. Guid.D4[5] := $00;
  629. Guid.D4[6] := $00;
  630. Guid.D4[7] := $46;
  631. end;
  632. procedure SET_UDP_SVCID(var Guid: TGUID; Port: WORD);
  633. begin
  634. SET_UDP_SVCID_RR(Guid, Port, 0);
  635. end;
  636. function SVCID_NETWARE(SapId: WORD): TGUID;
  637. begin
  638. Result.D1 := ($000B shl 16) or SapId;
  639. Result.D2 := $0;
  640. Result.D3 := $0;
  641. Result.D4[0] := $C0;
  642. Result.D4[1] := $00;
  643. Result.D4[2] := $00;
  644. Result.D4[3] := $00;
  645. Result.D4[4] := $00;
  646. Result.D4[5] := $00;
  647. Result.D4[6] := $00;
  648. Result.D4[7] := $46;
  649. end;
  650. function IS_SVCID_NETWARE(const Guid: TGUID): Boolean;
  651. begin
  652. Result := (Guid.D1 and DWORD($FFFF0000) = $000B0000) and (Guid.D2 = $0) and
  653. (Guid.D4[0] = $C0) and (Guid.D4[1] = $00) and (Guid.D4[2] = $00) and
  654. (Guid.D4[3] = $00) and (Guid.D4[4] = $00) and (Guid.D4[5] = $00) and
  655. (Guid.D4[6] = $00) and (Guid.D4[7] = $46);
  656. end;
  657. function SAPID_FROM_SVCID_NETWARE(const Guid: TGUID): WORD;
  658. begin
  659. Result := WORD(Guid.D1 and $FFFF);
  660. end;
  661. procedure SET_NETWARE_SVCID(var Guid: TGUID; SapId: WORD);
  662. begin
  663. Guid.D1 := ($000B shl 16) or SapId;
  664. Guid.D2 := $0;
  665. Guid.D3 := $0;
  666. Guid.D4[0] := $C0;
  667. Guid.D4[1] := $00;
  668. Guid.D4[2] := $00;
  669. Guid.D4[3] := $00;
  670. Guid.D4[4] := $00;
  671. Guid.D4[5] := $00;
  672. Guid.D4[6] := $00;
  673. Guid.D4[7] := $46;
  674. end;
  675. end.