summaryrefslogtreecommitdiff
path: root/libopie2/opienet/opcap.cpp
Unidiff
Diffstat (limited to 'libopie2/opienet/opcap.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opienet/opcap.cpp79
1 files changed, 79 insertions, 0 deletions
diff --git a/libopie2/opienet/opcap.cpp b/libopie2/opienet/opcap.cpp
index 1de7124..cc8ce7f 100644
--- a/libopie2/opienet/opcap.cpp
+++ b/libopie2/opienet/opcap.cpp
@@ -356,11 +356,54 @@ OUDPPacket::OUDPPacket( const unsigned char* end, const struct udphdr* data, QOb
356 qDebug( "OUDPPacket::OUDPPacket(): decoding UDP header..." ); 356 qDebug( "OUDPPacket::OUDPPacket(): decoding UDP header..." );
357} 357}
358 358
359
359OUDPPacket::~OUDPPacket() 360OUDPPacket::~OUDPPacket()
360{ 361{
361} 362}
362 363
363 364
365int OUDPPacket::fromPort() const
366{
367 return _udphdr->source;
368}
369
370
371int OUDPPacket::toPort() const
372{
373 return _udphdr->dest;
374}
375
376
377int OUDPPacket::length() const
378{
379 return _udphdr->len;
380}
381
382
383int OUDPPacket::checksum() const
384{
385 return _udphdr->check;
386}
387
388
389/*======================================================================================
390 * ODHCPPacket
391 *======================================================================================*/
392
393
394ODHCPPacket::ODHCPPacket( const unsigned char* end, const struct dhcp_packet* data, QObject* parent )
395 :QObject( parent, "DHCP" ), _dhcphdr( data )
396
397{
398 qDebug( "ODHCPPacket::ODHCPPacket(): decoding DHCP information..." );
399}
400
401
402ODHCPPacket::~ODHCPPacket()
403{
404}
405
406
364/*====================================================================================== 407/*======================================================================================
365 * OTCPPacket 408 * OTCPPacket
366 *======================================================================================*/ 409 *======================================================================================*/
@@ -373,11 +416,47 @@ OTCPPacket::OTCPPacket( const unsigned char* end, const struct tcphdr* data, QOb
373 qDebug( "OTCPPacket::OTCPPacket(): decoding TCP header..." ); 416 qDebug( "OTCPPacket::OTCPPacket(): decoding TCP header..." );
374} 417}
375 418
419
376OTCPPacket::~OTCPPacket() 420OTCPPacket::~OTCPPacket()
377{ 421{
378} 422}
379 423
380 424
425int OTCPPacket::fromPort() const
426{
427 return _tcphdr->source;
428}
429
430
431int OTCPPacket::toPort() const
432{
433 return _tcphdr->dest;
434}
435
436
437int OTCPPacket::seq() const
438{
439 return _tcphdr->seq;
440}
441
442
443int OTCPPacket::ack() const
444{
445 return _tcphdr->ack_seq;
446}
447
448
449int OTCPPacket::window() const
450{
451 return _tcphdr->window;
452}
453
454
455int OTCPPacket::checksum() const
456{
457 return _tcphdr->check;
458}
459
381/*====================================================================================== 460/*======================================================================================
382 * OPrismHeaderPacket 461 * OPrismHeaderPacket
383 *======================================================================================*/ 462 *======================================================================================*/