RECORD(3)

πŸŽ€ RECORD(3) β€” the record module, bestie πŸŽ€

okay so this is packet.record from the record 2.1 manual, section 3. It gives you the object for a record, plus the string representation of that record the way it shows up in a tcpdump trace file. iconic honestly ✨


πŸ’– NAME πŸ’–

packet.record β€” the Record module. that's it, that's the name, periodt πŸ’…


🌸 DESCRIPTION 🌸

It provides the object for a record and the string representation of the record inside a tcpdump trace file. no cap, that's the whole vibe πŸ¦‹


✨ CLASSES ✨

πŸ‘‘ class Record(baseobj.BaseObj)

The Record object. main character energy fr fr πŸ’–

Usage:

from packet.record import Record

x = Record(pktt, data)

Object definition:

Record(
    frame       = int,   # Frame number
    index       = int,   # Packet number
    seconds     = int,   # Seconds
    usecs       = int,   # Microseconds
    length_inc  = int,   # Number of bytes included in trace
    length_orig = int,   # Number of bytes in packet
    secs        = float, # Absolute seconds including microseconds
    rsecs       = float, # Seconds relative to first packet
)

Methods defined here:


🧚 __init__(self, pktt, data)

Constructor 🫢

Initialize the object's private data.

  • pktt: the Packet trace object (packet.pktt.Pktt) so this layer has access to the parent layers.
  • data: the raw packet data for this layer.

πŸ¦‹ __str__(self)

String representation of the object ✨

The representation depends on the verbose level set by debug_repr().

  • If it's set to 0, you get the generic object representation back.
  • If it's set to 1, the representation of the object is condensed down to display either or both the frame or packet numbers and the timestamp:
'57 2014-03-16 13:42:56.530957 '
  • If it's set to 2, the representation of the object also includes the number of bytes on the wire, the number of bytes captured, and a little bit more:
       verbose:
heads up bestie β€” the verbose levels are literally the whole personality switch here, so pick wisely 😭

🌈 SEE ALSO 🌈

baseobj(3) β€” go read that one too, it's the parent, iykyk πŸ’œ


πŸ’€ BUGS πŸ’€

No known bugs. we ate and left no crumbs πŸ“


🌸 AUTHOR 🌸

Jorge Mora (mora@netapp.com) β€” thank you for your service king πŸ‘‘


and that's the page!! this was NFStest 3.2, dated 21 March 2023 πŸŽ€ love u, go read baseobj(3), mwah πŸ’–βœ¨πŸ¦‹