|
NAMENet::Packet::VLAN - 802.1Q layer 3 object SYNOPSIS use Net::Packet::Consts qw(:vlan);
require Net::Packet::VLAN;
# Build a layer
my $layer = Net::Packet::VLAN->new(
priority => 0,
cfi => 0,
id => 0,
type => NP_VLAN_TYPE_IPv4,
);
$layer->pack;
print 'RAW: '.unpack('H*', $layer->raw)."\n";
# Read a raw layer
my $layer = Net::Packet::VLAN->new(raw => $raw);
print $layer->print."\n";
print 'PAYLOAD: '.unpack('H*', $layer->payload)."\n"
if $layer->payload;
DESCRIPTIONThis modules implements the encoding and decoding of the Virtual LAN/802.1Q layer. Details: http://standards.ieee.org/getieee802/802.1.html See also Net::Packet::Layer and Net::Packet::Layer3 for other attributes and methods. ATTRIBUTES
METHODS
CONSTANTSLoad them: use Net::Packet::Consts qw(:vlan);
AUTHORPatrice <GomoR> Auffret COPYRIGHT AND LICENSECopyright (c) 2004-2009, Patrice <GomoR> Auffret You may distribute this module under the terms of the Artistic license. See LICENSE.Artistic file in the source distribution archive. RELATED MODULESNetPacket, Net::RawIP, Net::RawSock
|