decoders/decode_tcp.h

Go to the documentation of this file.
00001 #ifndef _HLBR_DECODE_TCP_H_
00002 #define _HLBR_DECODE_TCP_H_
00003 
00004 #include "../config.h"
00005 #include "../engine/hlbr.h"
00006 #include "decode.h"
00007 
00008 
00009 typedef struct tcp_header {
00010         unsigned short  source;
00011         unsigned short  dest;
00012         unsigned int    seq;
00013         unsigned int    ack_seq;
00014 #ifdef HLBR_LITTLE_ENDIAN
00015         unsigned short  res1:4,
00016                 doff:4,
00017                 fin:1,
00018                 syn:1,
00019                 rst:1,
00020                 psh:1,
00021                 ack:1,
00022                 urg:1,
00023                 ece:1,
00024                 cwr:1;
00025 #else
00026         unsigned short  doff:4,
00027                 res1:4,
00028                 cwr:1,
00029                 ece:1,
00030                 urg:1,
00031                 ack:1,
00032                 psh:1,
00033                 rst:1,
00034                 syn:1,
00035                 fin:1;
00036 #endif  
00037         unsigned short  window;
00038         unsigned short  check;
00039         unsigned short  urg_ptr;
00040 } TCPHdr;
00041 
00042 
00043 
00044 typedef struct tcp_data{
00045         TCPHdr*                 Header;
00046         unsigned char*  Data;
00047         unsigned int    DataLen;
00048 } TCPData;
00049 
00050 
00051 int InitDecoderTCP();
00052 
00053 #endif

Generated on Sat Jul 7 23:33:10 2007 for HLBR by  doxygen 1.5.2