SLLV2(3)

πŸ’– SLLV2 πŸ’–

okay bestie, so this is the manual page for SLLV2(3), like from the sllv2 1.0 manual, and I'm gonna walk you through it because it's honestly kinda cute and very useful once it clicks. sit down, grab a strawberry πŸ“, let's go.


✨ NAME ✨

packet.link.sllv2 β€” it's an ERF module, no cap 🫢


🌸 DESCRIPTION 🌸

This one's whole job is to decode the Linux "cooked" v2 capture encapsulation layer. that's it. that's the vibe. it takes that cooked v2 layer and makes sense of it for you πŸ’…


πŸ‘‘ CLASSES πŸ‘‘

πŸ’œ class SLLv2(baseobj.BaseObj)

it's an Extensible record format object. lowkey iconic.

🌈 Usage:

from packet.link.sllv2 import SLLv2

x = SLLv2(pktt)

πŸŽ€ Object definition:

SLLv2(
    etype  = int,    # Protocol type
    index  = int,    # Interface index
    dtype  = int,    # Device type
    ptype  = int,    # Packet type
    alen   = int,    # Address length
    saddr  = int,    # Source Address
    psize  = int,    # Payload data size
)

like, look at all those fields, she's got everything she needs ✨

πŸ¦‹ Methods defined here:


⭐ __init__(self, pktt)

Constructor

this is where she initializes the object's private data. main character energy fr.

  • pktt: the Packet trace object (packet.pktt.Pktt), so that this layer gets access to the parent layers 🫢

⭐ __str__(self)

String representation of object

the way she looks depends on the verbose level you set with debug_repr():

  • if you set it to 0, you get the generic object representation back. fine. basic. whatever.
  • if you set it to 1, the representation is all condensed and cute, like:
"SLLv2  etype: 0x86dd, index: 3, dtype: 65534, ptype: 4, alen: 0, saddr: b'', psize: 116"

that's the whole thing right there, periodt πŸ’…


πŸ”₯ SEE ALSO πŸ”₯

baseobj(3), packet.internet.ipv4(3), packet.internet.ipv6(3), packet.link.macaddr(3)

go read those too bestie, they're all in the same friend group 🫢


πŸ’€ BUGS πŸ’€

No known bugs. not a single one. she's clean, she's flawless, she ate and left no crumbs πŸ‘‘


🌟 AUTHOR 🌟

Jorge Mora (mora@netapp.com) β€” ty for your service legend 🫑


and that's the whole page, babes! this came out of NFStest 3.2, dated 21 March 2023, so if you ever need to cite it, that's the receipts right there. slay, stay hydrated, and happy decoding πŸ’–βœ¨πŸŽ€πŸ¦‹