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.

50 lines
1.6 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. // This file contains definitions for common transport layer items.
  14. //
  15. #define PHXSUM(s,d,p,l) (uint)( (uint)*(ushort *)&(s) + \
  16. (uint)*(ushort *)((char *)&(s) + sizeof(ushort)) + \
  17. (uint)*(ushort *)&(d) + \
  18. (uint)*(ushort *)((char *)&(d) + sizeof(ushort)) + \
  19. (uint)((ushort)net_short((p))) + \
  20. (uint)((ushort)net_short((ushort)(l))) )
  21. #define TCP_TA_SIZE (FIELD_OFFSET(TRANSPORT_ADDRESS, Address->Address)+ \
  22. sizeof(TDI_ADDRESS_IP6))
  23. #define NdisBufferLength(Buffer) MmGetMdlByteCount(Buffer)
  24. #define NdisBufferVirtualAddress(Buffer) MmGetSystemAddressForMdl(Buffer)
  25. //
  26. // Request completion routine definition.
  27. //
  28. typedef void (*RequestCompleteRoutine)(void *, unsigned int, unsigned int);
  29. //
  30. // Function prototypes.
  31. //
  32. extern TDI_STATUS
  33. UpdateConnInfo(PTDI_CONNECTION_INFORMATION ConnInfo, IPv6Addr *SrcAddress,
  34. ulong ScopeID, ushort SrcPort);
  35. extern void
  36. BuildTDIAddress(uchar *Buffer, IPv6Addr *Addr, ulong ScopeID, ushort Port);
  37. extern unsigned long
  38. SystemUpTime(void);