📄 prototest.h
字号:
#ifndef PROTOTEST_H_#define PROTOTEST_H_#include "Prototest_pkt.h"#include "Prototest_rtable.h"#include <agent.h>#include <packet.h>#include <trace.h>#include <timer-handler.h>#include <random.h>#include <classifier-port.h>#include <mobilenode.h>#include "arp.h"#include "ll.h"#include "mac.h"#include "ip.h"#include "delay.h"#define CURRENT_TIME Scheduler::instance().clock()#define JITTER (Random::uniform()*0.5)class Prototest;class Prototest_PktTimer : public TimerHandler { public: Prototest_PktTimer(Prototest* agent) : TimerHandler() { agent_ = agent; } protected: Prototest* agent_; virtual void expire(Event* e);};class Prototest : public Agent { /* Friends */ friend class Prototest_PktTimer; /* Private members */ nsaddr_t ra_addr_; prototest_rtable rtable_; int accesible_var_; u_int8_t seq_num_; protected: MobileNode* node_; PortClassifier* dmux_; // For passing packets up to agents. Trace* logtarget_; // For logging. Prototest_PktTimer pkt_timer_; // Timer for sending packets. inline nsaddr_t& ra_addr() { return ra_addr_; } //inline protoname_state& state() { return state_; } inline int& accessible_var() { return accesible_var_; } void forward_data(Packet*); void recv_prototest_pkt(Packet*); void send_prototest_pkt(); void reset_prototest_pkt_timer(); public: Prototest(nsaddr_t); int command(int, const char*const*); void recv(Packet*, Handler*); //void mac_failed(Packet*);};#endif /*PROTOTEST_H_*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -