?? protoname_pkt.h
字號:
#ifndef __protoname_pkt_h__
#define __protoname_pkt_h__
#include <packet.h>
#define HDR_PROTONAME_PKT(p) hdr_protoname_pkt::access(p)
struct hdr_protoname_pkt {
nsaddr_t pkt_src_; // Node which originated this packet
nsaddr_t pkt_dst_;
u_int16_t pkt_len_; // Packet length (in bytes)
u_int8_t pkt_seq_num_; // Packet sequence number u_int16_t pkt_app_; //the variable to differ serv u_int16_t pkt_temp_; inline u_int16_t& pkt_temp() { return pkt_temp_; } //u_int16_t pkt_pairkeys_[10]; //inline u_int16_t& pkt_pairkeys(int i) { return pkt_pairkeys_[i]; } u_int8_t pkt_ran_;inline u_int8_t& pkt_ran() { return pkt_ran_; }
inline nsaddr_t& pkt_src() { return pkt_src_; }
inline nsaddr_t& pkt_dst() { return pkt_dst_; }
inline u_int16_t& pkt_len() { return pkt_len_; }
inline u_int8_t& pkt_seq_num() { return pkt_seq_num_; }
inline u_int16_t& pkt_app() { return pkt_app_; }
static int offset_;
inline static int& offset() { return offset_; }
inline static hdr_protoname_pkt* access(const Packet* p) {
return (hdr_protoname_pkt*)p->access(offset_);
}
};
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -