logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

packet.application.dns - DNS module

Author

       Jorge Mora (mora@netapp.com)

NFStest 3.2                                       21 March 2023                                           DNS(3)

Bugs

       No known bugs.

Classes

classDNS(baseobj.BaseObj)
       DNS object

       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
       )

       Methodsdefinedhere:
       ---------------------

       __bool__(self)
       Truth value testing for the built-in operation bool()

       __init__(self,pktt,proto)
       Constructor

       Initialize object's private data.

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

              proto: Transport layer protocol.

   classOption(baseobj.BaseObj)
       Option object

   classQuery(baseobj.BaseObj)
       Query object

   classResource(baseobj.BaseObj)
       Resource object

   classdns_algorithm(packet.utils.Enum)
       enum dns_algorithm

   classdns_class(packet.utils.Enum)
       enum dns_class

   classdns_fptype(packet.utils.Enum)
       enum dns_fptype

   classdns_opcode(packet.utils.Enum)
       enum dns_opcode

   classdns_query(packet.utils.Enum)
       enum dns_query

   classdns_rcode(packet.utils.Enum)
       enum dns_rcode

   classdns_type(packet.utils.Enum)
       enum dns_type

Description

       Decode DNS layer.

       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

Name

       packet.application.dns - DNS module

See Also

baseobj(3),packet.application.dns_const(3),packet.internet.ipv6addr(3),packet.unpack(3),packet.utils(3)

See Also