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.

67 lines
2.6 KiB

  1. /********************************************************************/
  2. /** Microsoft LAN Manager **/
  3. /** Copyright(c) Microsoft Corp., 1990-2000 **/
  4. /********************************************************************/
  5. /* :ts=4 */
  6. //** TCPRCV.H - TCP receive protocol definitions.
  7. //
  8. // This file contains the definitions for structures used by the receive code.
  9. //
  10. #pragma once
  11. #define CONN_REQUEST_COMPLETE 0x01
  12. #define SEND_REQUEST_COMPLETE 0x02
  13. #define IN_RCV_COMPLETE 0x10
  14. #define ANY_REQUEST_COMPLETE (CONN_REQUEST_COMPLETE | SEND_REQUEST_COMPLETE)
  15. #define trh_signature 0x20485254 // 'TRH '
  16. typedef struct TCPRAHdr {
  17. #if DBG
  18. ulong trh_sig; // Signature.
  19. #endif
  20. struct TCPRAHdr *trh_next; // Next pointer.
  21. SeqNum trh_start; // First sequence number.
  22. uint trh_size; // Size in bytes of data in this TRH.
  23. uint trh_flags; // Flags for this segment.
  24. uint trh_urg; // Urgent pointer from this seg.
  25. IPRcvBuf *trh_buffer; // Head of buffer list for this TRH.
  26. IPRcvBuf *trh_end; // End of buffer list for this TRH.
  27. } TCPRAHdr;
  28. //* Structure of a TCP receive request.
  29. #define trr_signature 0x20525254 // 'TRR '
  30. typedef struct TCPRcvReq {
  31. #if DBG
  32. ulong trr_sig; // Signature.
  33. #endif
  34. struct TCPRcvReq *trr_next; // Next in chain.
  35. CTEReqCmpltRtn trr_rtn; // Completion routine.
  36. PVOID trr_context; // User context.
  37. uint trr_amt; // Number of bytes currently in buffer.
  38. uint trr_offset; // Offset into first buffer on chain
  39. // at which to start copying.
  40. uint trr_flags; // Flags for this recv.
  41. ushort *trr_uflags; // Pointer to user specifed flags.
  42. uint trr_size; // Total size of buffer chain.
  43. PNDIS_BUFFER trr_buffer; // Pointer to useable NDIS buffer chain.
  44. } TCPRcvReq;
  45. #define TRR_PUSHED 0x80000000 // This buffer has been pushed.
  46. extern void TCPRcvComplete(void);
  47. extern void FreeRBChain(IPRcvBuf *RBChain);
  48. extern void DelayAction(struct TCB *DelayTCB, uint Action);
  49. extern void ProcessTCBDelayQ(void);
  50. extern LOGICAL ProcessPerCpuTCBDelayQ(int Proc, KIRQL OrigIrql,
  51. const LARGE_INTEGER* StopTicks,
  52. ulong *ItemsProcessed);
  53. extern void AdjustRcvWin(struct TCB *WinTCB);