libnids TCP报文首报文识别

  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);//加入新包
    return;
  }

posted @ 2011-08-26 14:38  戴安澜式编程  阅读(428)  评论(0编辑  收藏  举报