Leaked source code of windows server 2003
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.

69 lines
1.4 KiB

  1. //+-----------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (c) Microsoft Corporation
  6. //
  7. // File: kpcontext.h
  8. //
  9. // Contents: Declarations for context structs, prototypes for context
  10. // management routines.
  11. //
  12. // History: 10-Jul-2001 t-ryanj Created
  13. //
  14. //------------------------------------------------------------------------
  15. #include "kpcommon.h"
  16. #include "winsock.h"
  17. #ifndef __KPCONTEXT_H__
  18. #define __KPCONTEXT_H__
  19. //
  20. // Defines the status codes for use in the context struct.
  21. //
  22. enum _KPSTATUS
  23. {
  24. KP_HTTP_INITIAL,
  25. KP_HTTP_READ,
  26. KP_KDC_WRITE,
  27. KP_KDC_READ,
  28. KP_HTTP_WRITE
  29. };
  30. //
  31. // The overlapped structure *must* be first in order for
  32. // us to pass this and get it back to overlapped i/o calls.
  33. //
  34. typedef struct _KPCONTEXT
  35. {
  36. OVERLAPPED ol;
  37. SOCKET KdcSock;
  38. DWORD bytesExpected;
  39. DWORD bytesReceived;
  40. ULONG PduValue;
  41. LPEXTENSION_CONTROL_BLOCK pECB;
  42. _KPSTATUS dwStatus;
  43. DWORD buflen;
  44. DWORD emptybytes;
  45. LPBYTE databuf;
  46. } KPCONTEXT, *PKPCONTEXT;
  47. #define KpGetContextFromOl( lpOverlapped ) CONTAINING_RECORD( lpOverlapped, KPCONTEXT, ol )
  48. PKPCONTEXT
  49. KpAcquireContext(
  50. LPEXTENSION_CONTROL_BLOCK pECB
  51. );
  52. VOID
  53. KpReleaseContext(
  54. PKPCONTEXT pContext
  55. );
  56. #endif // __KPCONTEXT_H__