(self)
return DNSRecord(DNSHeader(id=self.header.id,
                                   bitmap=self.header.bitmap,
                                   tc=1))
Return truncated copy of DNSRecord (with TC flag set)
            (removes all Questions & RRs and just returns header)
            
            >>> q = DNSRecord.question("abc.com")
            >>> a = q.reply()
            >>> a.add_answer(*RR.fromZone('abc.com IN TXT %s' % ('x' * 255)))
            >>> a.add_answer(*RR.fromZone('abc.com IN TXT %s' % ('x' * 255)))
            >>> a.add_answer(*RR.fromZone('abc.com IN TXT %s' % ('x' * 255)))
            >>> len(a.pack())
            829
            >>> t = a.truncate()
            >>> print(t)
            ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: ...
            ;; flags: qr aa tc rd ra; QUERY: 0, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
Return truncated copy of DNSRecord (with TC flag set)
            (removes all Questions & RRs and just returns header)
            
            >>> q = DNSRecord.question("abc.com")
            >>> a = q.reply()
            >>> a.add_answer(*RR.fromZone('abc.com IN TXT %s' % ('x' * 255)))
            >>> a.add_answer(*RR.fromZone('abc.com IN TXT %s' % ('x' * 255)))
            >>> a.add_answer(*RR.fromZone('abc.com IN TXT %s' % ('x' * 255)))
            >>> len(a.pack())
            829
            >>> t = a.truncate()
            >>> print(t)
            ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: ...
            ;; flags: qr aa tc rd ra; QUERY: 0, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
Return truncated copy of DNSRecord ( with TC flag set ) ( removes all Questions & RRs and just returns header ) >>> q = DNSRecord . question ( abc . com ) >>> a = q . reply () >>> a . add_answer ( * RR . fromZone ( abc . com IN TXT %s % ( x * 255 ))) >>> a . add_answer ( * RR . fromZone ( abc . com IN TXT %s % ( x * 255 ))) >>> a . add_answer ( * RR . fromZone ( abc . com IN TXT %s % ( x * 255 ))) >>> len ( a . pack () ) 829 >>> t = a . truncate () >>> print ( t ) ;; - >> HEADER<< - opcode : QUERY status : NOERROR id : ... ;; flags : qr aa tc rd ra ; QUERY : 0 ANSWER : 0 AUTHORITY : 0 ADDITIONAL : 0
def truncate(self):
        """
            Return truncated copy of DNSRecord (with TC flag set)
            (removes all Questions & RRs and just returns header)
            
            >>> q = DNSRecord.question("abc.com")
            >>> a = q.reply()
            >>> a.add_answer(*RR.fromZone('abc.com IN TXT %s' % ('x' * 255)))
            >>> a.add_answer(*RR.fromZone('abc.com IN TXT %s' % ('x' * 255)))
            >>> a.add_answer(*RR.fromZone('abc.com IN TXT %s' % ('x' * 255)))
            >>> len(a.pack())
            829
            >>> t = a.truncate()
            >>> print(t)
            ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: ...
            ;; flags: qr aa tc rd ra; QUERY: 0, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

        """
        return DNSRecord(DNSHeader(id=self.header.id,
                                   bitmap=self.header.bitmap,
                                   tc=1))
def truncate ( self ) : return DNSRecord ( DNSHeader ( id = self . header . id , bitmap = self . header . bitmap , tc = 1 ) )