Net::Frame::Layer::STP - Spanning Tree Protocol layer object |
Net::Frame::Layer::STP - Spanning Tree Protocol layer object
use Net::Frame::Layer::STP qw(:consts);
# Build a layer my $layer = Net::Packet::STP->new( protocolIdentifier => NF_STP_PROTOCOL_IDENTIFIER_STP, protocolVersionIdentifier => 0, bpduType => 0x00, bpduFlags => 0x00, rootIdentifier => '1/00:11:22:33:44:55', rootPathCost => 1, bridgeIdentifier => '2/11:22:33:44:55:66', portIdentifier => 0x0001, messageAge => 1, maxAge => 10, helloTime => 1, forwardDelay => 10, ); $layer->pack;
print 'RAW: '.$layer->dump."\n";
# Read a raw layer my $layer = Net::Frame::Layer::STP->new(raw => $raw);
print $layer->print."\n"; print 'PAYLOAD: '.unpack('H*', $layer->payload)."\n" if $layer->payload;
This modules implements the encoding and decoding of the Spanning Tree Protocol layer.
See also Net::Frame::Layer for other attributes and methods.
The following are inherited attributes. See Net::Frame::Layer for more information.
The following are inherited methods. Some of them may be overriden in this layer, and some others may not be meaningful in this layer. See Net::Frame::Layer for more information.
Load them: use Net::Frame::Layer::STP qw(:consts);
Patrice <GomoR> Auffret
Copyright (c) 2006-2015, Patrice <GomoR> Auffret
You may distribute this module under the terms of the Artistic license. See LICENSE.Artistic file in the source distribution archive.
Net::Frame::Layer::STP - Spanning Tree Protocol layer object |