Skip to content

Commit

Permalink
Merge pull request #6 from ecsv/udp_fix
Browse files Browse the repository at this point in the history
reclassify flow status after FLOW_TIMEOUT
  • Loading branch information
caesar0301 committed May 12, 2014
2 parents 60e0bc0 + fb4dea0 commit 21f3bdf
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pkt2flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,21 @@ static void process_trace(void)
fname = new_file_name(af_6tuple, hdr.ts.tv_sec);
pair->pdf.file_name = fname;
pair->pdf.start_time = hdr.ts.tv_sec;

switch (af_6tuple.protocol) {
case IPPROTO_TCP:
if (syn_detected)
pair->pdf.status = STS_TCP_SYN;
else
pair->pdf.status = STS_TCP_NOSYN;
break;
case IPPROTO_UDP:
pair->pdf.status = STS_UDP;
break;
default:
pair->pdf.status = STS_UNSET;
break;
}
}
}

Expand Down

0 comments on commit 21f3bdf

Please sign in to comment.