Zonema...Packet(3pm)

πŸ“¦ version 1.0.16, in ubuntu jammy

πŸ’– Zonemaster::Packet πŸ’–

okay bestie, so this is Zonemaster::Packet, a lil wrapper object from the User Contributed Perl Documentation (that's the 3pm section, iykyk). It wraps up Net::LDNS::Packet objects so you can vibe with DNS packets without touching the raw thing directly. she's giving ✨convenience✨ and honestly? we're obsessed. πŸŽ€


✨ NAME ✨

Zonemaster::Packet β€” wrapping object for Net::LDNS::Packet objects. that's it, that's the whole job. πŸ’…


🌸 SYNOPSIS 🌸

my $packet = $ns->query('iis.se', 'NS');
my @rrs = $packet->get_records('ns');

look at her go πŸ¦‹ query a name, grab the records, done. no notes.


πŸŽ€ ATTRIBUTES πŸŽ€

  • packet β€” holds the Net::LDNS::Packet that the object is wrapping. it's literally the whole point of this class, the main character, the moment. πŸ‘‘

πŸ’… METHODS πŸ’…

  • no_such_record β€” returns true if the packet represents an existing DNS node that's just... lacking any records of the type you asked for. node exists, the records are a no-show. 😭
  • no_such_name β€” returns true if the packet represents a non-existent DNS node. the name is not giving, because it is not there. πŸ’€
  • is_redirect β€” returns true if the packet is a redirect to another set of nameservers. plot twist, new cast. πŸ”₯
  • get_records($type[, $section]) β€” returns the Net::LDNS::RR objects of the requested type in the packet. and if you pass that optional $section argument, and it's one of "answer", "authority" and "additional", then you only get RRs from that section. very "pick your own adventure". 🌈
  • get_records_for_name($type, $name) β€” returns all the Net::LDNS::RR objects for the given name in the packet. all of them. every single one. 🫢
  • has_rrs_of_type_for_name($type, $name) β€” returns true if the packet holds any RRs of the specified type for the given name. a lil yes/no vibe check. ⭐
  • answerfrom β€” a wrapper for the underlying packet method, except it replaces undefined values with the string "<unknown>". so when the answer is a mystery, she says so. πŸ™ˆ
  • TO_JSON β€” support method so JSON can actually serialize these objects. thank you for your service, queen. πŸ‘‘

🌟 METHODS PASSED THROUGH 🌟

these methods get passed straight through, transparently, to the underlying Net::LDNS::Packet object. no interference, no extra steps, just vibes flowing downstream. ✨

  • data
  • rcode
  • aa
  • question
  • answer
  • authority
  • additional
  • print
  • string
  • answersize
  • unique_push
  • timestamp
  • type
  • edns_size
  • edns_rcode
  • has_edns
  • id
  • querytime
  • do
  • opcode

fr fr bestie, that's the whole page. every method, every pass-through, every "<unknown>". no cap. πŸ’–

and that's a wrap πŸŽ€ this lil beauty is documented as perl v5.32.0, dated 2021-01-06, and lives under the name Zonemaster::Packet(3pm) in the User Contributed Perl Documentation. slay, go query something. πŸŒΈπŸ’…βœ¨

πŸ“¦ where this page comes from