home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 May / Pcwk5b98.iso / Borland / Cplus45 / BC45 / MSINC.PAK / SVCGUID.H < prev    next >
C/C++ Source or Header  |  1995-08-29  |  15KB  |  319 lines

  1. /*++ BUILD Version: 0001    // Increment this if a change has global effects
  2.  
  3. Copyright (c) 1992-1995  Microsoft Corporation
  4.  
  5. Module Name:
  6.  
  7.     svcguid.h
  8.  
  9. Abstract:
  10.  
  11.     Defines GUIDs for well-known services including:
  12.  
  13.         HOSTNAME
  14.         RFC 1060 (Assigned Numbers) from IANA (All TCP/IP Services)
  15.         NetWare services
  16.  
  17. Created:
  18.  
  19.     May 8, 1994
  20.  
  21. Revision History:
  22.  
  23. --*/
  24.  
  25. #ifndef _SVCGUID_
  26. #define _SVCGUID_
  27.  
  28. #include  <basetyps.h>
  29.  
  30. //
  31. // HOSTNAME--special GUID which refers to the name of a host as opposed
  32. // to any particular service on that host.
  33. //
  34.  
  35. #define SVCID_HOSTNAME { 0x0002a800, 0, 0, { 0xC0,0,0,0,0,0,0,0x46 } }
  36.  
  37. //
  38. // Macros for defining and testing TCP and UDP GUIDs from a well-known 
  39. // port.  
  40. //
  41.  
  42. #define SVCID_TCP(_Port) \
  43.              { (0x0009 << 16) | (_Port), 0, 0, { 0xC0,0,0,0,0,0,0,0x46 } }
  44.  
  45. #define IS_SVCID_TCP(_g) \
  46.              ( ((((_g)->Data1) & 0xFFFF0000) == 0x00090000) && \
  47.                (((_g)->Data2) == 0) &&                       \
  48.                (((_g)->Data3) == 0) &&                       \
  49.                (((_g)->Data4[0]) == 0xC0) &&                 \
  50.                (((_g)->Data4[1]) == 0) &&                    \
  51.                (((_g)->Data4[2]) == 0) &&                    \
  52.                (((_g)->Data4[3]) == 0) &&                    \
  53.                (((_g)->Data4[4]) == 0) &&                    \
  54.                (((_g)->Data4[5]) == 0) &&                    \
  55.                (((_g)->Data4[6]) == 0) &&                    \
  56.                (((_g)->Data4[7]) == 0x46) )
  57.  
  58. #define PORT_FROM_SVCID_TCP(_g) \
  59.                ((WORD)(_g->Data1 & 0xFFFF))
  60.  
  61. #define SET_TCP_SVCID(_g,_Port) {                            \
  62.                (_g)->Data1 = (0x0009 << 16 ) | (_Port);      \
  63.                (_g)->Data2 = 0;                              \
  64.                (_g)->Data3 = 0;                              \
  65.                (_g)->Data4[0] = 0xC0;                        \
  66.                (_g)->Data4[1] = 0x0;                         \
  67.                (_g)->Data4[2] = 0x0;                         \
  68.                (_g)->Data4[3] = 0x0;                         \
  69.                (_g)->Data4[4] = 0x0;                         \
  70.                (_g)->Data4[5] = 0x0;                         \
  71.                (_g)->Data4[6] = 0x0;                         \
  72.                (_g)->Data4[7] = 0x46; }
  73.  
  74. #define SVCID_UDP(_Port) \
  75.              { (0x000A << 16) | (_Port), 0, 0, { 0xC0,0,0,0,0,0,0,0x46 } }
  76.  
  77. #define IS_SVCID_UDP(_g) \
  78.              ( ((((_g)->Data1) & 0xFFFF0000) == 0x000A0000) && \
  79.                (((_g)->Data2) == 0) &&                       \
  80.                (((_g)->Data3) == 0) &&                       \
  81.                (((_g)->Data4[0]) == 0xC0) &&                 \
  82.                (((_g)->Data4[1]) == 0) &&                    \
  83.                (((_g)->Data4[2]) == 0) &&                    \
  84.                (((_g)->Data4[3]) == 0) &&                    \
  85.                (((_g)->Data4[4]) == 0) &&                    \
  86.                (((_g)->Data4[5]) == 0) &&                    \
  87.                (((_g)->Data4[6]) == 0) &&                    \
  88.                (((_g)->Data4[7]) == 0x46) )
  89.  
  90. #define PORT_FROM_SVCID_UDP(_g) \
  91.                ((WORD)(_g->Data1 & 0xFFFF))
  92.  
  93. #define SET_UDP_SVCID(_g,_Port) {                            \
  94.                (_g)->Data1 = (0x000A << 16 ) | (_Port);      \
  95.                (_g)->Data2 = 0;                              \
  96.                (_g)->Data3 = 0;                              \
  97.                (_g)->Data4[0] = 0xC0;                        \
  98.                (_g)->Data4[1] = 0x0;                         \
  99.                (_g)->Data4[2] = 0x0;                         \
  100.                (_g)->Data4[3] = 0x0;                         \
  101.                (_g)->Data4[4] = 0x0;                         \
  102.                (_g)->Data4[5] = 0x0;                         \
  103.                (_g)->Data4[6] = 0x0;                         \
  104.                (_g)->Data4[7] = 0x46; }
  105.  
  106. //
  107. // Macros for defining and testing Netware (SAP) services based on the 
  108. // SAP ID.  
  109. //
  110.  
  111. #define SVCID_NETWARE(_SapId) \
  112.              { (0x000B << 16) | (_SapId), 0, 0, { 0xC0,0,0,0,0,0,0,0x46 } }
  113.           
  114. #define IS_SVCID_NETWARE(_g) \
  115.              ( ((((_g)->Data1) & 0xFFFF0000) == 0x000B0000) && \
  116.                (((_g)->Data2) == 0) &&                       \
  117.                (((_g)->Data3) == 0) &&                       \
  118.                (((_g)->Data4[0]) == 0xC0) &&                 \
  119.                (((_g)->Data4[1]) == 0) &&                    \
  120.                (((_g)->Data4[2]) == 0) &&                    \
  121.                (((_g)->Data4[3]) == 0) &&                    \
  122.                (((_g)->Data4[4]) == 0) &&                    \
  123.                (((_g)->Data4[5]) == 0) &&                    \
  124.                (((_g)->Data4[6]) == 0) &&                    \
  125.                (((_g)->Data4[7]) == 0x46) )
  126.  
  127. #define SAPID_FROM_SVCID_NETWARE(_g) \
  128.                ((WORD)(_g->Data1 & 0xFFFF))
  129.  
  130. #define SET_NETWARE_SVCID(_g,_SapId) {                       \
  131.                (_g)->Data1 = (0x000B << 16 ) | (_SapId);     \
  132.                (_g)->Data2 = 0;                              \
  133.                (_g)->Data3 = 0;                              \
  134.                (_g)->Data4[0] = 0xC0;                        \
  135.                (_g)->Data4[1] = 0x0;                         \
  136.                (_g)->Data4[2] = 0x0;                         \
  137.                (_g)->Data4[3] = 0x0;                         \
  138.                (_g)->Data4[4] = 0x0;                         \
  139.                (_g)->Data4[5] = 0x0;                         \
  140.                (_g)->Data4[6] = 0x0;                         \
  141.                (_g)->Data4[7] = 0x46; }
  142.  
  143. //
  144. // RFC 1060 services as defined by the IANA
  145. // GUID block = 0009xxxx-0000-0000-C0000-000000000046
  146. //
  147.  
  148. #define SVCID_ECHO_TCP                SVCID_TCP( 7 )
  149. #define SVCID_DISCARD_TCP             SVCID_TCP( 9 )
  150. #define SVCID_SYSTAT_TCP              SVCID_TCP( 11 )
  151. #define SVCID_SYSTAT_TCP              SVCID_TCP( 11 )
  152. #define SVCID_DAYTIME_TCP             SVCID_TCP( 13 )
  153. #define SVCID_NETSTAT_TCP             SVCID_TCP( 15 )
  154. #define SVCID_QOTD_TCP                SVCID_TCP( 17 )
  155. #define SVCID_CHARGEN_TCP             SVCID_TCP( 19 )
  156. #define SVCID_FTP_DATA_TCP            SVCID_TCP( 20 )
  157. #define SVCID_FTP_TCP                 SVCID_TCP( 21 )
  158. #define SVCID_TELNET_TCP              SVCID_TCP( 23 )
  159. #define SVCID_SMTP_TCP                SVCID_TCP( 25 )
  160. #define SVCID_TIME_TCP                SVCID_TCP( 37 )
  161. #define SVCID_NAME_TCP                SVCID_TCP( 42 )
  162. #define SVCID_WHOIS_TCP               SVCID_TCP( 43 )
  163. #define SVCID_DOMAIN_TCP              SVCID_TCP( 53 )
  164. #define SVCID_NAMESERVER_TCP          SVCID_TCP( 53 )
  165. #define SVCID_MTP_TCP                 SVCID_TCP( 57 )
  166. #define SVCID_RJE_TCP                 SVCID_TCP( 77 )
  167. #define SVCID_FINGER_TCP              SVCID_TCP( 79 )
  168. #define SVCID_LINK_TCP                SVCID_TCP( 87 )
  169. #define SVCID_SUPDUP_TCP              SVCID_TCP( 95 )
  170. #define SVCID_HOSTNAMES_TCP           SVCID_TCP( 101 )
  171. #define SVCID_ISO_TSAP_TCP            SVCID_TCP( 102 )
  172. #define SVCID_DICTIONARY_TCP          SVCID_TCP( 103 )
  173. #define SVCID_X400_TCP                SVCID_TCP( 103 )
  174. #define SVCID_X400_SND_TCP            SVCID_TCP( 104 )
  175. #define SVCID_CSNET_NS_TCP            SVCID_TCP( 105 )
  176. #define SVCID_POP_TCP                 SVCID_TCP( 109 )
  177. #define SVCID_POP2_TCP                SVCID_TCP( 109 )
  178. #define SVCID_POP3_TCP                SVCID_TCP( 110 )
  179. #define SVCID_PORTMAP_TCP             SVCID_TCP( 111 )
  180. #define SVCID_SUNRPC_TCP              SVCID_TCP( 111 )
  181. #define SVCID_AUTH_TCP                SVCID_TCP( 113 )
  182. #define SVCID_SFTP_TCP                SVCID_TCP( 115 )
  183. #define SVCID_PATH_TCP                SVCID_TCP( 117 )
  184. #define SVCID_UUCP_PATH_TCP           SVCID_TCP( 117 )
  185. #define SVCID_NNTP_TCP                SVCID_TCP( 119 )
  186. #define SVCID_NBSESSION_TCP           SVCID_TCP( 139 )
  187. #define SVCID_NEWS_TCP                SVCID_TCP( 144 )
  188. #define SVCID_TCPREPO_TCP             SVCID_TCP( 158 )
  189. #define SVCID_PRINT_SRV_TCP           SVCID_TCP( 170 )
  190. #define SVCID_VMNET_TCP               SVCID_TCP( 175 )
  191. #define SVCID_VMNET0_TCP              SVCID_TCP( 400 )
  192. #define SVCID_EXEC_TCP                SVCID_TCP( 512 )
  193. #define SVCID_LOGIN_TCP               SVCID_TCP( 513 )
  194. #define SVCID_SHELL_TCP               SVCID_TCP( 514 )
  195. #define SVCID_PRINTER_TCP             SVCID_TCP( 515 )
  196. #define SVCID_EFS_TCP                 SVCID_TCP( 520 )
  197. #define SVCID_TEMPO_TCP               SVCID_TCP( 526 )
  198. #define SVCID_COURIER_TCP             SVCID_TCP( 530 )
  199. #define SVCID_CONFERENCE_TCP          SVCID_TCP( 531 )
  200. #define SVCID_NETNEWS_TCP             SVCID_TCP( 532 )
  201. #define SVCID_UUCP_TCP                SVCID_TCP( 540 )
  202. #define SVCID_KLOGIN_TCP              SVCID_TCP( 543 )
  203. #define SVCID_KSHELL_TCP              SVCID_TCP( 544 )
  204. #define SVCID_REMOTEFS_TCP            SVCID_TCP( 556 )
  205. #define SVCID_GARCON_TCP              SVCID_TCP( 600 )
  206. #define SVCID_MAITRD_TCP              SVCID_TCP( 601 )
  207. #define SVCID_BUSBOY_TCP              SVCID_TCP( 602 )
  208. #define SVCID_KERBEROS_TCP            SVCID_TCP( 750 )
  209. #define SVCID_KERBEROS_MASTER_TCP     SVCID_TCP( 751 )
  210. #define SVCID_KRB_PROP_TCP            SVCID_TCP( 754 )
  211. #define SVCID_ERLOGIN_TCP             SVCID_TCP( 888 )
  212. #define SVCID_KPOP_TCP                SVCID_TCP( 1109 )
  213. #define SVCID_INGRESLOCK_TCP          SVCID_TCP( 1524 )
  214. #define SVCID_KNETD_TCP               SVCID_TCP( 2053 )
  215. #define SVCID_EKLOGIN_TCP             SVCID_TCP( 2105 )
  216. #define SVCID_RMT_TCP                 SVCID_TCP( 5555 )
  217. #define SVCID_MTB_TCP                 SVCID_TCP( 5556 )
  218. #define SVCID_MAN_TCP                 SVCID_TCP( 9535 )
  219. #define SVCID_W_TCP                   SVCID_TCP( 9536 )
  220. #define SVCID_MANTST_TCP              SVCID_TCP( 9537 )
  221. #define SVCID_BNEWS_TCP               SVCID_TCP( 10000 )
  222. #define SVCID_QUEUE_TCP               SVCID_TCP( 10001 )
  223. #define SVCID_POKER_TCP               SVCID_TCP( 10002 )
  224. #define SVCID_GATEWAY_TCP             SVCID_TCP( 10003 )
  225. #define SVCID_REMP_TCP                SVCID_TCP( 10004 )
  226. #define SVCID_QMASTER_TCP             SVCID_TCP( 10012 )
  227.  
  228. #define SVCID_ECHO_UDP                SVCID_UDP( 7 )
  229. #define SVCID_DISCARD_UDP             SVCID_UDP( 9 )
  230. #define SVCID_DAYTIME_UDP             SVCID_UDP( 13 )
  231. #define SVCID_QOTD_UDP                SVCID_UDP( 17 )
  232. #define SVCID_CHARGEN_UDP             SVCID_UDP( 19 )
  233. #define SVCID_TIME_UDP                SVCID_UDP( 37 )
  234. #define SVCID_RLP_UDP                 SVCID_UDP( 39 )
  235. #define SVCID_NAME_UDP                SVCID_UDP( 42 )
  236. #define SVCID_DOMAIN_UDP              SVCID_UDP( 53 )
  237. #define SVCID_NAMESERVER_UDP          SVCID_UDP( 53 )
  238. #define SVCID_BOOTP_UDP               SVCID_UDP( 67 )
  239. #define SVCID_TFTP_UDP                SVCID_UDP( 69 )
  240. #define SVCID_PORTMAP_UDP             SVCID_UDP( 111 )
  241. #define SVCID_SUNRPC_UDP              SVCID_UDP( 111 )
  242. #define SVCID_NTP_UDP                 SVCID_UDP( 123 )
  243. #define SVCID_NBNAME_UDP              SVCID_UDP( 137 )
  244. #define SVCID_NBDATAGRAM_UDP          SVCID_UDP( 138 )
  245. #define SVCID_SGMP_UDP                SVCID_UDP( 153 )
  246. #define SVCID_SNMP_UDP                SVCID_UDP( 161 )
  247. #define SVCID_SNMP_TRAP_UDP           SVCID_UDP( 162 )
  248. #define SVCID_LOAD_UDP                SVCID_UDP( 315 )
  249. #define SVCID_SYTEK_UDP               SVCID_UDP( 500 )
  250. #define SVCID_BIFF_UDP                SVCID_UDP( 512 )
  251. #define SVCID_WHO_UDP                 SVCID_UDP( 513 )
  252. #define SVCID_SYSLOG_UDP              SVCID_UDP( 514 )
  253. #define SVCID_TALK_UDP                SVCID_UDP( 517 )
  254. #define SVCID_NTALK_UDP               SVCID_UDP( 518 )
  255. #define SVCID_ROUTE_UDP               SVCID_UDP( 520 )
  256. #define SVCID_TIMED_UDP               SVCID_UDP( 525 )
  257. #define SVCID_RVD_CONTROL_UDP         SVCID_UDP( 531 )
  258. #define SVCID_NETWALL_UDP             SVCID_UDP( 533 )
  259. #define SVCID_NEW_RWHO_UDP            SVCID_UDP( 550 )
  260. #define SVCID_RMONITOR_UDP            SVCID_UDP( 560 )
  261. #define SVCID_MONITOR_UDP             SVCID_UDP( 561 )
  262. #define SVCID_ACCTMASTER_UDP          SVCID_UDP( 700 )
  263. #define SVCID_ACCTSLAVE_UDP           SVCID_UDP( 701 )
  264. #define SVCID_ACCT_UDP                SVCID_UDP( 702 )
  265. #define SVCID_ACCTLOGIN_UDP           SVCID_UDP( 703 )
  266. #define SVCID_ACCTPRINTER_UDP         SVCID_UDP( 704 )
  267. #define SVCID_ELCSD_UDP               SVCID_UDP( 704 )
  268. #define SVCID_ACCTINFO_UDP            SVCID_UDP( 705 )
  269. #define SVCID_ACCTSLAVE2_UDP          SVCID_UDP( 706 )
  270. #define SVCID_ACCTDISK_UDP            SVCID_UDP( 707 )
  271. #define SVCID_KERBEROS_UDP            SVCID_UDP( 750 )
  272. #define SVCID_KERBEROS_MASTER_UDP     SVCID_UDP( 751 )
  273. #define SVCID_PASSWD_SERVER_UDP       SVCID_UDP( 752 )
  274. #define SVCID_USERREG_SERVER_UDP      SVCID_UDP( 753 )
  275. #define SVCID_PHONE_UDP               SVCID_UDP( 1167 )
  276. #define SVCID_MAZE_UDP                SVCID_UDP( 1666 )
  277. #define SVCID_NFS_UDP                 SVCID_UDP( 2049 )
  278. #define SVCID_RSCS0_UDP               SVCID_UDP( 10000 )
  279. #define SVCID_RSCS1_UDP               SVCID_UDP( 10001 )
  280. #define SVCID_RSCS2_UDP               SVCID_UDP( 10002 )
  281. #define SVCID_RSCS3_UDP               SVCID_UDP( 10003 )
  282. #define SVCID_RSCS4_UDP               SVCID_UDP( 10004 )
  283. #define SVCID_RSCS5_UDP               SVCID_UDP( 10005 )
  284. #define SVCID_RSCS6_UDP               SVCID_UDP( 10006 )
  285. #define SVCID_RSCS7_UDP               SVCID_UDP( 10007 )
  286. #define SVCID_RSCS8_UDP               SVCID_UDP( 10008 )
  287. #define SVCID_RSCS9_UDP               SVCID_UDP( 10009 )
  288. #define SVCID_RSCSA_UDP               SVCID_UDP( 10010 )
  289. #define SVCID_RSCSB_UDP               SVCID_UDP( 10011 )
  290. #define SVCID_QMASTER_UDP             SVCID_UDP( 10012 )
  291.  
  292. //
  293. // NetWare services
  294. // GUID block = 000axxxx-0000-0000-C0000-000000000046
  295. //
  296.  
  297. #define SVCID_PRINT_QUEUE                 SVCID_NETWARE( 0x3 )
  298. #define SVCID_FILE_SERVER                 SVCID_NETWARE( 0x4 )
  299. #define SVCID_JOB_SERVER                  SVCID_NETWARE( 0x5 )
  300. #define SVCID_GATEWAY                     SVCID_NETWARE( 0x6 )
  301. #define SVCID_PRINT_SERVER                SVCID_NETWARE( 0x7 )
  302. #define SVCID_ARCHIVE_QUEUE               SVCID_NETWARE( 0x8 )
  303. #define SVCID_ARCHIVE_SERVER              SVCID_NETWARE( 0x9 )
  304. #define SVCID_JOB_QUEUE                   SVCID_NETWARE( 0xA )
  305. #define SVCID_ADMINISTRATION              SVCID_NETWARE( 0xB )
  306. #define SVCID_NAS_SNA_GATEWAY             SVCID_NETWARE( 0x21 )
  307. #define SVCID_REMOTE_BRIDGE_SERVER        SVCID_NETWARE( 0x24 )
  308. #define SVCID_TIME_SYNCHRONIZATION_SERVER SVCID_NETWARE( 0x2D )
  309. #define SVCID_ARCHIVE_SERVER_DYNAMIC_SAP  SVCID_NETWARE( 0x2E )
  310. #define SVCID_ADVERTISING_PRINT_SERVER    SVCID_NETWARE( 0x47 )
  311. #define SVCID_BTRIEVE_VAP                 SVCID_NETWARE( 0x4B )
  312. #define SVCID_DIRECTORY_SERVER            SVCID_NETWARE( 0x278 )
  313. #define SVCID_NETWARE_386                 SVCID_NETWARE( 0x107 )
  314. #define SVCID_HP_PRINT_SERVER             SVCID_NETWARE( 0x30C )
  315. #define SVCID_SNA_SERVER                  SVCID_NETWARE( 0x444 )
  316. #define SVCID_SAA_SERVER                  SVCID_NETWARE( 0x130 )
  317.  
  318. #endif // _SVCGUID_
  319.