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.

87 lines
1.3 KiB

  1. /*++
  2. Copyright (c) 2000, Microsoft Corporation
  3. Module Name:
  4. fwlogger.h
  5. Abstract:
  6. Support for firewall logging to a text file.
  7. Author:
  8. Jonathan Burstein (jonburs) 18 September 2000
  9. Revision History:
  10. --*/
  11. #pragma once
  12. #include <wmistr.h>
  13. #include <evntrace.h>
  14. #include <ntwmi.h>
  15. #include "natschma.h"
  16. //
  17. // Protocol constants
  18. //
  19. #define NAT_PROTOCOL_ICMP 0x01
  20. #define NAT_PROTOCOL_IGMP 0x02
  21. #define NAT_PROTOCOL_TCP 0x06
  22. #define NAT_PROTOCOL_UDP 0x11
  23. #define NAT_PROTOCOL_PPTP 0x2F
  24. #define TCP_FLAG_FIN 0x0100
  25. #define TCP_FLAG_SYN 0x0200
  26. #define TCP_FLAG_RST 0x0400
  27. #define TCP_FLAG_PSH 0x0800
  28. #define TCP_FLAG_ACK 0x1000
  29. #define TCP_FLAG_URG 0x2000
  30. //
  31. // Structures
  32. //
  33. #define FW_LOG_BUFFER_SIZE 4096 - sizeof(OVERLAPPED) - sizeof(PCHAR)
  34. #define FW_LOG_BUFFER_REMAINING(pBuffer) \
  35. FW_LOG_BUFFER_SIZE - ((pBuffer)->pChar - (pBuffer)->Buffer)
  36. typedef struct _FW_LOG_BUFFER
  37. {
  38. OVERLAPPED Overlapped;
  39. PCHAR pChar;
  40. CHAR Buffer[FW_LOG_BUFFER_SIZE];
  41. } FW_LOG_BUFFER, *PFW_LOG_BUFFER;
  42. //
  43. // Prototypes
  44. //
  45. VOID
  46. FwCleanupLogger(
  47. VOID
  48. );
  49. DWORD
  50. FwInitializeLogger(
  51. VOID
  52. );
  53. VOID
  54. FwStartLogging(
  55. VOID
  56. );
  57. VOID
  58. FwStopLogging(
  59. VOID
  60. );
  61. VOID
  62. FwUpdateLoggingSettings(
  63. VOID
  64. );