-rw-r--r-- | libopie2/opienet/opcap.h | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/libopie2/opienet/opcap.h b/libopie2/opienet/opcap.h index 9119972..0c9e7da 100644 --- a/libopie2/opienet/opcap.h +++ b/libopie2/opienet/opcap.h @@ -52,13 +52,16 @@ extern "C" // work around a bpf/pcap conflict in recent headers #include <qobject.h> #include <qstring.h> #include <qmap.h> /* OPIE */ #include <opie2/onetutils.h> + +/* Custom Network Includes */ #include "802_11_user.h" +#include "dhcp.h" /* TYPEDEFS */ typedef struct timeval timevalstruct; typedef struct pcap_pkthdr packetheaderstruct; /* FORWARDS */ @@ -474,18 +477,36 @@ class OUDPPacket : public QObject public: OUDPPacket( const unsigned char*, const struct udphdr*, QObject* parent = 0 ); virtual ~OUDPPacket(); int fromPort() const; int toPort() const; + int length() const; + int checksum() const; private: const struct udphdr* _udphdr; }; /*====================================================================================== + * ODHCPPacket + *======================================================================================*/ + +class ODHCPPacket : public QObject +{ + Q_OBJECT + + public: + ODHCPPacket( const unsigned char*, const struct dhcp_packet*, QObject* parent = 0 ); + virtual ~ODHCPPacket(); + + private: + const struct dhcp_packet* _dhcphdr; +}; + +/*====================================================================================== * OTCPPacket *======================================================================================*/ class OTCPPacket : public QObject { Q_OBJECT @@ -493,12 +514,16 @@ class OTCPPacket : public QObject public: OTCPPacket( const unsigned char*, const struct tcphdr*, QObject* parent = 0 ); virtual ~OTCPPacket(); int fromPort() const; int toPort() const; + int seq() const; + int ack() const; + int window() const; + int checksum() const; private: const struct tcphdr* _tcphdr; }; @@ -507,13 +532,14 @@ class OTCPPacket : public QObject *======================================================================================*/ /** * @brief A class based wrapper for network packet capturing. * * This class is the base of a high-level interface to the well known packet capturing - * library libpcap. ... + * library libpcap. + * @see http://tcpdump.org */ class OPacketCapturer : public QObject { Q_OBJECT public: |