Net::F...r::NULL(3pm)
π NAME π
Net::Frame::Layer::NULL β it's the BSD loopback layer object, bestie. That's the whole vibe. It's a Perl module, it lives in the User Contributed Perl Documentation, and it's here to handle the BSD loopback layer for you. π¦
β¨ SYNOPSIS β¨
Okay so here's how you actually use it, no cap:
use Net::Frame::Layer::NULL qw(:consts);
# Build a layer
my $layer = Net::Frame::Layer::NULL->new(
type => NF_NULL_TYPE_IPv4,
);
$layer->pack;
print 'RAW: '.$layer->dump."\n";
# Read a raw layer
my $layer = Net::Frame::Layer::NULL->new(raw => $raw);
print $layer->print."\n";
print 'PAYLOAD: '.unpack('H*', $layer->payload)."\n"
if $layer->payload;
Build it, pack it, dump it, read it back. Iconic behaviour, honestly. π
πΈ DESCRIPTION πΈ
So this module is the one that implements the encoding and decoding of the BSD loopback layer. That's its whole job and it ate. π₯
Also, see Net::Frame::Layer for other attributes and methods β that's where the rest of the lore lives. π
π ATTRIBUTES π
typeβ stores the type of encapsulated layer. That's it, that's the one this layer brings to the table. π
The following are inherited attributes. See Net::Frame::Layer for more information:
rawpayloadnextLayer
π METHODS π
new
new (hash)
Object constructor. You can pass attributes that will overwrite default ones β yes bestie, you get to customise. See SYNOPSIS for default values. π«Ά
The following are inherited methods. Heads up though: some of them may be overridden in this layer, and some others may not be meaningful in this layer (not me warning you in advance π). See Net::Frame::Layer for more information.
layercomputeLengthscomputeChecksumspackunpackencapsulategetLengthgetPayloadLengthprintdump
π CONSTANTS π
Load them like this, don't forget:
use Net::Frame::Layer::NULL qw(:consts);
Then you've got the whole squad of supported encapsulated layer types:
NF_NULL_TYPE_IPv4NF_NULL_TYPE_ARPNF_NULL_TYPE_CGMPNF_NULL_TYPE_80211NF_NULL_TYPE_DDPNF_NULL_TYPE_AARPNF_NULL_TYPE_WCPNF_NULL_TYPE_8021QNF_NULL_TYPE_IPXNF_NULL_TYPE_STPNF_NULL_TYPE_IPv6NF_NULL_TYPE_WLCCPNF_NULL_TYPE_PPPoEDNF_NULL_TYPE_PPPoESNF_NULL_TYPE_8021XNF_NULL_TYPE_AoENF_NULL_TYPE_LLDPNF_NULL_TYPE_LOOPNF_NULL_TYPE_VLANNF_NULL_TYPE_ETH
Various supported encapsulated layer types. Twenty of them. We love a complete list. β¨
π SEE ALSO π
Net::Frame::Layer
π AUTHOR π
Patrice <GomoR> Auffret β the legend, the moment, the main character. π«Ά
π COPYRIGHT 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.
And that's the whole page, bestie β this one's from perl v5.36.0, dated 2022-12-04, and it's the Net::Frame::Layer::NULL(3pm) manpage. Slay. π β¨π
π¦ where this page comes from
- debian bookworm: libnet-frame-perl 1.21-2 Β· Artistic-1.0-Perl
- debian trixie: libnet-frame-perl 1.21-2 Β· Artistic-1.0-Perl
- ubuntu noble: libnet-frame-perl 1.21-2 Β· Artistic-1.0-Perl
- ubuntu resolute: libnet-frame-perl 1.21-2 Β· Artistic-1.0-Perl
- ubuntu stonking: libnet-frame-perl 1.21-2 Β· Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms