MCPcopy Create free account
hub / github.com/rthalley/dnspython / add_question

Method add_question

dns/renderer.py:169–176  ·  view source on GitHub ↗

Add a question to the message.

(self, qname, rdtype, rdclass=dns.rdataclass.IN)

Source from the content-addressed store, hash-verified

167 self.output.seek(current)
168
169 def add_question(self, qname, rdtype, rdclass=dns.rdataclass.IN):
170 """Add a question to the message."""
171
172 self._set_section(QUESTION)
173 with self._track_size():
174 qname.to_wire(self.output, self.compress, self.origin)
175 self.output.write(struct.pack("!HH", rdtype, rdclass))
176 self.counts[QUESTION] += 1
177
178 def add_rrset(self, section, rrset, **kw):
179 """Add the rrset to the specified section.

Callers 5

to_wireMethod · 0.95
test_basicMethod · 0.95
test_tsigMethod · 0.95
test_multi_tsigMethod · 0.95

Calls 4

_set_sectionMethod · 0.95
_track_sizeMethod · 0.95
to_wireMethod · 0.45
writeMethod · 0.45

Tested by 4

test_basicMethod · 0.76
test_tsigMethod · 0.76
test_multi_tsigMethod · 0.76