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.

65 lines
1.6 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. BUFFER.H
  5. Abstract:
  6. HEADER for buffers.
  7. Author:
  8. Aaron Ogus (aarono)
  9. Environment:
  10. Win32/COM
  11. Revision History:
  12. Date Author Description
  13. ======= ====== ============================================================
  14. 1/30/97 aarono Original
  15. 2/17/98 aarono changed memdesc to be len,ptr from ptr,len to align with sendex data.
  16. --*/
  17. #ifndef _BUFFER_H_
  18. #define _BUFFER_H_
  19. //
  20. // Buffer is a descriptor for a chunk of data.
  21. //
  22. #include "bilink.h"
  23. typedef struct _BUFFER {
  24. union {
  25. struct _BUFFER *pNext; // Next buffer in chain
  26. BILINK BuffList;
  27. };
  28. PUCHAR pData; // Data area of buffer
  29. UINT len; // length of data area
  30. DWORD dwFlags; // info about the data area
  31. PUCHAR pCmdData; // pointer past header to command data - used in receive path.
  32. DWORD sequence; // absolute sequence number
  33. } BUFFER, *PBUFFER;
  34. #define BFLAG_PROTOCOL 0x00000001 /* This buffer is for protocol information */
  35. #define BFLAG_DOUBLE 0x00000002 /* This buffer is a double buffer buffer */
  36. #define BFLAG_PROTHEADER 0x00000004 /* Room for the protocol header is at the head of the packet */
  37. #define BFLAG_FRAME 0x00000008 /* From Frame allocator */
  38. // PROTHEADER flag will only occur with packets that have the DOUBLE flag set
  39. // and only when the provider does not support multi-buffer sends and the
  40. // entire message and protocol header will fit in one media frame. - actually pretty often.
  41. typedef struct _MEMDESC {
  42. UINT len;
  43. PUCHAR pData;
  44. } MEMDESC, *PMEMDESC;
  45. #endif