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.

68 lines
1.4 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. typedef struct _KDC_ATQ_CONTEXT {
  19. LIST_ENTRY Next;
  20. ULONG References;
  21. PVOID AtqContext;
  22. PVOID EndpointContext;
  23. OVERLAPPED * lpo;
  24. SOCKADDR Address;
  25. SOCKADDR LocalAddress;
  26. PBYTE WriteBuffer;
  27. ULONG WriteBufferLength;
  28. ULONG Flags;
  29. ULONG UsedBufferLength;
  30. ULONG BufferLength;
  31. ULONG ExpectedMessageSize;
  32. PUCHAR Buffer;
  33. } KDC_ATQ_CONTEXT, *PKDC_ATQ_CONTEXT;
  34. #define KDC_ATQ_WRITE_CONTEXT 0x1
  35. #define KDC_ATQ_READ_CONTEXT 0x2
  36. #define KDC_ATQ_SOCKET_CLOSED 0x4
  37. #define KDC_ATQ_SOCKET_USED (KDC_ATQ_WRITE_CONTEXT | KDC_ATQ_READ_CONTEXT)
  38. #define KDC_MAX_BUFFER_LENGTH 0x20000 // maximum size receive buffer = 128k
  39. NTSTATUS
  40. KdcInitializeSockets(
  41. VOID
  42. );
  43. NTSTATUS
  44. KdcShutdownSockets(
  45. VOID
  46. );
  47. NTSTATUS
  48. KdcInitializeDatagramReceiver(
  49. VOID
  50. );
  51. KERBERR
  52. KdcAtqRetrySocketRead(
  53. IN PKDC_ATQ_CONTEXT * Context,
  54. IN PKERB_MESSAGE_BUFFER OldMessage
  55. );
  56. #endif // __SOCKUTIL_H__