📄 rtable_entry.h
字号:
/* * User Space DSDV Implementation * * Binita Gupta * University of Illinois at Urbana Champaign * * Email: binita@uiuc.edu * * * This software is Open Source under the GNU General Public License * * ******************************************* * * General Description: * ---------------------- * This file defines a class for the routing table entry * * * * * Internal Procedures: * * * * * External Procedures: * * ********************************************* * */#ifndef _RTABLE_ENTRY_H_#define _RTABLE_ENTRY_H_class rtable_entry { u_int32_t dest_ip; /* ip address of the destination node */ u_int32_t next_hop; /* ip address of the next hop */ u_int32_t dest_seq_num; /* destination sequence number for dst_ip */ u_int32_t rt_metric; /* number of hops to the destination */ u_int64_t lifetime; u_int32_t routing_flags;public: void createEntry(u_int32_t dst, u_int32_t nhop, u_int32_t seq,\ u_int32_t metric, u_int64_t lTime, u_int32_t rflag); u_int32_t getDestIP(){ return dest_ip; } u_int32_t getNextHop(){ return next_hop; } u_int32_t getDestSeqNum(){ return dest_seq_num; } u_int32_t getRTMetric(){ return rt_metric; } u_int64_t getLifeTime() { return lifetime;} u_int32_t getRFlags() { return routing_flags; } void setDestSeqNum(u_int32_t seq) { dest_seq_num = seq; } void setNextHop(u_int32_t nhop) { next_hop = nhop; } void setRTMetric(u_int32_t metric) { rt_metric = metric; } void setLifeTime(u_int64_t lTime) { lifetime = lTime;} void setRFlags(u_int32_t flag) { routing_flags = flag; } void updateEntry(rtable_entry rtEntry);};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -