DNS(3)
π DNS(3) π
okay bestie, so this is the manual page for packet.application.dns, from the dns 1.0 manual. pull up a chair, grab a boba, we're decoding DNS layers together π«Ά
β¨ NAME β¨
packet.application.dns β it's the DNS module, bestie. that's the whole name, no notes π
πΈ DESCRIPTION πΈ
it decodes the DNS layer. that's it, that's the job, and it ate π₯
and because DNS doesn't exist in a vacuum, here's the lore β the RFCs this thing is vibing with:
- RFC 1035 Domain Names - Implementation and Specification
- RFC 2671 Extension Mechanisms for DNS (EDNS0)
- RFC 4034 Resource Records for the DNS Security Extensions
- RFC 4035 Protocol Modifications for the DNS Security Extensions
- RFC 4255 Using DNS to Securely Publish Secure Shell (SSH) Key Fingerprints
iykyk, the RFC list is the syllabus and we are studying πβ¨
π CLASSES π
π¦ class DNS(baseobj.BaseObj)
the DNS object, main character energy fr fr.
Usage:
from packet.application.dns import DNS
# Decode DNS layer
x = DNS(pktt, proto)
Object definition:
DNS(
id = int, # Query Identifier
QR = int, # Packet Type (QUERY or REPLY)
opcode = int, # Query Type
AA = int, # Authoritative Answer
TC = int, # Truncated Response
RD = int, # Recursion Desired
RA = int, # Recursion Available
AD = int, # Authentic Data
CD = int, # Checking Disabled
rcode = int, # Response Code
version = int, # Version (EDNS0)
udpsize = int, # UDP Payload Size (EDNS0)
options = list, # Options (EDNS0)
qdcount = int, # Number of Queries
ancount = int, # Number of Answers
nscount = int, # Number of Authority Records
arcount = int, # Number of Additional Records
queries = list, # List of Queries
answers = list, # List of Answers
authorities = list, # List of Authority Records
additional = list, # List of Additional Records
)
no cap, every single one of those fields matters, don't skip a single one π
Methods defined here:
__bool__(self)
truth value testing for the built-in operation bool(). so you can literally just go if x: and the vibe check happens automatically β¨
__init__(self, pktt, proto)
the constructor π
it initializes the object's private data. the deets:
pktt: packet trace object (packet.pktt.Pktt) so this layer has access to the parent layers. it needs to know its ancestors, periodt.proto: transport layer protocol.
π class Option(baseobj.BaseObj)
the Option object πΈ
π class Query(baseobj.BaseObj)
the Query object πΈ
π class Resource(baseobj.BaseObj)
the Resource object πΈ
π class dns_algorithm(packet.utils.Enum)
enum dns_algorithm β
π class dns_class(packet.utils.Enum)
enum dns_class β
π class dns_fptype(packet.utils.Enum)
enum dns_fptype β
π class dns_opcode(packet.utils.Enum)
enum dns_opcode β
π class dns_query(packet.utils.Enum)
enum dns_query β
π class dns_rcode(packet.utils.Enum)
enum dns_rcode β
π class dns_type(packet.utils.Enum)
enum dns_type β
π SEE ALSO π
go read these next, bestie, they're the friend group:
baseobj(3)packet.application.dns_const(3)packet.internet.ipv6addr(3)packet.unpack(3)packet.utils(3)
π BUGS π
No known bugs. flawless, unbothered, moisturized, in her lane π
π«Ά AUTHOR π«Ά
Jorge Mora (mora@netapp.com) β thank you for your service, king π
and that's a wrap on the dns 1.0 manual page, page DNS(3), brought to you by NFStest 3.2, dated 21 March 2023. slay, stay decoded, and don't forget to close your sockets πβ¨π¦
π¦ where this page comes from
- debian trixie: nfstest 3.2-3
- fedora 43: NFStest 3.2-14.fc43 Β· GPL-2.0-or-later
- fedora 44: NFStest 3.2-16.fc44 Β· GPL-2.0-or-later
- ubuntu noble: nfstest 3.2-2
- ubuntu questing: nfstest 3.2-3
- ubuntu resolute: nfstest 3.2-3build1
- ubuntu stonking: nfstest 3.2-5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms