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.

81 lines
2.0 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1994 - 1999
  6. //
  7. // File: dgsccomn.h
  8. //
  9. //--------------------------------------------------------------------------
  10. /////////////////////////////////////////////////////////////////////////
  11. //
  12. // Filename: dgsccomn.h
  13. //
  14. // Description: This file contains definitions for datagram socket I/O routines
  15. // for use with IPC raw network performance tests.
  16. //
  17. // Authors: Scott Holden (Translator from NT API to win32 API)
  18. // Mahesh Keni (Mahesh wrote this application using mostly
  19. // NT native API calls)
  20. //
  21. /////////////////////////////////////////////////////////////////////////
  22. typedef int INTEGER;
  23. #define ClearSocket(PSOCK) {RtlZeroMemory(PSOCK ,sizeof (SOCKADDR));}
  24. /************************************************************************/
  25. INTEGER
  26. DGSocket_Recv(
  27. IN USHORT CIndex,
  28. IN OUT PVOID PReadBuf,
  29. IN OUT PULONG rpdatalen
  30. );
  31. INTEGER
  32. DGSocket_RecvFrom(
  33. IN USHORT CIndex,
  34. IN OUT PVOID PReadBuf,
  35. IN OUT PULONG rpdatalen,
  36. IN OUT PSOCKADDR pcaddr,
  37. IN OUT PUSHORT pcaddrlen
  38. );
  39. INTEGER
  40. DGSocket_Send(
  41. IN USHORT CIndex,
  42. IN OUT PVOID PWriteBuf,
  43. IN OUT PULONG spdatalen
  44. );
  45. INTEGER
  46. DGSocket_SendTo(
  47. IN USHORT CIndex,
  48. IN OUT PVOID PWriteBuf,
  49. IN OUT PULONG spdatalen,
  50. IN OUT PSOCKADDR pcaddr,
  51. IN OUT PUSHORT pcaddrlen
  52. );
  53. INTEGER
  54. DGSocket_Close(
  55. IN USHORT CIndex
  56. );
  57. INTEGER
  58. DGSocket_Connect(
  59. IN USHORT CIndex,
  60. IN PSOCKADDR pdsockaddr
  61. );
  62. /************************************************************************/
  63. // External variables
  64. /************************************************************************/
  65. extern PCHAR HostName;
  66. extern PCHAR ServerName;
  67. extern int AddrFly;
  68. extern BOOLEAN Connected;
  69. extern struct client Clients[MAXCLIENTS]; // all the client data
  70. extern USHORT NClients;
  71.