-rw-r--r-- | libopie2/opienet/opcap.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libopie2/opienet/opcap.h b/libopie2/opienet/opcap.h index 0c9e7da..a031dd1 100644 --- a/libopie2/opienet/opcap.h +++ b/libopie2/opienet/opcap.h | |||
@@ -478,50 +478,60 @@ class OUDPPacket : public QObject | |||
478 | OUDPPacket( const unsigned char*, const struct udphdr*, QObject* parent = 0 ); | 478 | OUDPPacket( const unsigned char*, const struct udphdr*, QObject* parent = 0 ); |
479 | virtual ~OUDPPacket(); | 479 | virtual ~OUDPPacket(); |
480 | 480 | ||
481 | int fromPort() const; | 481 | int fromPort() const; |
482 | int toPort() const; | 482 | int toPort() const; |
483 | int length() const; | 483 | int length() const; |
484 | int checksum() const; | 484 | int checksum() const; |
485 | 485 | ||
486 | private: | 486 | private: |
487 | const struct udphdr* _udphdr; | 487 | const struct udphdr* _udphdr; |
488 | }; | 488 | }; |
489 | 489 | ||
490 | /*====================================================================================== | 490 | /*====================================================================================== |
491 | * ODHCPPacket | 491 | * ODHCPPacket |
492 | *======================================================================================*/ | 492 | *======================================================================================*/ |
493 | 493 | ||
494 | class ODHCPPacket : public QObject | 494 | class ODHCPPacket : public QObject |
495 | { | 495 | { |
496 | Q_OBJECT | 496 | Q_OBJECT |
497 | 497 | ||
498 | public: | 498 | public: |
499 | ODHCPPacket( const unsigned char*, const struct dhcp_packet*, QObject* parent = 0 ); | 499 | ODHCPPacket( const unsigned char*, const struct dhcp_packet*, QObject* parent = 0 ); |
500 | virtual ~ODHCPPacket(); | 500 | virtual ~ODHCPPacket(); |
501 | 501 | ||
502 | QHostAddress clientAddress() const; | ||
503 | QHostAddress yourAddress() const; | ||
504 | QHostAddress serverAddress() const; | ||
505 | QHostAddress relayAddress() const; | ||
506 | |||
507 | bool isRequest() const; | ||
508 | bool isReply() const; | ||
509 | QString type() const; | ||
510 | |||
502 | private: | 511 | private: |
503 | const struct dhcp_packet* _dhcphdr; | 512 | const struct dhcp_packet* _dhcphdr; |
513 | unsigned char _type; | ||
504 | }; | 514 | }; |
505 | 515 | ||
506 | /*====================================================================================== | 516 | /*====================================================================================== |
507 | * OTCPPacket | 517 | * OTCPPacket |
508 | *======================================================================================*/ | 518 | *======================================================================================*/ |
509 | 519 | ||
510 | class OTCPPacket : public QObject | 520 | class OTCPPacket : public QObject |
511 | { | 521 | { |
512 | Q_OBJECT | 522 | Q_OBJECT |
513 | 523 | ||
514 | public: | 524 | public: |
515 | OTCPPacket( const unsigned char*, const struct tcphdr*, QObject* parent = 0 ); | 525 | OTCPPacket( const unsigned char*, const struct tcphdr*, QObject* parent = 0 ); |
516 | virtual ~OTCPPacket(); | 526 | virtual ~OTCPPacket(); |
517 | 527 | ||
518 | int fromPort() const; | 528 | int fromPort() const; |
519 | int toPort() const; | 529 | int toPort() const; |
520 | int seq() const; | 530 | int seq() const; |
521 | int ack() const; | 531 | int ack() const; |
522 | int window() const; | 532 | int window() const; |
523 | int checksum() const; | 533 | int checksum() const; |
524 | 534 | ||
525 | private: | 535 | private: |
526 | const struct tcphdr* _tcphdr; | 536 | const struct tcphdr* _tcphdr; |
527 | }; | 537 | }; |