Set the opcode. *opcode*, a ``dns.opcode.Opcode``, is the opcode to set.
(self, opcode: dns.opcode.Opcode)
| 919 | return dns.opcode.from_flags(int(self.flags)) |
| 920 | |
| 921 | def set_opcode(self, opcode: dns.opcode.Opcode) -> None: |
| 922 | """Set the opcode. |
| 923 | |
| 924 | *opcode*, a ``dns.opcode.Opcode``, is the opcode to set. |
| 925 | """ |
| 926 | self.flags &= 0x87FF |
| 927 | self.flags |= dns.opcode.to_flags(opcode) |
| 928 | |
| 929 | def get_options(self, otype: dns.edns.OptionType) -> List[dns.edns.Option]: |
| 930 | """Return the list of options of the specified type.""" |
no outgoing calls