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.

90 lines
1.3 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1996 - 1999
  3. Module Name:
  4. ioperf.h
  5. Abstract:
  6. Shared definitions between io perf client and server.
  7. Author:
  8. Mario Goertzel [MarioGo]
  9. Revision History:
  10. MarioGo 3/3/1996 Based on win32 SDK sockets sample
  11. --*/
  12. #include <rpcperf.h>
  13. #include <tchar.h>
  14. #include <winsock2.h>
  15. #include <wsipx.h>
  16. typedef struct
  17. {
  18. DWORD Empty;
  19. } CONNECT_MSG;
  20. typedef struct
  21. {
  22. DWORD RequestSize;
  23. DWORD ReplySize;
  24. } SETUP_MSG;
  25. typedef struct
  26. {
  27. DWORD TotalTicks;
  28. } FINISH_MSG;
  29. typedef struct
  30. {
  31. DWORD TotalSize;
  32. BYTE Array[];
  33. } DATA_MSG;
  34. //
  35. // Message types
  36. //
  37. #define CONNECT 0xAAAAAAA
  38. #define SETUP 0xBBBBBBB
  39. #define FINISH 0xCCCCCCC
  40. #define DATA_RQ 0xFFFFFF0
  41. #define DATA_RP 0xFFFFFF1
  42. typedef struct
  43. {
  44. DWORD MessageType;
  45. union
  46. {
  47. CONNECT_MSG Connect;
  48. SETUP_MSG Setup;
  49. FINISH_MSG Finish;
  50. DATA_MSG Data;
  51. } u;
  52. }
  53. MESSAGE, *PMESSAGE;
  54. //
  55. // Choose arbitrary endpoints. May need to be changed if
  56. // it conflicts with an existing application.
  57. //
  58. #define TCP_PORT 12396
  59. #define SPX_PORT 12396
  60. #define UDP_PORT 12396
  61. #define NM_PORT TEXT("\\\\.\\pipe\\ioperf")
  62. #define NM_CLIENT_PORT TEXT("\\pipe\\ioperf")
  63. //
  64. // Memory allocates
  65. //
  66. #define Allocate(s) malloc(s)
  67. #define Free(p) free(p)