Net::Packet::Layer - base class for all layer modules
This is the base class for Net::Packet::Layer2, Net::Packet::Layer3, Net::Packet::Layer4 and Net::Packet::Layer7 modules.
It just provides those layers with inheritable attributes and methods.
Stores the raw layer (as captured from the network, or packed to send to network).
Stores what is not part of the layer, that is the encapsulated part to be decoded by upper layers.
Returns the string describing the layer type (example: 'IPv4').
Returns the string describing the layer number (example: 'L3' for IPv4).
Returns the next layer type (parsed from payload). This is the same string as returned by is method.
Generally, when a layer is built, some attributes are not yet known until the full Net::Packet::Frame is assembled. Those methods computes various lengths and checksums attributes found in a specific layer. Return 1 on success, undef otherwise.
Just returns a string in a human readable format describing attributes found in the layer.
Just returns a string in hexadecimal format which is how the layer appears on the network.
Returns the layer length in bytes.
Load them: use Net::Packet::Consts qw(:layer);
Base layer string.
Layer 2 strings.
Layer 3 strings.
Layer 4 strings.
Layer 7 string.
Other strings.
Layer number N strings.
Patrice <GomoR> Auffret
Copyright (c) 2004-2006, Patrice <GomoR> Auffret
You may distribute this module under the terms of the Artistic license. See LICENSE.Artistic file in the source distribution archive.
NetPacket, Net::RawIP, Net::RawSock
To install Net::Packet, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Packet
CPAN shell
perl -MCPAN -e shell install Net::Packet
For more information on module installation, please visit the detailed CPAN module installation guide.