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

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

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

	rd.Certificate = nil
	if *pos < len(b)-1 {
		rd.Certificate = make([]byte, len(b[*pos:]))
		copy(rd.Certificate, b[*pos:])
		*pos = len(b)
	}

	if sniffer != nil {
		sniffer(p0, &b[*pos-1], dns.SniffRDataTLSA, rd)
	}
	return
}
// Implementation of dns.Wirer
Implementation of dns.Wirer
// Implementation of dns . Wirer
func (rd *TLSA) Decode(b []byte, pos *int, sniffer dns.WireDecodeSniffer) (err error) {
	p0 := &b[*pos]
	if err = (*dns.Octet)(&rd.Usage).Decode(b, pos, sniffer); err != nil {
		return
	}
	if err = (*dns.Octet)(&rd.Selector).Decode(b, pos, sniffer); err != nil {
		return
	}
	if err = (*dns.Octet)(&rd.MatchingType).Decode(b, pos, sniffer); err != nil {
		return
	}
	rd.Certificate = nil
	if *pos < len(b)-1 {
		rd.Certificate = make([]byte, len(b[*pos:]))
		copy(rd.Certificate, b[*pos:])
		*pos = len(b)
	}
	if sniffer != nil {
		sniffer(p0, &b[*pos-1], dns.SniffRDataTLSA, rd)
	}
	return
}
func ( rd * TLSA ) Decode ( b [ ] byte , pos * int , sniffer dns . WireDecodeSniffer ) ( err error ) { p0 := & b [ * pos ] if err = ( * dns . Octet ) ( & rd . Usage ) . Decode ( b , pos , sniffer ) ; err != nil { return } if err = ( * dns . Octet ) ( & rd . Selector ) . Decode ( b , pos , sniffer ) ; err != nil { return } if err = ( * dns . Octet ) ( & rd . MatchingType ) . Decode ( b , pos , sniffer ) ; err != nil { return } rd . Certificate = nil if * pos < len ( b ) - 1 { rd . Certificate = make ( [ ] byte , len ( b [ * pos : ] ) ) copy ( rd . Certificate , b [ * pos : ] ) * pos = len ( b ) } if sniffer != nil { sniffer ( p0 , & b [ * pos - 1 ] , dns . SniffRDataTLSA , rd ) } return }
Implementation of dns.Wirer
Implementation of dns . Wirer