Leaked source code of windows server 2003

56 lines
1.3 KiB

  1. //+-----------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (c) Microsoft Corporation 1992 - 1995
  6. //
  7. // File: sockutil.h
  8. //
  9. // Contents: Prototypes and types for KDC socket utility functions
  10. //
  11. //
  12. // History: 12-July-1996 MikeSw Created
  13. //
  14. //------------------------------------------------------------------------
  15. #ifndef __SOCKUTIL_H__
  16. #define __SOCKUTIL_H__
  17. #include <winsock2.h>
  18. #include <atq.h>
  19. typedef struct _KDC_ATQ_CONTEXT {
  20. LIST_ENTRY Next;
  21. ULONG References;
  22. PATQ_CONTEXT AtqContext;
  23. PVOID EndpointContext;
  24. OVERLAPPED * lpo;
  25. SOCKADDR Address;
  26. SOCKADDR LocalAddress;
  27. PBYTE WriteBuffer;
  28. ULONG WriteBufferLength;
  29. ULONG Flags;
  30. ULONG UsedBufferLength;
  31. ULONG BufferLength;
  32. ULONG ExpectedMessageSize;
  33. PUCHAR Buffer;
  34. } KDC_ATQ_CONTEXT, *PKDC_ATQ_CONTEXT;
  35. #define KDC_ATQ_WRITE_CONTEXT 0x1
  36. #define KDC_ATQ_READ_CONTEXT 0x2
  37. #define KDC_ATQ_SOCKET_CLOSED 0x4
  38. #define KDC_ATQ_SOCKET_USED (KDC_ATQ_WRITE_CONTEXT | KDC_ATQ_READ_CONTEXT)
  39. #define KDC_MAX_BUFFER_LENGTH 0x20000 // maximum size receive buffer = 128k
  40. NTSTATUS
  41. KdcInitializeSockets(
  42. VOID
  43. );
  44. NTSTATUS
  45. KdcShutdownSockets(
  46. VOID
  47. );
  48. #endif // __SOCKUTIL_H__