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_structs.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-05-27  |  2.8 KB  |  91 lines

  1. /* Sniffit Structs File                                                       */
  2.  
  3. #include <stdio.h>
  4. #include "sn_packetstructs.h"
  5.  
  6. /**** Global data **********************************************************/ 
  7. struct file_info 
  8. {
  9.         char proto, filename[50];
  10.         FILE *f;
  11.         unsigned long bytes;
  12.         unsigned long exp_seq;     /* expected seq to avoid double logging */
  13.     int time_out;   
  14.     char log;                      /* log=0  : do nothing        */
  15.                                    /* log=1  : log 'login'       */
  16.                                    /* log=2  : 'login' logged    */
  17.                                    /* log=3  : log password      */
  18.                                    /* log=4  : password logged   */
  19.                                    /* log=99 : no more detection */
  20.     char scroll_buf[SCBUF+1];                  /* scroll buffer */
  21.     char *buffer;                 /* pointer to a buffer */
  22.     struct file_info *next;
  23. };
  24.  
  25. /**** Global data (config) **************************************************/ 
  26. struct cfg_file_contense
  27. {
  28. unsigned char host[16];
  29. unsigned int priority;
  30. unsigned char wildcard;
  31. unsigned short port;
  32. };
  33.  
  34. /**** Global data (plugins) *************************************************/
  35. struct Plugin_data {
  36.     struct unwrap PL_info;
  37.     struct IP_header PL_iphead;
  38.     struct TCP_header PL_tcphead;
  39.     struct UDP_header PL_udphead;
  40.     unsigned char PL_data[MTU];
  41.     unsigned char PL_packet[MTU];
  42. };
  43.  
  44. /**** Global data (interactive) *********************************************/ 
  45. #ifdef INCLUDE_INTERFACE                               
  46. #include "sn_curses.h"
  47.  
  48. struct box_window
  49. {
  50.     WINDOW *main_window, *work_window;
  51. };
  52.  
  53.  
  54. struct shared_conn_data           /* shared memory connection datastructure */
  55.   {
  56.   char connection [CONN_NAMELEN];                 /* full ID string of conn */
  57.   int timeout;                   
  58.   };
  59. struct shared_logged_conn            /* shared memory logging datastructure */
  60.   {
  61.   char log_enter [CONN_NAMELEN];                          /* normal logging */
  62.   };
  63. struct snif_mask                                         /* struct for mask */
  64.   {
  65.   unsigned long source_ip, destination_ip;
  66.   unsigned short source_port, destination_port;
  67.   };
  68.  
  69. /* (packet generation) */
  70. struct generate_mask
  71. {
  72.     unsigned long  dest_ip, source_ip;
  73.     unsigned short    dest_port, source_port;
  74.     unsigned long     pkt_no;
  75. };
  76.  
  77. struct sp_data_exchange {
  78.         int fd;                                /* Sh!t from transmit_TCP  */
  79.         char *data;
  80.         int datalen;
  81.         unsigned long source; unsigned short source_port;
  82.         unsigned long dest;   unsigned short dest_port;
  83.         unsigned long seq, ack;
  84.         unsigned short flags;
  85.         char *buffer;               /* work buffer */
  86.         int IP_optlen;             /* IP options length in bytes  */
  87.         int TCP_optlen;            /* TCP options length in bytes */
  88.         };                            
  89. #endif
  90.  
  91.