Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

146 lines
3.1 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1996 - 1999
  3. Module Name:
  4. Loader.hxx
  5. Abstract:
  6. Global state for the transport interface
  7. Author:
  8. Mario Goertzel [MarioGo]
  9. Revision History:
  10. MarioGo 11/1/1996 Bits 'n pieces
  11. EdwardR 07/1/1997 Added MSMQ support.
  12. --*/
  13. #ifndef __LOADER_HXX
  14. #define __LOADER_HXX
  15. //
  16. // Global state
  17. //
  18. extern DWORD gdwComputerNameLength;
  19. extern RPC_CHAR gpstrComputerName[];
  20. extern const RPC_CHAR HexDigits[];
  21. extern LONG g_NotifyRt;
  22. #ifdef _INTERNAL_RPC_BUILD_
  23. extern RPCLT_PDU_FILTER_FUNC gpfnFilter;
  24. #endif
  25. //
  26. // Transport interfaces defined by each protocol
  27. //
  28. extern const RPC_CONNECTION_TRANSPORT TCP_TransportInterface;
  29. #ifdef SPX_ON
  30. extern const RPC_CONNECTION_TRANSPORT SPX_TransportInterface;
  31. #endif
  32. extern const RPC_CONNECTION_TRANSPORT NMP_TransportInterface;
  33. #ifdef NETBIOS_ON
  34. extern const RPC_CONNECTION_TRANSPORT NBF_TransportInterface;
  35. extern const RPC_CONNECTION_TRANSPORT NBT_TransportInterface;
  36. extern const RPC_CONNECTION_TRANSPORT NBI_TransportInterface;
  37. #endif
  38. #if defined(APPLETALK_ON)
  39. extern const RPC_CONNECTION_TRANSPORT DSP_TransportInterface;
  40. #endif
  41. extern const RPC_CONNECTION_TRANSPORT HTTP_TransportInterface;
  42. extern const RPC_DATAGRAM_TRANSPORT UDP_TransportInterface;
  43. extern const RPC_DATAGRAM_TRANSPORT IPX_TransportInterface;
  44. extern const RPC_DATAGRAM_TRANSPORT CDP_TransportInterface;
  45. #ifdef NCADG_MQ_ON
  46. extern const RPC_DATAGRAM_TRANSPORT MQ_TransportInterface;
  47. #endif
  48. //
  49. // Each protocol is assigned an ID here
  50. //
  51. typedef INT PROTOCOL_ID;
  52. const INT INVALID_PROTOCOL_ID = 0;
  53. const INT TCP = 1;
  54. #ifdef SPX_ON
  55. const INT SPX = 2;
  56. #endif
  57. const INT NMP = 3;
  58. #ifdef NETBIOS_ON
  59. const INT NBF = 4; // Netbios flavors
  60. const INT NBT = 5;
  61. const INT NBI = 6;
  62. #endif
  63. #ifdef APPLETALK_ON
  64. const INT DSP = 7;
  65. #endif
  66. // const INT SPP = 8; // Banyan Vines - no longer supported
  67. const INT HTTP = 9;
  68. const INT UDP = 10;
  69. const INT IPX = 11;
  70. const INT CDP = 12; // Cluster Datagram Protocol
  71. #ifdef NCADG_MQ_ON
  72. const INT MSMQ = 13;
  73. #endif
  74. const INT TCP_IPv6 = 14;
  75. const INT HTTPv2 = 15; // this is a special ID that does not go into
  76. // the usual ID scheme. It is used in few places
  77. // to differentiate b/n HTTP and HTTP2
  78. extern PROTOCOL_ID
  79. MapProtseq(
  80. IN const RPC_CHAR *Protseq
  81. );
  82. extern PROTOCOL_ID
  83. MapProtseq(
  84. IN const CHAR *Protseq
  85. );
  86. extern PROTOCOL_ID
  87. MapProtocolId (
  88. IN UINT Protocol,
  89. IN UINT AddressFamily
  90. );
  91. //
  92. // Based on ID, each protocol is given an entry in the TransportTable
  93. //
  94. class BASE_CONNECTION;
  95. typedef BASE_CONNECTION *PCONNECTION;
  96. typedef RPC_STATUS (*CO_READ_MESSAGE)(PCONNECTION, DWORD, BUFFER *, PUINT );
  97. typedef RPC_STATUS (*CO_ABORT)(RPC_TRANSPORT_CONNECTION);
  98. struct TRANSPORT_TABLE_ENTRY
  99. {
  100. UINT ProtocolTowerId;
  101. UINT AddressTowerId;
  102. RPC_TRANSPORT_INTERFACE pInfo;
  103. };
  104. extern const TRANSPORT_TABLE_ENTRY TransportTable[];
  105. extern const DWORD cTransportTable;
  106. #endif // __LOADER_HXX