SNMP/Transport/IPv6/UDP.pm untested

filter: Statementstmt 0.0% 0 / 14 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 5 totaltotal 0.0% 0 / 29 CC 2 SCAR 10.6
CC
2
Cov
0%
_tdomain
6.0
MSG_SIZE_DEFAULT_UDP6
2.0
domain
2.0
CRAP 2.9
1 # -*- mode: perl -*-
2 # ============================================================================
3  
4 package Net::SNMP::Transport::IPv6::UDP;
5  
6 # $Id: UDP.pm,v 3.0 2009/09/09 15:05:33 dtown Rel $
7  
8 # Object that handles the UDP/IPv6 Transport Domain for the SNMP Engine.
9  
10 # Copyright (c) 2004-2009 David M. Town <dtown@cpan.org>
11 # All rights reserved.
12  
13 # This program is free software; you may redistribute it and/or modify it
14 # under the same terms as the Perl 5 programming language system itself.
15  
16 # ============================================================================
17  
18 use strict;
19  
20 use Net::SNMP::Transport::IPv4::UDP qw( DOMAIN_UDPIPV6 DOMAIN_UDPIPV6Z );
21  
22 ## Version of the Net::SNMP::Transport::UDP6 module
23  
24 our $VERSION = v3.0.0;
25  
26 ## Handle importing/exporting of symbols
27  
28 use base qw( Net::SNMP::Transport::IPv6 Net::SNMP::Transport::IPv4::UDP );
29  
30 ## RFC 3411 - snmpEngineMaxMessageSize::=INTEGER (484..2147483647)
31  
32 sub MSG_SIZE_DEFAULT_UDP6 { 1452 } # Ethernet(1500) - IPv6(40) - UDP(8)
33  
34 # [public methods] -----------------------------------------------------------
35  
36 sub domain
37 {
38 return DOMAIN_UDPIPV6; # transportDomainUdpIpv6
39 }
40  
41 sub type
42 {
43 return 'UDP/IPv6'; # udpIpv6(2)
44 }
45  
46 # [private methods] ----------------------------------------------------------
47  
48 sub _msg_size_default
49 {
50 return MSG_SIZE_DEFAULT_UDP6;
51 }
52  
53 sub _tdomain
54 {
55 return $_[0]->_scope_id($_[1]) ? DOMAIN_UDPIPV6Z : DOMAIN_UDPIPV6;
56 }
57  
58 # ============================================================================
59 1; # [end Net::SNMP::Transport::IPv6::UDP]
60