DNS

Section: dns 1.0 (3)
Updated: 19 July 2021
Index Return to Main Contents
 

NAME

packet.application.dns - DNS module  

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  

CLASSES

 

class DNS(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
)


Methods defined here:
---------------------

__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.
 

class Option(baseobj.BaseObj)

Option object

 

class Query(baseobj.BaseObj)

Query object

 

class Resource(baseobj.BaseObj)

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

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

 

BUGS

No known bugs.  

AUTHOR

Jorge Mora (mora@netapp.com)


 

Index

NAME
DESCRIPTION
CLASSES
class DNS(baseobj.BaseObj)
class Option(baseobj.BaseObj)
class Query(baseobj.BaseObj)
class Resource(baseobj.BaseObj)
class dns_algorithm(packet.utils.Enum)
class dns_class(packet.utils.Enum)
class dns_fptype(packet.utils.Enum)
class dns_opcode(packet.utils.Enum)
class dns_query(packet.utils.Enum)
class dns_rcode(packet.utils.Enum)
class dns_type(packet.utils.Enum)
SEE ALSO
BUGS
AUTHOR

This document was created by man2html, using the manual pages.
Time: 16:08:34 GMT, July 19, 2021