func (rd *NSEC3PARAM) Decode(b []byte, pos *int, sniffer dns.WireDecodeSniffer) (err error) {
	p0 := &b[*pos]
	if err = (*dns.Octet)(&rd.HashAlgorithm).Decode(b, pos, sniffer); err != nil {
		return
	}
	if err = (*dns.Octet)(&rd.Flags).Decode(b, pos, sniffer); err != nil {
		return
	}
	if err = (*dns.Octets2)(&rd.Iterations).Decode(b, pos, sniffer); err != nil {
		return
	}
	var n byte
	if err = (*dns.Octet)(&n).Decode(b, pos, sniffer); err != nil {
		return
	}
	p := *pos
	next := p + int(n)
	if next > len(b) {
		return fmt.Errorf("(*rr.NSEC3PARAM).Decode() - buffer underflow")
	}
	rd.Salt = append([]byte{}, b[p:next]...)
	*pos = next
	if sniffer != nil {
		sniffer(p0, &b[*pos-1], dns.SniffRDataNSEC3PARAM, rd)
	}
	return
}
// Implementation of dns.Wirer
Implementation of dns.Wirer
// Implementation of dns . Wirer
func (rd *NSEC3PARAM) Decode(b []byte, pos *int, sniffer dns.WireDecodeSniffer) (err error) {
	p0 := &b[*pos]
	if err = (*dns.Octet)(&rd.HashAlgorithm).Decode(b, pos, sniffer); err != nil {
		return
	}
	if err = (*dns.Octet)(&rd.Flags).Decode(b, pos, sniffer); err != nil {
		return
	}
	if err = (*dns.Octets2)(&rd.Iterations).Decode(b, pos, sniffer); err != nil {
		return
	}
	var n byte
	if err = (*dns.Octet)(&n).Decode(b, pos, sniffer); err != nil {
		return
	}
	p := *pos
	next := p + int(n)
	if next > len(b) {
		return fmt.Errorf("(*rr.NSEC3PARAM).Decode() - buffer underflow")
	}
	rd.Salt = append([]byte{}, b[p:next]...)
	*pos = next
	if sniffer != nil {
		sniffer(p0, &b[*pos-1], dns.SniffRDataNSEC3PARAM, rd)
	}
	return
}
func ( rd * NSEC3PARAM ) Decode ( b [ ] byte , pos * int , sniffer dns . WireDecodeSniffer ) ( err error ) { p0 := & b [ * pos ] if err = ( * dns . Octet ) ( & rd . HashAlgorithm ) . Decode ( b , pos , sniffer ) ; err != nil { return } if err = ( * dns . Octet ) ( & rd . Flags ) . Decode ( b , pos , sniffer ) ; err != nil { return } if err = ( * dns . Octets2 ) ( & rd . Iterations ) . Decode ( b , pos , sniffer ) ; err != nil { return } var n byte if err = ( * dns . Octet ) ( & n ) . Decode ( b , pos , sniffer ) ; err != nil { return } p := * pos next := p + int ( n ) if next > len ( b ) { return fmt . Errorf ( " " ) } rd . Salt = append ( [ ] byte { } , b [ p : next ] ... ) * pos = next if sniffer != nil { sniffer ( p0 , & b [ * pos - 1 ] , dns . SniffRDataNSEC3PARAM , rd ) } return }
Implementation of dns.Wirer
Implementation of dns . Wirer