'Set the rcode.
@param rcode: the rcode
@type rcode: int'

def set_rcode(self, rcode):

    (value, evalue) = dns.rcode.to_flags(rcode)
    self.flags &= 65520
    self.flags |= value
    self.ednsflags &= long(16777215)
    self.ednsflags |= evalue
    if ((self.ednsflags != 0) and (self.edns < 0)):
        self.edns = 0
