Net::F...r::PPP(3pm)

πŸ“¦
version 1.21 Β· 2 versions
  • 1.21 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 1.21 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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:

  • raw
  • payload
  • nextLayer

✨ 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:

  • layer
  • computeLengths
  • computeChecksums
  • pack
  • unpack
  • encapsulate
  • getLength
  • getPayloadLength
  • print
  • dump

✨ 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_IPv4
  • NF_PPP_PROTOCOL_DDP
  • NF_PPP_PROTOCOL_IPX
  • NF_PPP_PROTOCOL_IPv6
  • NF_PPP_PROTOCOL_CDP
  • NF_PPP_PROTOCOL_PPPLCP

✨ SEE ALSO ✨

  • Net::Frame::Layer

✨ AUTHOR ✨

Patrice <GomoR> Auffret β€” the icon, the legend, the main character who wrote this πŸ‘‘


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 was perl v5.36.0, dated 2022-12-04, from the Net::Frame::Layer::PPP(3pm) page. go build some packets, you absolute legend πŸ«Άβœ¨πŸ’–