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.

50 lines
1.6 KiB

  1. typedef struct in_addr IPV4_ADDRESS;
  2. typedef struct in6_addr IPV6_ADDRESS;
  3. typedef struct {
  4. union {
  5. PVOID pReply;
  6. PICMP_ECHO_REPLY pReply4; // ICMP reply packet
  7. PICMPV6_ECHO_REPLY pReply6;
  8. };
  9. union {
  10. SOCKADDR_STORAGE ssAddr; // Address of this hop
  11. SOCKADDR saAddr;
  12. SOCKADDR_IN sinAddr;
  13. SOCKADDR_IN6 sin6Addr;
  14. };
  15. ULONG ulNumRcvd; // number of packets received
  16. ULONG ulHopRcvd;
  17. ULONG ulRTTtotal; // cumulative RTT
  18. } HOP;
  19. typedef HOP APC_CONTEXT, *PAPC_CONTEXT;
  20. #define MAX_HOPS 255
  21. #define DEFAULT_NUM_QUERIES 100
  22. #define DEFAULT_MAX_RETRIES 3
  23. #define DEFAULT_MAXIMUM_HOPS 30
  24. #define DEFAULT_TOS 0
  25. #define DEFAULT_FLAGS 0
  26. #define DEFAULT_SEND_SIZE 64
  27. #define DEFAULT_RECEIVE_SIZE (( max(sizeof(ICMPV6_ECHO_REPLY),sizeof(ICMP_ECHO_REPLY)) + \
  28. DEFAULT_SEND_SIZE) + \
  29. sizeof(PVOID) + \
  30. sizeof(IO_STATUS_BLOCK))
  31. #define DEFAULT_TOS 0
  32. #define DEFAULT_TIMEOUT 4000L
  33. #define MIN_INTERVAL 250L
  34. #define MAX_PENDING_REQUESTS 100
  35. #define TRUE 1
  36. #define FALSE 0
  37. #define STDOUT 1
  38. #define is ==
  39. #define isnot !=
  40. #define MAX(x,y) ((x)>(y))? (x) : (y)
  41. extern HOP hop[MAX_HOPS];
  42. extern ULONG g_ulTimeout;
  43. extern HANDLE g_hIcmp;
  44. extern ULONG g_ulRcvBufSize;