Branch Coverage

blib/lib/Net/PcapWriter/TCP.pm
Criterion Covered Total %
branch 44 78 56.4


line true false branch
35 4 12 if ($flags->{'syn'} and ($flow->[4] & 1) == 0)
41 0 16 if ($flags->{'rst'})
44 0 0 $dir ? :
46 4 12 if ($flags->{'fin'})
47 4 0 if (($flow->[4] & 4) == 0)
52 8 8 if ($flags->{'ack'})
53 4 4 $dir ? :
54 8 0 if $oflow->[4] & 1
55 4 4 if $oflow->[4] & 4
58 0 16 unless defined $data
60 6 10 $dir ? :
61 14 2 if defined $ack
64 0 16 if $flags->{'rst'}
65 0 16 if $flags->{'psh'}
66 14 2 if $flags->{'ack'}
67 0 16 if $flags->{'urg'}
68 4 12 if $flags->{'fin'}
69 4 12 if ($flags->{'syn'})
99 2 2 unless $self->{'connected'}
106 0 2 if ($flow->[1][4] & 3) == 3 and ($flow->[0][4] & 3) == 3
110 2 0 if ($flow->[0][4] & 1) == 0
114 2 0 ($flow->[1][4] & 1) == 0 ? :
2 0 ($flow->[1][4] & 2) == 0 ? :
2 0 if ($flow->[1][4] & 3) != 3
120 2 0 if ($flow->[0][4] & 2) == 0
129 0 0 if not $self->{'connected'}
134 0 0 if (($self->{'flow'}[$dir][4] & 4) == 0)
135 0 0 unless $self->{'connected'}
137 0 0 $dir ? :
145 0 2 if (not defined $type or $type eq '') { }
2 0 elsif ($type eq 'fin') { }
0 0 elsif ($type eq 'rst') { }
152 2 0 if ($flow->[$dir][4] & 4) == 0
156 0 2 $dir ? :
157 2 0 ($flow->[$odir][4] & 4) == 0 ? :
2 0 ($flow->[$odir][4] & 8) == 0 ? :
2 0 if ($flow->[$odir][4] & 12) != 12
163 2 0 if ($flow->[$dir][4] & 8) == 0
182 0 2 unless $self->{'writer'}