rtproto.h

Go to the documentation of this file.
00001 #ifndef __rtproto_h__
00002 #define __rtproto_h__
00003 
00004 #include <agent.h>
00005 #include <packet.h>
00006 #include <sys/types.h>
00007 
00008 class rtAgent : public Agent {
00009 public:
00010         rtAgent(nsaddr_t index, packet_t pt) : Agent(pt), ipaddr_(index) { }
00011 
00012     // ============================================================
00013     // Routing API (used by IMEP layer)
00014 
00015     virtual void rtNotifyLinkUP(nsaddr_t index) = 0;
00016     virtual void rtNotifyLinkDN(nsaddr_t index) = 0;
00017     virtual void rtNotifyLinkStatus(nsaddr_t index, u_int32_t status) = 0;
00018 
00019     virtual void rtRoutePacket(Packet *p) = 0;
00020 
00021     // ============================================================
00022 
00023 protected:
00024     virtual inline int initialized() = 0;
00025 
00026     nsaddr_t& ipaddr() { return ipaddr_; }
00027 
00028 private:
00029     nsaddr_t    ipaddr_;    // IP address of this node
00030 };
00031 
00032 #endif /* __rtproto_h__ */
00033 

Generated on Tue Mar 6 16:47:50 2007 for ns2 Network Simulator 2.29 by  doxygen 1.4.6