摘要:
if (!(a_tcp = find_stream(this_tcphdr, this_iphdr, &from_client))) {//没有找到 if ((this_tcphdr->th_flags & TH_SYN) && //报文头SYN为1!(this_tcphdr->th_flags & TH_ACK) &&//报文头ACK为0!(this_tcphdr->th_flags & TH_RST))//报文头RST为0 add_new_tcp(this_tcphdr, this_iphdr);//加入新包 阅读全文
摘要:
[1] IP四元组hashu_intmkhash (u_int src, u_short sport, u_int dest, u_short dport){ u_int res = 0; int i; u_char data[12]; u_int *stupid_strict_aliasing_warnings=(u_int*)data; *stupid_strict_aliasing_warnings = src; *(u_int *) (data + 4) = dest; *(u_short *) (data + 8) = sport; *(u_short *) (data + 10) 阅读全文