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.

78 lines
2.8 KiB

  1. // -*- mode: C++; tab-width: 4; indent-tabs-mode: nil -*- (for GNU Emacs)
  2. //
  3. // Copyright (c) 1985-2000 Microsoft Corporation
  4. //
  5. // This file is part of the Microsoft Research IPv6 Network Protocol Stack.
  6. // You should have received a copy of the Microsoft End-User License Agreement
  7. // for this software along with this release; see the file "license.txt".
  8. // If not, please see http://www.research.microsoft.com/msripv6/license.htm,
  9. // or write to Microsoft Research, One Microsoft Way, Redmond, WA 98052-6399.
  10. //
  11. // Abstract:
  12. //
  13. // Transmission Control Protocol receive module definitions.
  14. //
  15. #define CONN_REQUEST_COMPLETE 0x01
  16. #define SEND_REQUEST_COMPLETE 0x02
  17. #define IN_RCV_COMPLETE 0x10
  18. #define ANY_REQUEST_COMPLETE (CONN_REQUEST_COMPLETE | SEND_REQUEST_COMPLETE)
  19. #define trh_signature 0x20485254 // 'TRH '
  20. typedef struct TCPRAHdr {
  21. #if DBG
  22. ulong trh_sig; // Signature.
  23. #endif
  24. struct TCPRAHdr *trh_next; // Next pointer.
  25. SeqNum trh_start; // First sequence number.
  26. uint trh_size; // Size in bytes of data in this TRH.
  27. uint trh_flags; // Flags for this segment.
  28. uint trh_urg; // Urgent pointer from this seg.
  29. IPv6Packet *trh_buffer; // Head of buffer list for this TRH.
  30. IPv6Packet *trh_end; // Tail of buffer list for this TRH.
  31. } TCPRAHdr;
  32. //
  33. // Structure of a TCP receive request.
  34. //
  35. #define trr_signature 0x20525254 // 'TRR '
  36. typedef struct TCPRcvReq {
  37. struct TCPRcvReq *trr_next; // Next in chain.
  38. #if DBG
  39. ulong trr_sig; // Signature.
  40. #endif
  41. RequestCompleteRoutine trr_rtn; // Completion routine.
  42. PVOID trr_context; // User context.
  43. uint trr_amt; // Number of bytes currently in buffer.
  44. uint trr_offset; // Offset into first buffer on chain
  45. // at which to start copying.
  46. uint trr_flags; // Flags for this receive.
  47. ushort *trr_uflags; // Pointer to user specifed flags.
  48. uint trr_size; // Total size of buffer chain.
  49. PNDIS_BUFFER trr_buffer; // Pointer to useable NDIS buffer chain.
  50. } TCPRcvReq;
  51. #define TRR_PUSHED 0x80000000 // This buffer has been pushed.
  52. extern uint RequestCompleteFlags;
  53. extern Queue SendCompleteQ;
  54. extern Queue TCBDelayQ;
  55. extern KSPIN_LOCK RequestCompleteLock;
  56. extern KSPIN_LOCK TCBDelayLock;
  57. extern void TCPRcvComplete(void);
  58. extern void FreePacketChain(IPv6Packet *Packet);
  59. extern void DelayAction(struct TCB *DelayTCB, uint Action);
  60. extern void ProcessTCBDelayQ(void);
  61. extern void AdjustRcvWin(struct TCB *WinTCB);
  62. extern ProtoRecvProc TCPReceive;
  63. extern ProtoControlRecvProc TCPControlReceive;