decoders/decode_arp.h

Go to the documentation of this file.
00001 #ifndef _HLBR_DECODE_ARP_H_
00002 #define _HLBR_DECODE_ARP_H_
00003 
00004 #include "../config.h"
00005 #include "../engine/hlbr.h"
00006 #include "decode.h"
00007 
00008 #define ARP_TYPE_ETHERNET       0x0001
00009 #define ARP_TYPE_IP                     0x0800
00010 
00011 #define ARP_OP_REQUEST          0x0001
00012 #define ARP_OP_REPLY            0x0002
00013 
00014 typedef struct arp_header{
00015         unsigned short          HardwareType;
00016         unsigned short          ProtocolType;
00017         unsigned char           HardwareLen;
00018         unsigned char           ProtocolLen;
00019         unsigned short          Operation;
00020 } ARPHdr;
00021 
00022 typedef struct arp_ether_ip{
00023         unsigned char           SenderMac[6];
00024         unsigned char           SenderIP[4];  /*leave as char so they're packed propertly*/
00025         unsigned char           TargetMac[6];
00026         unsigned char           TargetIP[4];
00027 } ARPEtherIP;
00028 
00029 typedef struct arp_data{
00030         ARPHdr*         Header;
00031         ARPEtherIP*     EthernetARPHeader;
00032 } ARPData;
00033 
00034 
00035 int InitDecoderARP();
00036 
00037 #endif

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