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.

103 lines
1.9 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. ipinip\icmpfn.h
  5. Abstract:
  6. header for icmpfn.c
  7. Author:
  8. Amritansh Raghav
  9. Revision History:
  10. AmritanR Created
  11. Notes:
  12. --*/
  13. #ifndef __IPINIP_ICMP_H__
  14. #define __IPINIP_ICMP_H___
  15. #include <packon.h>
  16. typedef struct _ICMP_HEADER
  17. {
  18. BYTE byType; // ICMP type
  19. BYTE byCode; // ICMP Code
  20. WORD wXSum; // Standard 1's complement checksum
  21. }ICMP_HEADER, *PICMP_HEADER;
  22. #pragma warning(disable:4201)
  23. typedef struct _ICMP_DGRAM_TOO_BIG_MSG
  24. {
  25. ICMP_HEADER;
  26. WORD wUnused;
  27. USHORT usMtu;
  28. }ICMP_DGRAM_TOO_BIG_MSG, *PICMP_DGRAM_TOO_BIG_MSG;
  29. #pragma warning(default:4201)
  30. #include <packoff.h>
  31. //
  32. // ICMP types and codes that we are interested in
  33. //
  34. #define ICMP_TYPE_DEST_UNREACHABLE 0x03
  35. #define ICMP_TYPE_TIME_EXCEEDED 0x0B
  36. #define ICMP_TYPE_PARAM_PROBLEM 0x0C
  37. #define ICMP_CODE_NET_UNREACHABLE 0x00
  38. #define ICMP_CODE_HOST_UNREACHABLE 0x01
  39. #define ICMP_CODE_PROTO_UNREACHABLE 0x02
  40. #define ICMP_CODE_PORT_UNREACHABLE 0x03
  41. #define ICMP_CODE_DGRAM_TOO_BIG 0x04
  42. #define DEST_UNREACH_LENGTH 8
  43. #define TIME_EXCEED_LENGTH 8
  44. typedef
  45. NTSTATUS
  46. (*PICMP_HANDLER)(
  47. PTUNNEL pTunnel,
  48. PICMP_HEADER pIcmpHeader,
  49. PIP_HEADER pInHeader
  50. );
  51. NTSTATUS
  52. HandleTimeExceeded(
  53. PTUNNEL pTunnel,
  54. PICMP_HEADER pIcmpHeader,
  55. PIP_HEADER pInHeader
  56. );
  57. NTSTATUS
  58. HandleDestUnreachable(
  59. PTUNNEL pTunnel,
  60. PICMP_HEADER pIcmpHeader,
  61. PIP_HEADER pInHeader
  62. );
  63. VOID
  64. IpIpTimerRoutine(
  65. PKDPC Dpc,
  66. PVOID DeferredContext,
  67. PVOID SystemArgument1,
  68. PVOID SystemArgument2
  69. );
  70. #endif // __IPINIP_ICMP_H___