home *** CD-ROM | disk | FTP | other *** search
/ Power Hacker 2003 / Power_Hacker_2003.iso / E-zine / Magazines / crh / freebsd / rootkit / sniffit.0.3.5 / sn_defines.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-05-27  |  3.4 KB  |  115 lines

  1. /* Sniffit Defines File                                                         */
  2.  
  3. #include "sn_config.h"
  4.  
  5. /*** Normal Sniffit operations */
  6.  
  7. #define VERSION   "0.3.5"                               /* Program Version */
  8. #define SNAPLEN   MTU                            /* Ethernet Packet Length */
  9. #define MSDELAY   0                               /* Delay between Packets */
  10. #define PACKETS   1                       /* Number of packets to dispatch */
  11. #define LENGTH_OF_INTERPROC_DATA    5*SNAPLEN       /* buffer capacity */
  12. #define SCBUF     30                       /* scroll buffer length */
  13. #define LOG_PASS_BUF  20+1                    /* login/pwd buffer length */
  14. #define TELNET_ENTER    0x0d         /* Enter in telnet login session  */
  15. #define FTP_ENTER    0x0d  /* first char of Enter in FTP login session  */
  16.  
  17. #define DEST        0
  18. #define SOURCE      1
  19. #define BOTH        2
  20. #define INTERACTIVE 99
  21.  
  22. /* Packet examining defines (finish) */
  23. /*     0-9  : TCP    */
  24. /*     10-19: ICMP    */
  25. /*     20-29: UDP      */
  26. #define DONT_EXAMINE    -1            /* Skip Packet */
  27. #define TCP_EXAMINE    0            /* TCP - 'for us' */
  28. #define TCP_FINISH    1            /* TCP - end connection */
  29. #define ICMP_EXAMINE    10            /* ICMP - examine */
  30. #define UDP_EXAMINE    20            /* UDP - examine */
  31.  
  32. #define F_TCP        1            /* Flags for PROTOCOLS */
  33. #define F_ICMP        2
  34. #define F_UDP        4
  35. #define F_IP            8
  36.  
  37. /*** Interface defines */
  38.  
  39. #ifdef INCLUDE_INTERFACE
  40. #define ENTER 13
  41.  
  42. #define WIN_COLOR_NORMAL     1    /* Color pairs for various functions */
  43. #define WIN_COLOR_POINT      2
  44. #define WIN_COLOR_DATA       3
  45. #define WIN_COLOR_INPUT      4
  46. #define WIN_COLOR_MENU      5
  47. #define WIN_COLOR_PACKET_INFO    6
  48. #define WIN_COLOR_PKTCNT    7
  49.  
  50. #define CONN_NAMELEN         56    /* length of string */
  51.  
  52. #define MENU " Masks: F1-Source IP  F2-Dest. IP  F3-Source Port  F4-Dest. Port"
  53. #endif
  54.  
  55. /* First undefine all Plugins, just to be sure */
  56.  
  57. #undef PLUGIN0_NAME
  58. #undef PLUGIN1_NAME
  59. #undef PLUGIN2_NAME
  60. #undef PLUGIN3_NAME
  61. #undef PLUGIN4_NAME
  62. #undef PLUGIN5_NAME
  63. #undef PLUGIN6_NAME
  64. #undef PLUGIN7_NAME
  65. #undef PLUGIN8_NAME
  66. #undef PLUGIN9_NAME
  67.  
  68.  
  69. /***************************** Packet Defines  ****************************/
  70. #define ETHERHEAD 14    /* Length Ethernet Packet header */
  71. #define PPPHEAD 4       /* Length PPP Packet header */
  72. #define SLIPHEAD 16     /* Length SLIP Packet header */
  73.  
  74. #define    IP_VERSION    4
  75.  
  76. #define URG 32       /*TCP-flags */
  77. #define ACK 16
  78. #define PSH 8
  79. #define RST 4
  80. #define SYN 2
  81. #define FIN 1
  82.  
  83. #define NO_IP       0
  84. #define NO_IP_4     1000
  85. #define CORRUPT_IP    1001
  86. #define ICMP        1                       /* Protocol Numbers */
  87. #define TCP         6
  88. #define UDP         17
  89.  
  90. #define ICMP_HEADLENGTH 4               /* fixed ICMP header length */
  91. #define UDP_HEADLENGTH  8               /* fixed UDP header length */
  92.  
  93. #define IP_DELAY        32
  94. #define IP_THROUGHPUT   16
  95. #define IP_RELIABILITY  8
  96.  
  97. #define IP_DF   2
  98. #define IP_MF   1                         
  99.  
  100. /*** ICMP types ********************************************************/
  101. #define ICMP_TYPE_0     "Echo reply"
  102. #define ICMP_TYPE_3     "Destination unreachable"
  103. #define ICMP_TYPE_4     "Source quench"
  104. #define ICMP_TYPE_5     "Redirect"
  105. #define ICMP_TYPE_8     "Echo"
  106. #define ICMP_TYPE_11    "Time exceeded"
  107. #define ICMP_TYPE_12    "Parameter problem"
  108. #define ICMP_TYPE_13    "Timestamp"
  109. #define ICMP_TYPE_14    "Timestamp reply"
  110. #define ICMP_TYPE_15    "Information request"
  111. #define ICMP_TYPE_16    "Information reply"
  112. #define ICMP_TYPE_17    "Address mask request"
  113. #define ICMP_TYPE_18    "Adress mask reply"
  114.                                                
  115.