Add a question to the message.
(self, qname, rdtype, rdclass=dns.rdataclass.IN)
| 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. |