func (rd *RRSIG) Decode(b []byte, pos *int, sniffer dns.WireDecodeSniffer) (err error) {
	p0 := &b[*pos]
	if err = (*dns.Octets2)(&rd.Type).Decode(b, pos, sniffer); err != nil {
		return
	}

	if err = (*dns.Octet)(&rd.Algorithm).Decode(b, pos, sniffer); err != nil {
		return
	}

	if err = (*dns.Octet)(&rd.Labels).Decode(b, pos, sniffer); err != nil {
		return
	}

	var ttl dns.Octets4
	if err = ttl.Decode(b, pos, sniffer); err != nil {
		return
	}

	rd.TTL = int32(ttl)

	if err = (*dns.Octets4)(&rd.Expiration).Decode(b, pos, sniffer); err != nil {
		return
	}

	if err = (*dns.Octets4)(&rd.Inception).Decode(b, pos, sniffer); err != nil {
		return
	}

	if err = (*dns.Octets2)(&rd.KeyTag).Decode(b, pos, sniffer); err != nil {
		return
	}

	if err = (*dns.DomainName)(&rd.Name).Decode(b, pos, sniffer); err != nil {
		return
	}

	n := len(b) - *pos
	if n <= 0 {
		return fmt.Errorf("(*RRSIG).Decode: no signature data")
	}

	rd.Signature = make([]byte, n)
	copy(rd.Signature, b[*pos:])
	*pos += n
	if sniffer != nil {
		sniffer(p0, &b[*pos-1], dns.SniffRDataRRSIG, rd)
	}
	return
}
// Implementation of dns.Wirer
Implementation of dns.Wirer
// Implementation of dns . Wirer
func (rd *RRSIG) Decode(b []byte, pos *int, sniffer dns.WireDecodeSniffer) (err error) {
	p0 := &b[*pos]
	if err = (*dns.Octets2)(&rd.Type).Decode(b, pos, sniffer); err != nil {
		return
	}
	if err = (*dns.Octet)(&rd.Algorithm).Decode(b, pos, sniffer); err != nil {
		return
	}
	if err = (*dns.Octet)(&rd.Labels).Decode(b, pos, sniffer); err != nil {
		return
	}
	var ttl dns.Octets4
	if err = ttl.Decode(b, pos, sniffer); err != nil {
		return
	}
	rd.TTL = int32(ttl)
	if err = (*dns.Octets4)(&rd.Expiration).Decode(b, pos, sniffer); err != nil {
		return
	}
	if err = (*dns.Octets4)(&rd.Inception).Decode(b, pos, sniffer); err != nil {
		return
	}
	if err = (*dns.Octets2)(&rd.KeyTag).Decode(b, pos, sniffer); err != nil {
		return
	}
	if err = (*dns.DomainName)(&rd.Name).Decode(b, pos, sniffer); err != nil {
		return
	}
	n := len(b) - *pos
	if n <= 0 {
		return fmt.Errorf("(*RRSIG).Decode: no signature data")
	}
	rd.Signature = make([]byte, n)
	copy(rd.Signature, b[*pos:])
	*pos += n
	if sniffer != nil {
		sniffer(p0, &b[*pos-1], dns.SniffRDataRRSIG, rd)
	}
	return
}
func ( rd * RRSIG ) Decode ( b [ ] byte , pos * int , sniffer dns . WireDecodeSniffer ) ( err error ) { p0 := & b [ * pos ] if err = ( * dns . Octets2 ) ( & rd . Type ) . Decode ( b , pos , sniffer ) ; err != nil { return } if err = ( * dns . Octet ) ( & rd . Algorithm ) . Decode ( b , pos , sniffer ) ; err != nil { return } if err = ( * dns . Octet ) ( & rd . Labels ) . Decode ( b , pos , sniffer ) ; err != nil { return } var ttl dns . Octets4 if err = ttl . Decode ( b , pos , sniffer ) ; err != nil { return } rd . TTL = int32 ( ttl ) if err = ( * dns . Octets4 ) ( & rd . Expiration ) . Decode ( b , pos , sniffer ) ; err != nil { return } if err = ( * dns . Octets4 ) ( & rd . Inception ) . Decode ( b , pos , sniffer ) ; err != nil { return } if err = ( * dns . Octets2 ) ( & rd . KeyTag ) . Decode ( b , pos , sniffer ) ; err != nil { return } if err = ( * dns . DomainName ) ( & rd . Name ) . Decode ( b , pos , sniffer ) ; err != nil { return } n := len ( b ) - * pos if n <= 0 { return fmt . Errorf ( " " ) } rd . Signature = make ( [ ] byte , n ) copy ( rd . Signature , b [ * pos : ] ) * pos += n if sniffer != nil { sniffer ( p0 , & b [ * pos - 1 ] , dns . SniffRDataRRSIG , rd ) } return }
Implementation of dns.Wirer
Implementation of dns . Wirer