Branch Coverage

blib/lib/Net/PcapWriter/TCP.pm
Criterion Covered Total %
branch 42 72 58.3


line true false branch
35 4 12 if ($flags->{'syn'} and ($flow->[4] & 1) == 0)
39 4 12 if ($flags->{'fin'})
40 4 0 if (($flow->[4] & 4) == 0)
45 0 16 if ($flags->{'rst'})
48 0 0 $dir ? :
50 8 8 if ($flags->{'ack'})
51 4 4 if ($flow->[4] & 3) == 1
52 4 4 if ($flow->[4] & 12) == 4
55 0 16 unless defined $data
58 6 10 $dir ? :
59 14 2 if defined $ack
62 0 16 if $flags->{'rst'}
63 0 16 if $flags->{'psh'}
64 14 2 if $flags->{'ack'}
65 0 16 if $flags->{'urg'}
66 4 12 if $flags->{'fin'}
67 4 12 if ($flags->{'syn'})
97 2 2 unless $self->{'connected'}
104 0 2 if ($flow->[1][4] & 3) == 3 and ($flow->[0][4] & 3) == 3
108 2 0 if ($flow->[0][4] & 1) == 0
112 2 0 ($flow->[1][4] & 1) == 0 ? :
2 0 ($flow->[1][4] & 2) == 0 ? :
2 0 if ($flow->[1][4] & 3) == 0
118 2 0 if ($flow->[0][4] & 2) == 0
127 0 0 if (($self->{'flow'}[$dir][4] & 4) == 0)
128 0 0 unless $self->{'connected'}
130 0 0 $dir ? :
138 0 2 if (not defined $type or $type eq '') { }
2 0 elsif ($type eq 'fin') { }
0 0 elsif ($type eq 'rst') { }
145 2 0 if ($flow->[$dir][4] & 4) == 0
149 0 2 $dir ? :
150 2 0 ($flow->[$odir][4] & 4) == 0 ? :
2 0 ($flow->[$odir][4] & 8) == 0 ? :
2 0 if ($flow->[$odir][4] & 12) == 0
156 2 0 if ($flow->[$dir][4] & 8) == 0