00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef _ARP_H_
00013 #define _ARP_H_
00014
00015 #include "usi-structs.h"
00016 #include "Layer2.h"
00017 #include <stdio.h>
00018
00019 namespace usipp {
00020
00021
00022
00023
00026 class ARP : public Layer2 {
00027 private:
00028 struct ether_arp arphdr;
00029
00030 public:
00031
00035 ARP();
00036
00037 virtual ~ARP();
00038
00041 char *get_sha(char *hwaddr, size_t len) const;
00042
00045 char *get_tha(char *hwaddr, size_t len) const;
00046
00050 char *get_spa(int resolve, char *paddr, size_t len) const;
00051
00057 char *get_tpa(int resolve, char *paddr, size_t len) const;
00058
00061 u_int16_t get_op() const;
00062
00066 virtual int sniffpack();
00067
00068
00069 virtual int init_device(char *, int, size_t);
00070
00071
00072 virtual int setfilter(char *);
00073 };
00074
00075 }
00076 #endif // _ARP_H_
00077