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

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

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

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

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

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

	if sniffer != nil {
		sniffer(p0, &b[*pos-1], dns.SniffRDataNAPTR, rd)
	}
	return
}
// Implementation of dns.Wirer
Implementation of dns.Wirer
// Implementation of dns . Wirer
func (rd *NAPTR) Decode(b []byte, pos *int, sniffer dns.WireDecodeSniffer) (err error) {
	p0 := &b[*pos]
	if err = (*dns.Octets2)(&rd.Order).Decode(b, pos, sniffer); err != nil {
		return
	}
	if err = (*dns.Octets2)(&rd.Preference).Decode(b, pos, sniffer); err != nil {
		return
	}
	if err = (*dns.CharString)(&rd.Flags).Decode(b, pos, sniffer); err != nil {
		return
	}
	if err = (*dns.CharString)(&rd.Services).Decode(b, pos, sniffer); err != nil {
		return
	}
	if err = (*dns.CharString)(&rd.Regexp).Decode(b, pos, sniffer); err != nil {
		return
	}
	if err = (*dns.DomainName)(&rd.Replacement).Decode(b, pos, sniffer); err != nil {
		return
	}
	if sniffer != nil {
		sniffer(p0, &b[*pos-1], dns.SniffRDataNAPTR, rd)
	}
	return
}
func ( rd * NAPTR ) Decode ( b [ ] byte , pos * int , sniffer dns . WireDecodeSniffer ) ( err error ) { p0 := & b [ * pos ] if err = ( * dns . Octets2 ) ( & rd . Order ) . Decode ( b , pos , sniffer ) ; err != nil { return } if err = ( * dns . Octets2 ) ( & rd . Preference ) . Decode ( b , pos , sniffer ) ; err != nil { return } if err = ( * dns . CharString ) ( & rd . Flags ) . Decode ( b , pos , sniffer ) ; err != nil { return } if err = ( * dns . CharString ) ( & rd . Services ) . Decode ( b , pos , sniffer ) ; err != nil { return } if err = ( * dns . CharString ) ( & rd . Regexp ) . Decode ( b , pos , sniffer ) ; err != nil { return } if err = ( * dns . DomainName ) ( & rd . Replacement ) . Decode ( b , pos , sniffer ) ; err != nil { return } if sniffer != nil { sniffer ( p0 , & b [ * pos - 1 ] , dns . SniffRDataNAPTR , rd ) } return }
Implementation of dns.Wirer
Implementation of dns . Wirer