Net::F...r::PPP(3pm)
π Net::Frame::Layer::PPP β the manual, but make it cute π
okay bestie, so this is Net::Frame::Layer::PPP, a lil Perl module from the User Contributed Perl Documentation collection. it does the Point-to-Point Protocol layer. yes THAT PPP. the one your router speaks when it's feeling dramatic on a serial line. let's go π¦
β¨ NAME β¨
Net::Frame::Layer::PPP β Point-to-Point Protocol layer object, fr fr π
β¨ SYNOPSIS β¨
bestie here's the whole vibe, copy-paste ready:
use Net::Frame::Layer::PPP qw(:consts);
# Build a layer
my $layer = Net::Frame::Layer::PPP->new(
address => 0xff,
control => 0x03,
protocol => NF_PPP_PROTOCOL_IPv4,
);
$layer->pack;
print 'RAW: '.$layer->dump."\n";
# Read a raw layer
my $layer = Net::Frame::Layer::PPP->new(raw => $raw);
print $layer->print."\n";
print 'PAYLOAD: '.unpack('H*', $layer->payload)."\n"
if $layer->payload;
so you either build a layer and pack it, or you read a raw one and print it. both paths, both iconic π
β¨ DESCRIPTION β¨
this module implements the encoding and decoding of the Point-to-Point Protocol layer. that's the whole job. it does it. slay π
also go look at Net::Frame::Layer for other attributes and methods, because this one is literally just a layer in that whole family. iykyk.
β¨ ATTRIBUTES β¨
here's what you can set on your layer, with their sizes:
addressβ 8 bits πcontrolβ 8 bits πprotocolβ 16 bits π
the following ones are inherited attributes. go read Net::Frame::Layer for more info on them, bestie:
rawpayloadnextLayer
β¨ METHODS β¨
new
new (hash)
okay so this is the Object constructor π you can pass it attributes and they'll overwrite the default ones. and if you wanna know what the defaults are? check the SYNOPSIS up there, it's all spelled out β¨
the following are inherited methods. heads up: some of them might get overridden in this layer, and some of them might not even mean anything in this layer. no cap. go see Net::Frame::Layer for the full tea:
layercomputeLengthscomputeChecksumspackunpackencapsulategetLengthgetPayloadLengthprintdump
β¨ CONSTANTS β¨
load them like this, periodt:
use Net::Frame::Layer::PPP qw(:consts);
and here's the lineup β these are the various supported encapsulated layer types π¦:
NF_PPP_PROTOCOL_IPv4NF_PPP_PROTOCOL_DDPNF_PPP_PROTOCOL_IPXNF_PPP_PROTOCOL_IPv6NF_PPP_PROTOCOL_CDPNF_PPP_PROTOCOL_PPPLCP
β¨ SEE ALSO β¨
- Net::Frame::Layer
β¨ AUTHOR β¨
Patrice <GomoR> Auffret β the icon, the legend, the main character who wrote this π
β¨ 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. that's the whole rule, respect it fr fr π
and that's the page bestie!! this wasperl v5.36.0, dated2022-12-04, from theNet::Frame::Layer::PPP(3pm)page. go build some packets, you absolute legend π«Άβ¨π
π¦ 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