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

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

	in := int(n)
	if *pos+in > len(b) {
		return fmt.Errorf("(*rr.NSEC3).Decode() - buffer underflow")
	}

	rd.NextHashedOwnerName = append([]byte{}, b[*pos:*pos+in]...)
	*pos = *pos + in

	// here we (have to) rely on b being sliced exactly at the end of the wire format packet
	end := len(b)
	rd.TypeBitMaps = append([]byte{}, b[*pos:end]...)
	*pos = end
	if sniffer != nil {
		sniffer(p0, &b[*pos-1], dns.SniffRDataNSEC3, rd)
	}
	return
}
// Implementation of dns.Wirer
Implementation of dns.Wirer
// Implementation of dns . Wirer
func (rd *NSEC3) Decode(b []byte, pos *int, sniffer dns.WireDecodeSniffer) (err error) {
	p0 := &b[*pos]
	if err = rd.NSEC3PARAM.Decode(b, pos, sniffer); err != nil {
		return
	}
	var n dns.Octets2
	if err = n.Decode(b, pos, sniffer); err != nil {
		return
	}
	in := int(n)
	if *pos+in > len(b) {
		return fmt.Errorf("(*rr.NSEC3).Decode() - buffer underflow")
	}
	rd.NextHashedOwnerName = append([]byte{}, b[*pos:*pos+in]...)
	*pos = *pos + in
	end := len(b)
	rd.TypeBitMaps = append([]byte{}, b[*pos:end]...)
	*pos = end
	if sniffer != nil {
		sniffer(p0, &b[*pos-1], dns.SniffRDataNSEC3, rd)
	}
	return
}
func ( rd * NSEC3 ) Decode ( b [ ] byte , pos * int , sniffer dns . WireDecodeSniffer ) ( err error ) { p0 := & b [ * pos ] if err = rd . NSEC3PARAM . Decode ( b , pos , sniffer ) ; err != nil { return } var n dns . Octets2 if err = n . Decode ( b , pos , sniffer ) ; err != nil { return } in := int ( n ) if * pos + in > len ( b ) { return fmt . Errorf ( " " ) } rd . NextHashedOwnerName = append ( [ ] byte { } , b [ * pos : * pos + in ] ... ) * pos = * pos + in end := len ( b ) rd . TypeBitMaps = append ( [ ] byte { } , b [ * pos : end ] ... ) * pos = end if sniffer != nil { sniffer ( p0 , & b [ * pos - 1 ] , dns . SniffRDataNSEC3 , rd ) } return }
Implementation of dns.Wirer
Implementation of dns . Wirer
// here we (have to) rely on b being sliced exactly at the end of the wire format packet