Net::F...opByHop(3pm)

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

πŸ’– Net::Frame::Layer::IPv6::HopByHop β€” the manual, but make it cute ✨

okay bestie, so this page lives in the User Contributed Perl Documentation section, and it's all about one very specific little layer object: Net::Frame::Layer::IPv6::HopByHop, aka the Internet Protocol v6 Hop-By-Hop Extension Header layer object. yes, that's a mouthful. yes, we're doing it anyway. πŸ’…


✨ NAME ✨

Net::Frame::Layer::IPv6::HopByHop β€” the Internet Protocol v6 Hop-By-Hop Extension Header layer object. that's the whole vibe. πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

here's how you actually use it, no cap:

use Net::Frame::Simple;
use Net::Frame::Layer::IPv6::HopByHop;

my $ipv6eh = Net::Frame::Layer::IPv6::HopByHop->new(
   nextHeader => NF_IPv6_PROTOCOL_TCP,
   hdrExtLen  => 2,
   options    => []
);

#
# Read a raw layer
#

my $layer = Net::Frame::Layer::IPv6::HopByHop->new(raw => $raw);

print $layer->print."\n";
print 'PAYLOAD: '.unpack('H*', $layer->payload)."\n"
   if $layer->payload;

see? constructor first, then the raw-layer glow-up. both are iconic, both are valid. πŸ’œ


🌸 DESCRIPTION 🌸

so this module implements the encoding and decoding of the IPv6 Hop-By-Hop options Extension Header layer. that's literally its whole job. it's giving "I do one thing and I do it flawlessly." πŸ‘‘

the spec it follows:

  • RFC: ftp://ftp.rfc-editor.org/in-notes/rfc2460.txt

also, heads up: check out Net::Frame::Layer for other attributes and methods, because this layer inherits a lot from its parent. 🫢


πŸ’… ATTRIBUTES πŸ’…

these are the ones this layer brings to the group chat:

  • nextHeader β€” the protocol number of the next header that comes after the HopByHop header. it's the "and then what??" field. 😭
  • hdrExtLen β€” the length of the Hop-By-Hop Options header, measured in 8-byte units, and it does not include the first 8 bytes of the header. sneaky? a little. correct? absolutely. ✨
  • options β€” a number of Net::Frame::Layer::IPv6::Option objects. plural. a whole little squad of them. πŸ“

the following are inherited attributes β€” go read Net::Frame::Layer for more info, bestie:

  • raw
  • payload
  • nextLayer

⭐ METHODS ⭐

  • new
  • new (hash) β€” the object constructor. you can pass attributes in and they'll overwrite the default ones. peek at SYNOPSIS for the default values. πŸ’–

the following are inherited methods. some of them may be overridden in this layer, and some others may not even be meaningful here β€” so don't come for me if one of them is just standing there. check Net::Frame::Layer for more info:

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

🌈 CONSTANTS 🌈

no constants here. none. zero. the void. an empty plate. 🍽️✨


πŸ”₯ SEE ALSO πŸ”₯

  • Net::Frame::Layer

πŸ‘‘ AUTHOR πŸ‘‘

Michael Vincent. the icon. the moment. the whole reason this exists. 🫑


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.

fr fr, read the license file before you go redistributing, bestie. it's the rules. πŸ™ˆ

okay that's the whole page!! this was generated from perl v5.36.0 and dated 2022-11-19, and that's the sign-off, so slay, go encode some IPv6 extension headers, mwah πŸ’‹πŸ’–πŸ¦‹