#ifndef __noah_h_
#define __noah_h_

#include "config.h"
#include "agent.h"
#include "ip.h"
#include "delay.h"
#include "trace.h"
#include "arp.h"
#include "ll.h"
#include "mac.h"

#define ROUTER_PORT      0xff

class NOAH_Agent : public Agent {
public:
        NOAH_Agent();
        virtual int command(int argc, const char * const * argv);
        void lost_link(Packet *p);
  
protected:
        Packet* rtable(int);
        virtual void recv(Packet *, Handler *);
        void trace(char* fmt, ...);
        void forwardPacket (Packet * p);
        void sendOutBCastPkt(Packet *p);
  
        Trace *tracetarget;       // Trace Target
        int myaddr_;              // My address...
        char *subnet_;            // My subnet
        MobileNode *node_;        // My node
        NsObject *port_dmux_;     // my port dmux

        // Randomness/MAC/logging parameters
        int be_random_;
        int use_mac_;
};

#endif
