author | mickeyl <mickeyl> | 2003-10-02 20:53:58 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-10-02 20:53:58 (UTC) |
commit | 78b29c765dbe70faec614796a4d1421eaf0ec773 (patch) (unidiff) | |
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 | |||
@@ -52,13 +52,16 @@ extern "C" // work around a bpf/pcap conflict in recent headers | |||
52 | #include <qobject.h> | 52 | #include <qobject.h> |
53 | #include <qstring.h> | 53 | #include <qstring.h> |
54 | #include <qmap.h> | 54 | #include <qmap.h> |
55 | 55 | ||
56 | /* OPIE */ | 56 | /* OPIE */ |
57 | #include <opie2/onetutils.h> | 57 | #include <opie2/onetutils.h> |
58 | |||
59 | /* Custom Network Includes */ | ||
58 | #include "802_11_user.h" | 60 | #include "802_11_user.h" |
61 | #include "dhcp.h" | ||
59 | 62 | ||
60 | /* TYPEDEFS */ | 63 | /* TYPEDEFS */ |
61 | typedef struct timeval timevalstruct; | 64 | typedef struct timeval timevalstruct; |
62 | typedef struct pcap_pkthdr packetheaderstruct; | 65 | typedef struct pcap_pkthdr packetheaderstruct; |
63 | 66 | ||
64 | /* FORWARDS */ | 67 | /* FORWARDS */ |
@@ -474,18 +477,36 @@ class OUDPPacket : public QObject | |||
474 | public: | 477 | public: |
475 | OUDPPacket( const unsigned char*, const struct udphdr*, QObject* parent = 0 ); | 478 | OUDPPacket( const unsigned char*, const struct udphdr*, QObject* parent = 0 ); |
476 | virtual ~OUDPPacket(); | 479 | virtual ~OUDPPacket(); |
477 | 480 | ||
478 | int fromPort() const; | 481 | int fromPort() const; |
479 | int toPort() const; | 482 | int toPort() const; |
483 | int length() const; | ||
484 | int checksum() const; | ||
480 | 485 | ||
481 | private: | 486 | private: |
482 | const struct udphdr* _udphdr; | 487 | const struct udphdr* _udphdr; |
483 | }; | 488 | }; |
484 | 489 | ||
485 | /*====================================================================================== | 490 | /*====================================================================================== |
491 | * ODHCPPacket | ||
492 | *======================================================================================*/ | ||
493 | |||
494 | class ODHCPPacket : public QObject | ||
495 | { | ||
496 | Q_OBJECT | ||
497 | |||
498 | public: | ||
499 | ODHCPPacket( const unsigned char*, const struct dhcp_packet*, QObject* parent = 0 ); | ||
500 | virtual ~ODHCPPacket(); | ||
501 | |||
502 | private: | ||
503 | const struct dhcp_packet* _dhcphdr; | ||
504 | }; | ||
505 | |||
506 | /*====================================================================================== | ||
486 | * OTCPPacket | 507 | * OTCPPacket |
487 | *======================================================================================*/ | 508 | *======================================================================================*/ |
488 | 509 | ||
489 | class OTCPPacket : public QObject | 510 | class OTCPPacket : public QObject |
490 | { | 511 | { |
491 | Q_OBJECT | 512 | Q_OBJECT |
@@ -493,12 +514,16 @@ class OTCPPacket : public QObject | |||
493 | public: | 514 | public: |
494 | OTCPPacket( const unsigned char*, const struct tcphdr*, QObject* parent = 0 ); | 515 | OTCPPacket( const unsigned char*, const struct tcphdr*, QObject* parent = 0 ); |
495 | virtual ~OTCPPacket(); | 516 | virtual ~OTCPPacket(); |
496 | 517 | ||
497 | int fromPort() const; | 518 | int fromPort() const; |
498 | int toPort() const; | 519 | int toPort() const; |
520 | int seq() const; | ||
521 | int ack() const; | ||
522 | int window() const; | ||
523 | int checksum() const; | ||
499 | 524 | ||
500 | private: | 525 | private: |
501 | const struct tcphdr* _tcphdr; | 526 | const struct tcphdr* _tcphdr; |
502 | }; | 527 | }; |
503 | 528 | ||
504 | 529 | ||
@@ -507,13 +532,14 @@ class OTCPPacket : public QObject | |||
507 | *======================================================================================*/ | 532 | *======================================================================================*/ |
508 | 533 | ||
509 | /** | 534 | /** |
510 | * @brief A class based wrapper for network packet capturing. | 535 | * @brief A class based wrapper for network packet capturing. |
511 | * | 536 | * |
512 | * This class is the base of a high-level interface to the well known packet capturing | 537 | * This class is the base of a high-level interface to the well known packet capturing |
513 | * library libpcap. ... | 538 | * library libpcap. |
539 | * @see http://tcpdump.org | ||
514 | */ | 540 | */ |
515 | class OPacketCapturer : public QObject | 541 | class OPacketCapturer : public QObject |
516 | { | 542 | { |
517 | Q_OBJECT | 543 | Q_OBJECT |
518 | 544 | ||
519 | public: | 545 | public: |