![]() |
![]()
| ![]() |
![]()
NAMENet::Packet::STP - Spanning Tree Protocol layer 4 object SYNOPSISuse Net::Packet::Consts qw(:stp); require Net::Packet::STP; # Build a layer my $layer = Net::Packet::STP->new( protocolIdentifier => NP_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: '.unpack('H*', $layer->raw)."\n"; # Read a raw layer my $layer = Net::Packet::STP->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 Spanning Tree Protocol layer. See also Net::Packet::Layer and Net::Packet::Layer4 for other attributes and methods. ATTRIBUTES
METHODS
CONSTANTSLoad them: use Net::Packet::Consts qw(:stp);
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
|