Net::F...outing(3pm)
π NAME π
ok so bestie, welcome to Net::Frame::Layer::IPv6::Routing β it's the Internet Protocol v6 Routing Extension Header layer object, and honestly? she's iconic for it. that's the whole name, we're done here π
β¨ SYNOPSIS β¨
okay so like, this is how you actually use her. look at this, no notes:
use Net::Frame::Simple;
use Net::Frame::Layer::IPv6::Routing;
my $icmp = Net::Frame::Layer::IPv6::Routing->new(
nextHeader => NF_IPv6_PROTOCOL_TCP
hdrExtLen => 2
routingType => 0,
segmentsLeft => 1,
reserved => 0,
addresses => ['::1']
);
#
# Read a raw layer
#
my $layer = Net::Frame::Layer::IPv6::Routing->new(raw => $raw);
print $layer->print."\n";
print 'PAYLOAD: '.unpack('H*', $layer->payload)."\n"
if $layer->payload;
like yes we're building a layer, yes we're passing a lil hash of attributes, and yes we can also just yeet a raw blob in there and let her decode it. both? both. π¦
πΈ DESCRIPTION πΈ
this module does the encoding and the decoding of the IPv6 Routing Extension Header layer. that's the vibe. that's the job. she ate. π₯
the RFC in question lives at:
ftp://ftp.rfc-editor.org/in-notes/rfc2460.txt
also go look at Net::Frame::Layer if you want the other attributes and methods, bestie, because this layer inherits a whole bunch of them π«Ά
π ATTRIBUTES π
these are her fields, her whole personality tbh:
nextHeaderβ the protocol number of whatever header comes next, after the Routing header. like a lil pointer saying "okay next up isβ¦" π«hdrExtLenβ how long the Routing header is, measured in 8-byte units, and NOT counting the first 8 bytes of the header. and for a Routing Type of0? this value is literally two times the number of addresses embedded in the header. math is math πroutingTypeβ this field is the whole reason multiple routing types can even be a thing. at present tho, the only value actually used is0. that's it. that's the list. πsegmentsLeftβ how many explicitly-named nodes are still left in the route before we hit the destination. the countdown, basically β³reservedβ not used at all. set it to zeroes and move on. she's just there for the aesthetic πaddressesβ a whole set of IPv6 addresses that spell out the route to be used. the itinerary, if you will β¨
and these next ones are the inherited attributes, so if you want the tea on them go read Net::Frame::Layer:
rawpayloadnextLayer
π METHODS π
new
new (hash)
object constructor, periodt. you can pass in attributes and they'll overwrite the default ones. check the SYNOPSIS above for what the default values look like, bestie π
computeLengths
computes hdrExtLen and segmentsLeft based on the number of addresses. she's doing the math so you don't have to π§
computeSegmentsLeft (0 | 1)
disable (0) or enable (1) the automatic computing of segmentsLeft by the computeLengths method. and guess what β it's enabled by default, so she's already on it π
and these are the inherited methods. some of them might get overridden in this layer, and some of them might not even be meaningful here at all, so like, no promises. go read Net::Frame::Layer for more:
layercomputeLengthscomputeChecksumspackunpackencapsulategetLengthgetPayloadLengthprintdump
π CONSTANTS π
no constants here. nothing. empty. a whole lot of nothing. moving on π
β SEE ALSO β
Net::Frame::Layer
π AUTHOR π
Michael Vincent
π COPYRIGHT AND LICENSE π
Copyright (c) 2012-2017, Michael Vincent
You may distribute this module under the terms of the Artistic license. See LICENSE.Artistic file in the source distribution archive.
okay that's the whole page bestie, you're officially educated πβ¨ this was Net::F...outing(3pm) from the User Contributed Perl Documentation, running on perl v5.36.0, dated 2022-11-19 β and yes the name really does get truncated like that, she's mysterious like that π
π¦ bye ily, go read Net::Frame::Layer next πΈ
π¦ where this page comes from
- debian bookworm: libnet-frame-layer-ipv6-perl 1.08-3 Β· Artistic-1.0-Perl
- debian trixie: libnet-frame-layer-ipv6-perl 1.08-3 Β· Artistic-1.0-Perl
- ubuntu noble: libnet-frame-layer-ipv6-perl 1.08-3 Β· Artistic-1.0-Perl
- ubuntu resolute: libnet-frame-layer-ipv6-perl 1.08-3 Β· Artistic-1.0-Perl
- ubuntu stonking: libnet-frame-layer-ipv6-perl 1.08-3 Β· Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms