-rw-r--r-- | libopie2/opienet/opcap.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libopie2/opienet/opcap.cpp b/libopie2/opienet/opcap.cpp index 313f5bb..9ed2b83 100644 --- a/libopie2/opienet/opcap.cpp +++ b/libopie2/opienet/opcap.cpp | |||
@@ -501,48 +501,55 @@ QString ODHCPPacket::type() const | |||
501 | 501 | ||
502 | QHostAddress ODHCPPacket::clientAddress() const | 502 | QHostAddress ODHCPPacket::clientAddress() const |
503 | { | 503 | { |
504 | return EXTRACT_32BITS( &_dhcphdr->ciaddr ); | 504 | return EXTRACT_32BITS( &_dhcphdr->ciaddr ); |
505 | } | 505 | } |
506 | 506 | ||
507 | 507 | ||
508 | QHostAddress ODHCPPacket::yourAddress() const | 508 | QHostAddress ODHCPPacket::yourAddress() const |
509 | { | 509 | { |
510 | return EXTRACT_32BITS( &_dhcphdr->yiaddr ); | 510 | return EXTRACT_32BITS( &_dhcphdr->yiaddr ); |
511 | } | 511 | } |
512 | 512 | ||
513 | 513 | ||
514 | QHostAddress ODHCPPacket::serverAddress() const | 514 | QHostAddress ODHCPPacket::serverAddress() const |
515 | { | 515 | { |
516 | return EXTRACT_32BITS( &_dhcphdr->siaddr ); | 516 | return EXTRACT_32BITS( &_dhcphdr->siaddr ); |
517 | } | 517 | } |
518 | 518 | ||
519 | 519 | ||
520 | QHostAddress ODHCPPacket::relayAddress() const | 520 | QHostAddress ODHCPPacket::relayAddress() const |
521 | { | 521 | { |
522 | return EXTRACT_32BITS( &_dhcphdr->giaddr ); | 522 | return EXTRACT_32BITS( &_dhcphdr->giaddr ); |
523 | } | 523 | } |
524 | 524 | ||
525 | |||
526 | OMacAddress ODHCPPacket::clientMacAddress() const | ||
527 | { | ||
528 | return OMacAddress( _dhcphdr->chaddr ); | ||
529 | } | ||
530 | |||
531 | |||
525 | /*====================================================================================== | 532 | /*====================================================================================== |
526 | * OTCPPacket | 533 | * OTCPPacket |
527 | *======================================================================================*/ | 534 | *======================================================================================*/ |
528 | 535 | ||
529 | 536 | ||
530 | OTCPPacket::OTCPPacket( const unsigned char* end, const struct tcphdr* data, QObject* parent ) | 537 | OTCPPacket::OTCPPacket( const unsigned char* end, const struct tcphdr* data, QObject* parent ) |
531 | :QObject( parent, "TCP" ), _tcphdr( data ) | 538 | :QObject( parent, "TCP" ), _tcphdr( data ) |
532 | 539 | ||
533 | { | 540 | { |
534 | qDebug( "OTCPPacket::OTCPPacket(): decoding TCP header..." ); | 541 | qDebug( "OTCPPacket::OTCPPacket(): decoding TCP header..." ); |
535 | } | 542 | } |
536 | 543 | ||
537 | 544 | ||
538 | OTCPPacket::~OTCPPacket() | 545 | OTCPPacket::~OTCPPacket() |
539 | { | 546 | { |
540 | } | 547 | } |
541 | 548 | ||
542 | 549 | ||
543 | int OTCPPacket::fromPort() const | 550 | int OTCPPacket::fromPort() const |
544 | { | 551 | { |
545 | return EXTRACT_16BITS( &_tcphdr->source ); | 552 | return EXTRACT_16BITS( &_tcphdr->source ); |
546 | } | 553 | } |
547 | 554 | ||
548 | 555 | ||