@@ -3,6 +3,11 @@ Revision history for Perl extension Net::Packet.
*** This will probably be the last release. From now on, please use
Net::Frame::* modules on CPAN. This framework is obsolete.
+3.28 Sun Feb 15 17:45:54 CET 2015
+ - FEATURE: use $Env->noObsoleteWarning(1) to disable the obsolete warning
+ - bugfix: check payload length before using it in PPPoE
+ - update: copyright notice
+
3.27 Mon Nov 9 19:19:57 CET 2009
- bugfix: PPPoE packing payload
=> http://rt.cpan.org/Public/Bug/Display.html?id=51112
@@ -98,4 +98,5 @@ t/26-d4-lo-ipv6-tcp-opt-l7.t
t/27-d4-eth-ipv6-udp-l7.t
t/28-d4-eth-icmp.t
test-env.sh
-META.yml Module meta-data (added by MakeMaker)
+META.yml
+META.json
@@ -0,0 +1,171 @@
+{
+ "abstract" : "a framework to easily send and receive frames from layer 2 to layer 7",
+ "author" : [
+ "GomoR <gomor_at_cpan.org>"
+ ],
+ "dynamic_config" : 1,
+ "generated_by" : "Module::Build version 0.421",
+ "license" : [
+ "artistic_1"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : "2"
+ },
+ "name" : "Net-Packet",
+ "prereqs" : {
+ "configure" : {
+ "requires" : {
+ "Module::Build" : "0"
+ }
+ },
+ "runtime" : {
+ "requires" : {
+ "Bit::Vector" : "0",
+ "Class::Gomor" : "1.00",
+ "Net::IPv4Addr" : "0",
+ "Net::IPv6Addr" : "0",
+ "Net::Libdnet" : "0",
+ "Net::Pcap" : "0.12",
+ "Net::Write" : "1.00",
+ "Socket6" : "0",
+ "Storable" : "0",
+ "Time::HiRes" : "0",
+ "perl" : "v5.6.1"
+ }
+ }
+ },
+ "provides" : {
+ "Net::Packet" : {
+ "file" : "lib/Net/Packet.pm",
+ "version" : "3.28"
+ },
+ "Net::Packet::ARP" : {
+ "file" : "lib/Net/Packet/ARP.pm"
+ },
+ "Net::Packet::CDP" : {
+ "file" : "lib/Net/Packet/CDP.pm"
+ },
+ "Net::Packet::CDP::Address" : {
+ "file" : "lib/Net/Packet/CDP/Address.pm"
+ },
+ "Net::Packet::CDP::Type" : {
+ "file" : "lib/Net/Packet/CDP/Type.pm"
+ },
+ "Net::Packet::CDP::TypeAddresses" : {
+ "file" : "lib/Net/Packet/CDP/TypeAddresses.pm"
+ },
+ "Net::Packet::CDP::TypeCapabilities" : {
+ "file" : "lib/Net/Packet/CDP/TypeCapabilities.pm"
+ },
+ "Net::Packet::CDP::TypeDeviceId" : {
+ "file" : "lib/Net/Packet/CDP/TypeDeviceId.pm"
+ },
+ "Net::Packet::CDP::TypePortId" : {
+ "file" : "lib/Net/Packet/CDP/TypePortId.pm"
+ },
+ "Net::Packet::CDP::TypeSoftwareVersion" : {
+ "file" : "lib/Net/Packet/CDP/TypeSoftwareVersion.pm"
+ },
+ "Net::Packet::Consts" : {
+ "file" : "lib/Net/Packet/Consts.pm"
+ },
+ "Net::Packet::Desc" : {
+ "file" : "lib/Net/Packet/Desc.pm"
+ },
+ "Net::Packet::DescL2" : {
+ "file" : "lib/Net/Packet/DescL2.pm"
+ },
+ "Net::Packet::DescL3" : {
+ "file" : "lib/Net/Packet/DescL3.pm"
+ },
+ "Net::Packet::DescL4" : {
+ "file" : "lib/Net/Packet/DescL4.pm"
+ },
+ "Net::Packet::Dump" : {
+ "file" : "lib/Net/Packet/Dump.pm"
+ },
+ "Net::Packet::ETH" : {
+ "file" : "lib/Net/Packet/ETH.pm"
+ },
+ "Net::Packet::Env" : {
+ "file" : "lib/Net/Packet/Env.pm"
+ },
+ "Net::Packet::Frame" : {
+ "file" : "lib/Net/Packet/Frame.pm"
+ },
+ "Net::Packet::ICMPv4" : {
+ "file" : "lib/Net/Packet/ICMPv4.pm"
+ },
+ "Net::Packet::IGMPv4" : {
+ "file" : "lib/Net/Packet/IGMPv4.pm"
+ },
+ "Net::Packet::IPv4" : {
+ "file" : "lib/Net/Packet/IPv4.pm"
+ },
+ "Net::Packet::IPv6" : {
+ "file" : "lib/Net/Packet/IPv6.pm"
+ },
+ "Net::Packet::LLC" : {
+ "file" : "lib/Net/Packet/LLC.pm"
+ },
+ "Net::Packet::Layer" : {
+ "file" : "lib/Net/Packet/Layer.pm"
+ },
+ "Net::Packet::Layer2" : {
+ "file" : "lib/Net/Packet/Layer2.pm"
+ },
+ "Net::Packet::Layer3" : {
+ "file" : "lib/Net/Packet/Layer3.pm"
+ },
+ "Net::Packet::Layer4" : {
+ "file" : "lib/Net/Packet/Layer4.pm"
+ },
+ "Net::Packet::Layer7" : {
+ "file" : "lib/Net/Packet/Layer7.pm"
+ },
+ "Net::Packet::NULL" : {
+ "file" : "lib/Net/Packet/NULL.pm"
+ },
+ "Net::Packet::OSPF" : {
+ "file" : "lib/Net/Packet/OSPF.pm"
+ },
+ "Net::Packet::PPP" : {
+ "file" : "lib/Net/Packet/PPP.pm"
+ },
+ "Net::Packet::PPPLCP" : {
+ "file" : "lib/Net/Packet/PPPLCP.pm"
+ },
+ "Net::Packet::PPPoE" : {
+ "file" : "lib/Net/Packet/PPPoE.pm"
+ },
+ "Net::Packet::RAW" : {
+ "file" : "lib/Net/Packet/RAW.pm"
+ },
+ "Net::Packet::SLL" : {
+ "file" : "lib/Net/Packet/SLL.pm"
+ },
+ "Net::Packet::STP" : {
+ "file" : "lib/Net/Packet/STP.pm"
+ },
+ "Net::Packet::TCP" : {
+ "file" : "lib/Net/Packet/TCP.pm"
+ },
+ "Net::Packet::UDP" : {
+ "file" : "lib/Net/Packet/UDP.pm"
+ },
+ "Net::Packet::Utils" : {
+ "file" : "lib/Net/Packet/Utils.pm"
+ },
+ "Net::Packet::VLAN" : {
+ "file" : "lib/Net/Packet/VLAN.pm"
+ }
+ },
+ "release_status" : "stable",
+ "resources" : {
+ "license" : [
+ "http://opensource.org/licenses/artistic-license.php"
+ ]
+ },
+ "version" : "3.28"
+}
@@ -1,30 +1,113 @@
---- #YAML:1.0
-name: Net-Packet
-version: 3.27
-abstract: a framework to easily send and receive frames from layer 2 to layer 7
+---
+abstract: 'a framework to easily send and receive frames from layer 2 to layer 7'
author:
- - GomoR <gomor-cpan_at_gomor.org>
-license: artistic
-distribution_type: module
+ - 'GomoR <gomor_at_cpan.org>'
+build_requires: {}
configure_requires:
- ExtUtils::MakeMaker: 0
-build_requires:
- ExtUtils::MakeMaker: 0
-requires:
- Bit::Vector: 0
- Class::Gomor: 1.00
- Net::IPv4Addr: 0
- Net::IPv6Addr: 0
- Net::Libdnet: 0
- Net::Pcap: 0.12
- Net::Write: 1.00
- Socket6: 0
- Time::HiRes: 0
-no_index:
- directory:
- - t
- - inc
-generated_by: ExtUtils::MakeMaker version 6.50
+ Module::Build: '0'
+dynamic_config: 1
+generated_by: 'Module::Build version 0.421, CPAN::Meta::Converter version 2.143240'
+license: artistic
meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: '1.4'
+name: Net-Packet
+provides:
+ Net::Packet:
+ file: lib/Net/Packet.pm
+ version: '3.28'
+ Net::Packet::ARP:
+ file: lib/Net/Packet/ARP.pm
+ Net::Packet::CDP:
+ file: lib/Net/Packet/CDP.pm
+ Net::Packet::CDP::Address:
+ file: lib/Net/Packet/CDP/Address.pm
+ Net::Packet::CDP::Type:
+ file: lib/Net/Packet/CDP/Type.pm
+ Net::Packet::CDP::TypeAddresses:
+ file: lib/Net/Packet/CDP/TypeAddresses.pm
+ Net::Packet::CDP::TypeCapabilities:
+ file: lib/Net/Packet/CDP/TypeCapabilities.pm
+ Net::Packet::CDP::TypeDeviceId:
+ file: lib/Net/Packet/CDP/TypeDeviceId.pm
+ Net::Packet::CDP::TypePortId:
+ file: lib/Net/Packet/CDP/TypePortId.pm
+ Net::Packet::CDP::TypeSoftwareVersion:
+ file: lib/Net/Packet/CDP/TypeSoftwareVersion.pm
+ Net::Packet::Consts:
+ file: lib/Net/Packet/Consts.pm
+ Net::Packet::Desc:
+ file: lib/Net/Packet/Desc.pm
+ Net::Packet::DescL2:
+ file: lib/Net/Packet/DescL2.pm
+ Net::Packet::DescL3:
+ file: lib/Net/Packet/DescL3.pm
+ Net::Packet::DescL4:
+ file: lib/Net/Packet/DescL4.pm
+ Net::Packet::Dump:
+ file: lib/Net/Packet/Dump.pm
+ Net::Packet::ETH:
+ file: lib/Net/Packet/ETH.pm
+ Net::Packet::Env:
+ file: lib/Net/Packet/Env.pm
+ Net::Packet::Frame:
+ file: lib/Net/Packet/Frame.pm
+ Net::Packet::ICMPv4:
+ file: lib/Net/Packet/ICMPv4.pm
+ Net::Packet::IGMPv4:
+ file: lib/Net/Packet/IGMPv4.pm
+ Net::Packet::IPv4:
+ file: lib/Net/Packet/IPv4.pm
+ Net::Packet::IPv6:
+ file: lib/Net/Packet/IPv6.pm
+ Net::Packet::LLC:
+ file: lib/Net/Packet/LLC.pm
+ Net::Packet::Layer:
+ file: lib/Net/Packet/Layer.pm
+ Net::Packet::Layer2:
+ file: lib/Net/Packet/Layer2.pm
+ Net::Packet::Layer3:
+ file: lib/Net/Packet/Layer3.pm
+ Net::Packet::Layer4:
+ file: lib/Net/Packet/Layer4.pm
+ Net::Packet::Layer7:
+ file: lib/Net/Packet/Layer7.pm
+ Net::Packet::NULL:
+ file: lib/Net/Packet/NULL.pm
+ Net::Packet::OSPF:
+ file: lib/Net/Packet/OSPF.pm
+ Net::Packet::PPP:
+ file: lib/Net/Packet/PPP.pm
+ Net::Packet::PPPLCP:
+ file: lib/Net/Packet/PPPLCP.pm
+ Net::Packet::PPPoE:
+ file: lib/Net/Packet/PPPoE.pm
+ Net::Packet::RAW:
+ file: lib/Net/Packet/RAW.pm
+ Net::Packet::SLL:
+ file: lib/Net/Packet/SLL.pm
+ Net::Packet::STP:
+ file: lib/Net/Packet/STP.pm
+ Net::Packet::TCP:
+ file: lib/Net/Packet/TCP.pm
+ Net::Packet::UDP:
+ file: lib/Net/Packet/UDP.pm
+ Net::Packet::Utils:
+ file: lib/Net/Packet/Utils.pm
+ Net::Packet::VLAN:
+ file: lib/Net/Packet/VLAN.pm
+requires:
+ Bit::Vector: '0'
+ Class::Gomor: '1.00'
+ Net::IPv4Addr: '0'
+ Net::IPv6Addr: '0'
+ Net::Libdnet: '0'
+ Net::Pcap: '0.12'
+ Net::Write: '1.00'
+ Socket6: '0'
+ Storable: '0'
+ Time::HiRes: '0'
+ perl: v5.6.1
+resources:
+ license: http://opensource.org/licenses/artistic-license.php
+version: '3.28'
@@ -1,23 +1,26 @@
#
-# $Id: Makefile.PL 1640 2009-11-09 17:58:27Z gomor $
+# $Id: Makefile.PL 2002 2015-02-15 16:50:35Z gomor $
#
use ExtUtils::MakeMaker;
WriteMakefile(
- NAME => 'Net::Packet',
- VERSION_FROM => 'lib/Net/Packet.pm',
- LICENSE => 'artistic',
- PREREQ_PM => {
- Class::Gomor => '1.00',
- Net::Pcap => '0.12',
- Net::Write => '1.00',
- Net::Libdnet => 0,
- Time::HiRes => 0,
+ NAME => 'Net::Packet',
+ VERSION_FROM => 'lib/Net/Packet.pm',
+ LICENSE => 'artistic',
+ ABSTRACT_FROM => 'lib/Net/Packet.pm',
+ AUTHOR => 'GomoR <gomor_at_cpan.org>',
+ MIN_PERL_VERSION => '5.6.1',
+ PREREQ_PM => {
+ Class::Gomor => '1.00',
+ Net::Pcap => '0.12',
+ Net::Write => '1.00',
+ Net::Libdnet => 0,
+ Time::HiRes => 0,
Net::IPv6Addr => 0,
Net::IPv4Addr => 0,
- Socket6 => 0,
- Bit::Vector => 0,
+ Socket6 => 0,
+ Bit::Vector => 0,
+ Storable => 0,
},
- ABSTRACT_FROM => 'lib/Net/Packet.pm',
- AUTHOR => 'GomoR <gomor-cpan_at_gomor.org>',
);
+
@@ -33,17 +33,17 @@ DEPENDENCIES
This module requires these other modules and libraries:
- Perl v5.6.1
- Class::Gomor
- Net::Pcap
- Net::Write
- Net::Libdnet
- Time::HiRes
- Net::IPv4Addr
- Net::IPv6Addr
- Socket6
- Bit::Vector
- Storable
+ Perl v5.6.1
+ Class::Gomor
+ Net::Pcap
+ Net::Write
+ Net::Libdnet
+ Time::HiRes
+ Net::IPv4Addr
+ Net::IPv6Addr
+ Socket6
+ Bit::Vector
+ Storable
GETTING HELP
@@ -63,5 +63,5 @@ COPYRIGHT AND LICENSE
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
-Copyright (c) 2004-2009, Patrice <GomoR> Auffret
+Copyright (c) 2004-2015, Patrice <GomoR> Auffret
@@ -1,5 +1,5 @@
#
-# $Id: ARP.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: ARP.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::ARP;
use strict;
@@ -152,7 +152,7 @@ Net::Packet::ARP - Address Resolution Protocol layer 3 object
use Net::Packet::Consts qw(:arp);
require Net::Packet::ARP;
- # Build a layer
+ # Build a layer
my $layer = Net::Packet::ARP->new(
dstIp => "192.168.0.1",
);
@@ -291,7 +291,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: Address.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: Address.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::CDP::Address;
use strict;
@@ -189,7 +189,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: Type.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: Type.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::CDP::Type;
use strict;
@@ -57,7 +57,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: TypeAddresses.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: TypeAddresses.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::CDP::TypeAddresses;
use strict;
@@ -179,7 +179,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: TypeCapabilities.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: TypeCapabilities.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::CDP::TypeCapabilities;
use strict;
@@ -148,7 +148,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: TypeDeviceId.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: TypeDeviceId.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::CDP::TypeDeviceId;
use strict;
@@ -153,7 +153,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: TypePortId.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: TypePortId.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::CDP::TypePortId;
use strict;
@@ -156,7 +156,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: TypeSoftwareVersion.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: TypeSoftwareVersion.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::CDP::TypeSoftwareVersion;
use strict;
@@ -155,7 +155,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: CDP.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: CDP.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::CDP;
use strict;
@@ -292,7 +292,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: Consts.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: Consts.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::Consts;
use strict;
@@ -368,8 +368,8 @@ use constant NP_PPP_PROTOCOL_IPv4 => 0x0021;
use constant NP_PPP_PROTOCOL_PPPLCP => 0xc021;
use constant NP_PPPoE_HDR_LEN => 8;
-use constant NP_PPPoE_PPP_PROTOCOL_IPv4 => NP_PPP_PROTOCOL_IPv4;
-use constant NP_PPPoE_PPP_PROTOCOL_PPPLCP => NP_PPP_PROTOCOL_PPPLCP;
+use constant NP_PPPoE_PPP_PROTOCOL_IPv4 => NP_PPP_PROTOCOL_IPv4();
+use constant NP_PPPoE_PPP_PROTOCOL_PPPLCP => NP_PPP_PROTOCOL_PPPLCP();
use constant NP_LLC_HDR_LEN => 8;
use constant NP_LLC_OUI_CISCO => 0x00000c;
@@ -482,10 +482,10 @@ Net::Packet::Consts - all constants used in Net::Packet framework
# Load IPv4 layer constants
use Net::Packet::Consts qw(:ipv4);
- # Load Ethernet layer constants
+ # Load Ethernet layer constants
use Net::Packet::Consts qw(:eth);
- # Load Ethernet, IPv6 and TCP layers constants
+ # Load Ethernet, IPv6 and TCP layers constants
use Net::Packet::Consts qw(:eth :ipv6 :tcp);
=head1 DESCRIPTION
@@ -498,7 +498,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: Desc.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: Desc.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::Desc;
use strict;
@@ -182,7 +182,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: DescL2.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: DescL2.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::DescL2;
use strict;
@@ -75,7 +75,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: DescL3.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: DescL3.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::DescL3;
use strict;
@@ -158,7 +158,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: DescL4.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: DescL4.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::DescL4;
use strict;
@@ -148,7 +148,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: Dump.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: Dump.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::Dump;
use strict;
@@ -610,7 +610,7 @@ sub framesSorted {
my $l4Key = ($f->l4 && $f->l4->getKey($f)) || 'all';
push @{$self->[$__framesSorted]->{$l2Key}{$l3Key}{$l4Key}}, $f;
- # We store a second time for ICMP messages
+ # We store a second time for ICMP messages
if ($f->isIcmp) {
my $l3Key = ($f->l3 && $f->l3->is.':'.$f->l3->dst) || 'all';
push @{$self->[$__framesSorted]->{$l2Key}{$l3Key}{$l4Key}}, $f;
@@ -942,7 +942,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: ETH.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: ETH.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::ETH;
use strict;
@@ -137,7 +137,7 @@ Net::Packet::ETH - Ethernet/802.3 layer 2 object
use Net::Packet::Consts qw(:eth);
require Net::Packet::ETH;
- # Build a layer
+ # Build a layer
my $layer = Net::Packet::ETH->new(
type => NP_ETH_TYPE_IPv6,
dst => "00:11:22:33:44:55",
@@ -254,7 +254,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: Env.pm 1643 2009-11-09 18:21:00Z gomor $
+# $Id: Env.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::Env;
use strict;
@@ -33,6 +33,7 @@ our @AS = qw(
noFramePadding
noFrameComputeChecksums
noFrameComputeLengths
+ noObsoleteWarning
doFrameReturnList
doIPv4Checksum
doMemoryOptimizations
@@ -69,6 +70,7 @@ sub new {
noFramePadding => 0,
noFrameComputeChecksums => 0,
noFrameComputeLengths => 0,
+ noObsoleteWarning => 0,
doFrameReturnList => 0,
doIPv4Checksum => 0,
doMemoryOptimizations => 0,
@@ -87,8 +89,10 @@ sub new {
$self->[$__ip6] = $self->getIp6 unless $self->[$__ip6];
$self->[$__gatewayIp] = getGatewayIp() unless $self->[$__gatewayIp];
- print STDERR "*** Net::Packet is obsolete, you will receive no ".
- "support.\n*** Now use Net::Frame::* modules.\n";
+ if (! $self->noObsoleteWarning) {
+ print STDERR "*** Net::Packet is obsolete, you will receive no ".
+ "support.\n*** Now use Net::Frame::* modules.\n";
+ }
$self;
}
@@ -299,6 +303,10 @@ By default, when a B<Net::Packet::Frame> object is created from analyzing a raw
=item B<noFrameComputeLengths>
By default, when a B<Net::Packet::Frame> object is packed, all layers checksums and lengths are computed (if respective layers implement that). If you want to do it yourself, set this to true. See B<doIPv4Checksum> for the exception.
+
+=item B<noObsoleteWarning>
+
+Do not print the warning about obsolescence of this software.
=item B<doIPv4Checksum>
@@ -324,15 +332,17 @@ The environment debug directive. Set it to a number greater than 0 to increase t
Object constructor. You can pass attributes that will overwrite default ones. Default values:
-debug: 0
+debug: 0
+
+noFrameAutoDesc: 0
-noFrameAutoDesc: 0
+noFrameAutoDump: 0
-noFrameAutoDump: 0
+noDescAutoSet: 0
-noDescAutoSet: 0
+noDumpAutoSet: 0
-noDumpAutoSet: 0
+noObsoleteWarning: 0
dev: if not user provided, default interface is used, by calling B<getDevInfo> method. If user provided, all B<ip>, B<ip6> and B<mac> attributes will be used for that B<dev>.
@@ -382,7 +392,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: Frame.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: Frame.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::Frame;
use warnings;
@@ -497,7 +497,7 @@ sub recv {
$self->[$__env]->dump->nextAll if $self->[$__env]->dump->isRunning;
- # We already have the reply
+ # We already have the reply
return undef if $self->[$__reply];
croak("@{[(caller(0))[3]]}: \$self->env->dump variable not set\n")
@@ -597,7 +597,7 @@ sub isOspf { shift->_isL4(NP_LAYER_OSPF) }
sub isIgmpv4 { shift->_isL4(NP_LAYER_IGMPv4) }
sub is7 { shift->_isL7(NP_LAYER_7) }
sub isIp { my $self = shift; $self->isIpv4 || $self->isIpv6 }
-sub isIcmp { my $self = shift; $self->isIcmpv4 } # XXX: || v6
+sub isIcmp { my $self = shift; $self->isIcmpv4 } # XXX: || v6
1;
@@ -615,8 +615,8 @@ Net::Packet::Frame - object encapsulator for Net::Packet layers
# will be created automatically, by default. See Net::Packet::Env
# regarding changing this behaviour. Same for Net::Packet::Dump.
my $frame = Net::Packet::Frame->new(
- l3 => $ipv4, # Net::Packet::IPv4 object
- l4 => $tcp, # Net::Packet::TCP object
+ l3 => $ipv4, # Net::Packet::IPv4 object
+ l4 => $tcp, # Net::Packet::TCP object
# (here, a SYN request, for example)
);
@@ -807,7 +807,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: ICMPv4.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: ICMPv4.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::ICMPv4;
use strict;
@@ -87,7 +87,7 @@ sub recv {
}
}
# DescL4 recv, warning, it may receive a packet targetted at another
- # host, since no L3 headers is kept at D4 for packet matching
+ # host, since no L3 headers is kept at D4 for packet matching
else {
if ($self->[$__type] == NP_ICMPv4_TYPE_ECHO_REQUEST
&& $_->l4->type == NP_ICMPv4_TYPE_ECHO_REPLY) {
@@ -212,7 +212,7 @@ sub _unpackTimestamp {
);
}
-# It has same fields as ICMP echo
+# It has same fields as ICMP echo
sub _packInformation { shift->_packEcho }
sub _unpackInformation { shift->_unpackEcho }
@@ -233,8 +233,8 @@ sub _unpackAddressMask {
);
}
-# Pad ICMP error returned to achieve IP length (from IP request),
-# and put it as a Frame into error instance data
+# Pad ICMP error returned to achieve IP length (from IP request),
+# and put it as a Frame into error instance data
sub _dataToFrame {
my $self = shift;
my ($data) = @_;
@@ -369,7 +369,7 @@ sub unpack {
# Keep old behaviour for backward compat
if (! $Env->doFrameReturnList) {
- # payload has been handled by previous chunk of code
+ # payload has been handled by previous chunk of code
$self->[$__payload] = undef;
}
@@ -714,7 +714,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: IGMPv4.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: IGMPv4.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::IGMPv4;
use strict;
@@ -250,7 +250,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: IPv4.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: IPv4.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::IPv4;
use strict;
@@ -284,7 +284,7 @@ Net::Packet::IPv4 - Internet Protocol v4 layer 3 object
use Net::Packet::Consts qw(:ipv4);
require Net::Packet::IPv4;
- # Build a layer
+ # Build a layer
my $ip = Net::Packet::IPv4->new(
flags => NP_IPv4_DONT_FRAGMENT,
dst => "192.168.0.1",
@@ -485,7 +485,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: IPv6.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: IPv6.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::IPv6;
use strict;
@@ -149,7 +149,7 @@ Net::Packet::IPv6 - Internet Protocol v6 layer 3 object
use Net::Packet::Consts qw(:ipv6);
require Net::Packet::IPv6;
- # Build a layer
+ # Build a layer
my $layer = Net::Packet::IPv6->new(
dst => $hostname6,
);
@@ -268,7 +268,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: LLC.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: LLC.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::LLC;
use strict;
@@ -234,7 +234,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: Layer.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: Layer.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::Layer;
use strict;
@@ -249,7 +249,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: Layer2.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: Layer2.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::Layer2;
use strict;
@@ -55,7 +55,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: Layer3.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: Layer3.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::Layer3;
use strict;
@@ -58,7 +58,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: Layer4.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: Layer4.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::Layer4;
use strict;
@@ -52,7 +52,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: Layer7.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: Layer7.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::Layer7;
use strict;
@@ -73,7 +73,7 @@ Net::Packet::Layer7 - application layer object
use Net::Packet::Layer7;
- # Build layer to inject to network
+ # Build layer to inject to network
my $l7a = Net::Packet::Layer7->new(data => "GET / HTTP/1.0\r\n\r\n");
# Decode from network to create the object
@@ -122,7 +122,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: NULL.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: NULL.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::NULL;
use strict;
@@ -88,7 +88,7 @@ Net::Packet::NULL - BSD loopback layer 2 object
use Net::Packet::Consts qw(:null);
require Net::Packet::NULL;
- # Build a layer
+ # Build a layer
my $layer = Net::Packet::NULL->new;
$layer->pack;
@@ -169,7 +169,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: OSPF.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: OSPF.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::OSPF;
use strict;
@@ -217,7 +217,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: PPP.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: PPP.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::PPP;
use strict;
@@ -175,7 +175,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: PPPLCP.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: PPPLCP.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::PPPLCP;
use strict;
@@ -184,7 +184,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: PPPoE.pm 1641 2009-11-09 18:01:24Z gomor $
+# $Id: PPPoE.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::PPPoE;
use strict;
@@ -47,15 +47,19 @@ sub pack {
my $type = Bit::Vector->new_Dec(4, $self->[$__type]);
my $v8 = $version->Concat_List($type);
- $self->[$__raw] = $self->SUPER::pack('CCnnna*',
+ $self->[$__raw] = $self->SUPER::pack('CCnnn',
$v8->to_Dec,
$self->[$__code],
$self->[$__sessionId],
$self->[$__payloadLength],
$self->[$__pppProtocol],
- $self->[$__payload],
) or return undef;
+ if (length($self->[$__payload])) {
+ $self->[$__raw] .= $self->SUPER::pack('a*', $self->[$__payload])
+ or return undef;
+ }
+
1;
}
@@ -212,7 +216,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: RAW.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: RAW.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::RAW;
use strict;
@@ -59,7 +59,7 @@ Net::Packet::RAW - empty layer 2 object
# No constants for RAW
require Net::Packet::RAW;
- # Build a layer
+ # Build a layer
my $layer = Net::Packet::RAW->new;
$layer->pack;
@@ -102,7 +102,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: SLL.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: SLL.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::SLL;
use strict;
@@ -116,7 +116,7 @@ Net::Packet::SLL - Linux cooked capture layer 2 object
use Net::Packet::Consts qw(:sll);
require Net::Packet::SLL;
- # Build a layer
+ # Build a layer
my $layer = Net::Packet::SLL->new;
$layer->pack;
@@ -231,7 +231,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: STP.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: STP.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::STP;
use strict;
@@ -263,7 +263,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: TCP.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: TCP.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::TCP;
use strict;
@@ -306,10 +306,10 @@ Net::Packet::TCP - Transmission Control Protocol layer 4 object
use Net::Packet::Consts qw(:tcp);
require Net::Packet::TCP;
- # Build a layer
+ # Build a layer
my $layer = Net::Packet::TCP->new(
dst => 22,
- options => "\x02\x04\x05\xb4", # MSS=1460
+ options => "\x02\x04\x05\xb4", # MSS=1460
);
$layer->pack;
@@ -478,7 +478,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: UDP.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: UDP.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::UDP;
use strict;
@@ -304,7 +304,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: Utils.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: Utils.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::Utils;
use strict;
@@ -416,7 +416,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: VLAN.pm 1640 2009-11-09 17:58:27Z gomor $
+# $Id: VLAN.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet::VLAN;
use strict;
@@ -267,7 +267,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.
@@ -1,5 +1,5 @@
#
-# $Id: Packet.pm 1643 2009-11-09 18:21:00Z gomor $
+# $Id: Packet.pm 2002 2015-02-15 16:50:35Z gomor $
#
package Net::Packet;
use strict;
@@ -7,7 +7,7 @@ use warnings;
require v5.6.1;
-our $VERSION = '3.27';
+our $VERSION = '3.28';
require Exporter;
our @ISA = qw(Exporter);
@@ -64,18 +64,18 @@ Net::Packet - a framework to easily send and receive frames from layer 2 to laye
=head1 SYNOPSIS
- # Load all modules, it also initializes a Net::Packet::Env object,
+ # Load all modules, it also initializes a Net::Packet::Env object,
# and imports all utility subs and constants in current namespace
# WARNING: this is not the prefered way to use Net::Packet
use Net::Packet;
- # Build IPv4 header
+ # Build IPv4 header
my $ip = Net::Packet::IPv4->new(dst => '192.168.0.1');
- # Build TCP header
+ # Build TCP header
my $tcp = Net::Packet::TCP->new(dst => 22);
- # Assamble frame, it will also open a Net::Packet::DescL3 descriptor
+ # Assamble frame, it will also open a Net::Packet::DescL3 descriptor
# and a Net::Packet::Dump object
my $frame = Net::Packet::Frame->new(l3 => $ip, l4 => $tcp);
@@ -221,7 +221,7 @@ Patrice E<lt>GomoRE<gt> Auffret
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2004-2009, Patrice E<lt>GomoRE<gt> Auffret
+Copyright (c) 2004-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of the Artistic license.
See LICENSE.Artistic file in the source distribution archive.