summaryrefslogtreecommitdiff
path: root/libopie2/opienet/opcap.h
authormickeyl <mickeyl>2003-05-04 20:38:24 (UTC)
committer mickeyl <mickeyl>2003-05-04 20:38:24 (UTC)
commit09dceae91b14a4b2d936ebfc6c7c276686c2b98c (patch) (unidiff)
treeb8ebc6f92ca0008a90ef036c3c5ba873a2f59670 /libopie2/opienet/opcap.h
parent8409a251d52b59585889e1bcaa278a6b847db2fc (diff)
downloadopie-09dceae91b14a4b2d936ebfc6c7c276686c2b98c.zip
opie-09dceae91b14a4b2d936ebfc6c7c276686c2b98c.tar.gz
opie-09dceae91b14a4b2d936ebfc6c7c276686c2b98c.tar.bz2
add parsing of ARP packets
Diffstat (limited to 'libopie2/opienet/opcap.h') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opienet/opcap.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/libopie2/opienet/opcap.h b/libopie2/opienet/opcap.h
index bee0ca0..5a50d9b 100644
--- a/libopie2/opienet/opcap.h
+++ b/libopie2/opienet/opcap.h
@@ -417,48 +417,72 @@ class OLLCPacket : public QObject
417class OIPPacket : public QObject 417class OIPPacket : public QObject
418{ 418{
419 Q_OBJECT 419 Q_OBJECT
420 420
421 public: 421 public:
422 OIPPacket( const unsigned char*, const struct iphdr*, QObject* parent = 0 ); 422 OIPPacket( const unsigned char*, const struct iphdr*, QObject* parent = 0 );
423 virtual ~OIPPacket(); 423 virtual ~OIPPacket();
424 424
425 QHostAddress fromIPAddress() const; 425 QHostAddress fromIPAddress() const;
426 QHostAddress toIPAddress() const; 426 QHostAddress toIPAddress() const;
427 427
428 int tos() const; 428 int tos() const;
429 int len() const; 429 int len() const;
430 int id() const; 430 int id() const;
431 int offset() const; 431 int offset() const;
432 int ttl() const; 432 int ttl() const;
433 int protocol() const; 433 int protocol() const;
434 int checksum() const; 434 int checksum() const;
435 435
436 private: 436 private:
437 const struct iphdr* _iphdr; 437 const struct iphdr* _iphdr;
438}; 438};
439 439
440/*====================================================================================== 440/*======================================================================================
441 * OARPPacket
442 *======================================================================================*/
443
444class OARPPacket : public QObject
445{
446 Q_OBJECT
447
448 public:
449 OARPPacket( const unsigned char*, const struct myarphdr*, QObject* parent = 0 );
450 virtual ~OARPPacket();
451
452 QHostAddress senderIPV4Address() const;
453 OMacAddress senderMacAddress() const;
454 QHostAddress targetIPV4Address() const;
455 OMacAddress targetMacAddress() const;
456
457 //int type() const;
458 QString type() const;
459
460 private:
461 const struct myarphdr* _arphdr;
462};
463
464/*======================================================================================
441 * OUDPPacket 465 * OUDPPacket
442 *======================================================================================*/ 466 *======================================================================================*/
443 467
444class OUDPPacket : public QObject 468class OUDPPacket : public QObject
445{ 469{
446 Q_OBJECT 470 Q_OBJECT
447 471
448 public: 472 public:
449 OUDPPacket( const unsigned char*, const struct udphdr*, QObject* parent = 0 ); 473 OUDPPacket( const unsigned char*, const struct udphdr*, QObject* parent = 0 );
450 virtual ~OUDPPacket(); 474 virtual ~OUDPPacket();
451 475
452 int fromPort() const; 476 int fromPort() const;
453 int toPort() const; 477 int toPort() const;
454 478
455 private: 479 private:
456 const struct udphdr* _udphdr; 480 const struct udphdr* _udphdr;
457}; 481};
458 482
459/*====================================================================================== 483/*======================================================================================
460 * OTCPPacket 484 * OTCPPacket
461 *======================================================================================*/ 485 *======================================================================================*/
462 486
463class OTCPPacket : public QObject 487class OTCPPacket : public QObject
464{ 488{