author | mickeyl <mickeyl> | 2003-10-02 20:53:58 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-10-02 20:53:58 (UTC) |
commit | 78b29c765dbe70faec614796a4d1421eaf0ec773 (patch) (side-by-side diff) | |
tree | 2db88636d14a462d8538003bcd282f3140b1d5f6 /libopie2/opienet/opcap.h | |
parent | e4fc6c395dd0a7400ed2cf76b3148dd7f535c2ea (diff) | |
download | opie-78b29c765dbe70faec614796a4d1421eaf0ec773.zip opie-78b29c765dbe70faec614796a4d1421eaf0ec773.tar.gz opie-78b29c765dbe70faec614796a4d1421eaf0ec773.tar.bz2 |
prepare dhcp decoding
-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 @@ -55,7 +55,10 @@ extern "C" // work around a bpf/pcap conflict in recent headers /* OPIE */ #include <opie2/onetutils.h> + +/* Custom Network Includes */ #include "802_11_user.h" +#include "dhcp.h" /* TYPEDEFS */ typedef struct timeval timevalstruct; @@ -477,12 +480,30 @@ class OUDPPacket : public QObject 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 *======================================================================================*/ @@ -496,6 +517,10 @@ class OTCPPacket : public QObject int fromPort() const; int toPort() const; + int seq() const; + int ack() const; + int window() const; + int checksum() const; private: const struct tcphdr* _tcphdr; @@ -510,7 +535,8 @@ 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 { |