src/node/ipv4.h
changeset 293 007bc9e735f3
parent 242 a44932709b47
child 345 47b41507a45a
--- a/src/node/ipv4.h	Fri Feb 16 10:04:02 2007 +0100
+++ b/src/node/ipv4.h	Sat Feb 17 09:28:02 2007 +0100
@@ -25,6 +25,7 @@
 #include <list>
 #include <stdint.h>
 #include "ipv4-address.h"
+#include "l3-protocol.h"
 
 namespace ns3 {
 
@@ -40,8 +41,11 @@
 /**
  * ::Send is always defined in subclasses.
  */
-class Ipv4 {
+class Ipv4 : public L3Protocol 
+{
 public:
+  static const uint16_t PROT_NUMBER;
+
   Ipv4(Node *node);
   virtual ~Ipv4 ();
 
@@ -88,7 +92,7 @@
   Ipv4Interface *FindInterfaceForDevice (NetDevice const*device);
   
 
-  Ipv4* Copy(Node *node) const;
+  virtual Ipv4* Copy(Node *node) const;
   /**
    * Lower layer calls this method after calling L3Demux::Lookup
    * The ARP subclass needs to know from which NetDevice this
@@ -96,7 +100,7 @@
    *    - implement a per-NetDevice ARP cache
    *    - send back arp replies on the right device
    */
-  void Receive(Packet& p, NetDevice &device);
+  virtual void Receive(Packet& p, NetDevice &device);
 
   void Send (Packet const &packet, Ipv4Address source, 
 	     Ipv4Address destination, uint8_t protocol);