Home | Trees | Index | Help |
|
---|
Package dns :: Module message |
|
Classes | |
---|---|
Message |
A DNS message. |
_TextReader |
Text format reader. |
_WireReader |
Wire format reader. |
Exceptions | |
---|---|
BadEDNS |
Raised if an OPT record occurs somewhere other than the start of the additional data section. |
BadTSIG |
Raised if a TSIG record occurs somewhere other than the end of the additional data section. |
ShortHeader |
Raised if the DNS packet passed to from_wire() is too short. |
TrailingJunk |
Raised if the DNS packet passed to from_wire() has extra junk at the end of it. |
UnknownHeaderField |
Raised if a header field name is not recognized when converting from text into a message. |
UnknownTSIGKey |
Raised if we got a TSIG but don't know the key. |
Function Summary | |
---|---|
dns.message.Message object |
Read the next text format message from the specified file. |
dns.message.Message object |
Convert the text format message into a message object. |
dns.message.Message object |
Convert a DNS wire format message into a message object. |
dns.message.Message object |
Make a query message. |
dns.message.Message object |
Make a message which is a response for the specified query. |
Function Details |
---|
from_file(f)Read the next text format message from the specified file.
|
from_text(text)Convert the text format message into a message object.
|
from_wire(wire, keyring=None, request_mac='', xfr=False, origin=None, tsig_ctx=None, multi=False, first=True, question_only=False)Convert a DNS wire format message into a message object.
|
make_query(qname, rdtype, rdclass=1, use_edns=None, want_dnssec=False)Make a query message. The query name, type, and class may all be specified either as objects of the appropriate type, or as strings. The query will have a randomly choosen query id, and its DNS flags will be set to dns.flags.RD.
|
make_response(query, recursion_available=False, our_payload=8192)Make a message which is a response for the specified query. The message returned is really a response skeleton; it has all of the infrastructure required of a response, but none of the content. The response's question section is a shallow copy of the query's question section, so the query's question RRsets should not be changed.
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sun Nov 25 17:43:04 2007 | http://epydoc.sf.net |