lib/Net/SinFP3/Ext/IP/IPv6.pm

filter: Statementstmt 41.5% 22 / 53 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 40.0% 6 / 15 Podpod 0.0% 0 / 7 totaltotal 37.3% 28 / 75 CC 1 SCAR 4.7
CC
1
Cov
42%
getResponseIpTtl
2.0
getResponseIpId
2.0
getResponseIpDfBit
2.0
CRAP 1.6
« lib/Net/SinFP3/Log.pm ↑ Summary lib/Net/SinFP3/Ext/S.pm »
1 #
2 # $Id: IPv6.pm,v 008243d3e89a 2018/07/21 14:54:07 gomor $
3 #
4 package Net::SinFP3::Ext::IP::IPv6;
5 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use base qw(Net::SinFP3::Ext::IP);
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 our @AS = qw(
10 global
11 next
12 _tcp
13 );
14 1 __PACKAGE__->cgBuildIndices;
15 1 __PACKAGE__->cgBuildAccessorsScalar(\@AS);
16  
17 1 ▶use Net::Frame::Layer::ETH qw(:consts);
Subroutine BEGIN: called CC=1 SCAR=0.0
18 1 ▶use Net::Frame::Layer::IPv6 qw(:consts);
Subroutine BEGIN: called CC=1 SCAR=0.0
19 1 ▶use Net::Frame::Layer::TCP qw(:consts);
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 0 ▶sub getResponseIpTtl {
Subroutine getResponseIpTtl: not called CC=1 SCAR=6.9
Pod undocumented
22 0 my $self = shift;
23 0 my ($response) = @_;
24 0 return $response->reply->ref->{IPv6}->hopLimit;
25 }
26  
27 0 ▶sub getResponseIpId {
Subroutine getResponseIpId: not called CC=1 SCAR=6.9
Pod undocumented
28 0 my $self = shift;
29 0 my ($response) = @_;
30 0 return $response->reply->ref->{IPv6}->flowLabel;
31 }
32  
33 0 ▶sub getResponseIpDfBit {
Subroutine getResponseIpDfBit: not called CC=1 SCAR=6.9
Pod undocumented
34 0 my $self = shift;
35 0 my ($response) = @_;
36 0 return $response->reply->ref->{IPv6}->trafficClass;
37 }
38  
39 0 ▶sub getProbeIpId {
Subroutine getProbeIpId: not called CC=1 SCAR=6.9
Pod undocumented
40 0 my $self = shift;
41 0 my ($response) = @_;
42 0 return $response->ref->{IPv6}->flowLabel;
43 }
44  
45 0 ▶sub _getEthHeader {
Subroutine _getEthHeader: not called CC=1 SCAR=6.9
46 0 my $self = shift;
47 0 return Net::Frame::Layer::ETH->new(
48 type => NF_ETH_TYPE_IPv6,
49 src => $self->global->mac,
50 dst => $self->next->mac,
51 );
52 }
53  
54 0 ▶sub _getIpv6Header {
Subroutine _getIpv6Header: not called CC=1 SCAR=6.9
55 0 my $self = shift;
56 0 return Net::Frame::Layer::IPv6->new(
57 version => 6,
58 trafficClass => 0,
59 flowLabel => 0,
60 nextHeader => NF_IPv6_PROTOCOL_TCP,
61 hopLimit => 0xff,
62 src => $self->global->ip6,
63 dst => $self->next->ip,
64 );
65 }
66  
67 0 ▶sub getP1 {
Subroutine getP1: not called CC=1 SCAR=6.9
Pod undocumented
68 0 my $self = shift;
69  
70 0 my $eth = $self->_getEthHeader;
71 0 my $ip6 = $self->_getIpv6Header;
72 0 my $tcp = $self->_tcp->_getP1Tcp;
73  
74 0 return Net::Frame::Simple->new(layers => [ $eth, $ip6, $tcp, ]);
75 }
76  
77 0 ▶sub getP2 {
Subroutine getP2: not called CC=1 SCAR=6.9
Pod undocumented
78 0 my $self = shift;
79  
80 0 my $eth = $self->_getEthHeader;
81 0 my $ip6 = $self->_getIpv6Header;
82 0 my $tcp = $self->_tcp->_getP2Tcp;
83  
84 0 return Net::Frame::Simple->new(layers => [ $eth, $ip6, $tcp, ]);
85 }
86  
87 0 ▶sub getP3 {
Subroutine getP3: not called CC=1 SCAR=6.9
Pod undocumented
88 0 my $self = shift;
89  
90 0 my $eth = $self->_getEthHeader;
91 0 my $ip6 = $self->_getIpv6Header;
92 0 my $tcp = $self->_tcp->_getP3Tcp;
93  
94 0 return Net::Frame::Simple->new(layers => [ $eth, $ip6, $tcp, ]);
95 }
96  
97 1 1;
98  
99 __END__
« lib/Net/SinFP3/Log.pm ↑ Summary lib/Net/SinFP3/Ext/S.pm »