simplified protocal

This commit is contained in:
wangyu
2017-08-02 18:57:27 +08:00
committed by wangyu
parent 0349c83254
commit cf47d0a7a8
3 changed files with 442 additions and 918 deletions

View File

@@ -133,6 +133,7 @@ packet_info_t::packet_info_t()
protocol = IPPROTO_TCP;
ack_seq = get_true_random_number();
seq = get_true_random_number();
has_ts=0;
}
else if (raw_mode == mode_udp)
{
@@ -141,6 +142,7 @@ packet_info_t::packet_info_t()
else if (raw_mode == mode_icmp)
{
protocol = IPPROTO_ICMP;
icmp_seq=0;
}
}
@@ -837,6 +839,7 @@ int recv_raw_icmp(raw_info_t &raw_info, char *&payload, int &payloadlen)
if(ntohs(icmph->id)!=send_info.src_port)
{
mylog(log_debug,"icmp id mis-match,ignored\n");
return -1;
}