Net::Frame::Layer::SLL - Linux cooked capture layer object
Contents
Attributes
packetType
Stores the packet type (unicast to us, sent by us ...).
addressType
The address type.
addressLength
The length of the previously specified address.
source
Source address.
protocol
Encapsulated protocol.
The following are inherited attributes. See Net::Frame::Layer for more information.
rawpayloadnextLayerConstants
Load them: use Net::Frame::Layer::SLL qw(:consts);
NF_SLL_PACKET_TYPE_SENT_BY_USNF_SLL_PACKET_TYPE_UNICAST_TO_US
Various possible packet types.
NF_SLL_PROTOCOL_IPv4NF_SLL_PROTOCOL_X25NF_SLL_PROTOCOL_ARPNF_SLL_PROTOCOL_CGMPNF_SLL_PROTOCOL_80211NF_SLL_PROTOCOL_PPPIPCPNF_SLL_PROTOCOL_RARPNF_SLL_PROTOCOL_DDPNF_SLL_PROTOCOL_AARPNF_SLL_PROTOCOL_PPPCCPNF_SLL_PROTOCOL_WCPNF_SLL_PROTOCOL_8021QNF_SLL_PROTOCOL_IPXNF_SLL_PROTOCOL_STPNF_SLL_PROTOCOL_IPv6NF_SLL_PROTOCOL_WLCCPNF_SLL_PROTOCOL_MPLSNF_SLL_PROTOCOL_PPPoEDNF_SLL_PROTOCOL_PPPoESNF_SLL_PROTOCOL_8021XNF_SLL_PROTOCOL_AoENF_SLL_PROTOCOL_80211INF_SLL_PROTOCOL_LLDPNF_SLL_PROTOCOL_LLTDNF_SLL_PROTOCOL_LOOPNF_SLL_PROTOCOL_VLANNF_SLL_PROTOCOL_PPPPAPNF_SLL_PROTOCOL_PPPCHAP
Various supported encapsulated layer types.
NF_SLL_ADDRESS_TYPE_512Copyright And License
Copyright (c) 2006-2019, Patrice <GomoR> Auffret
You may distribute this module under the terms of the Artistic license. See LICENSE.Artistic file in the
source distribution archive.
perl v5.36.0 2022-12-04 Net::Frame::Layer::SLL(3pm)
Description
This modules implements the encoding and decoding of the Linux cooked capture layer.
See also Net::Frame::Layer for other attributes and methods.
Methods
newnew (hash)
Object constructor. You can pass attributes that will overwrite default ones. See SYNOPSIS for
default values.
The following are inherited methods. Some of them may be overridden in this layer, and some others may
not be meaningful in this layer. See Net::Frame::Layer for more information.
layercomputeLengthscomputeChecksumspackunpackencapsulategetLengthgetPayloadLengthprintdumpName
Net::Frame::Layer::SLL - Linux cooked capture layer object
See Also
Net::Frame::Layer
Synopsis
use Net::Frame::Layer::SLL qw(:consts);
# Build a layer
my $layer = Net::Frame::Layer::SLL->new(
packetType => NF_SLL_PACKET_TYPE_SENT_BY_US,
addressType => NF_SLL_ADDRESS_TYPE_512,
addressLength => 0,
source => 0,
protocol => NF_SLL_PROTOCOL_IPv4,
);
$layer->pack;
print 'RAW: '.$layer->dump."\n";
# Read a raw layer
my $layer = Net::Frame::Layer::SLL->new(raw => $raw);
print $layer->print."\n";
print 'PAYLOAD: '.unpack('H*', $layer->payload)."\n"
if $layer->payload;
