// GetPayloadBytes returns the bytes from the packet's payload.  This is a Go
// slice backed by the C bytes.  The result is that the Go slice uses very
// little extra memory.
GetPayloadBytes returns the bytes from the packet's payload.  This is a Go
slice backed by the C bytes.  The result is that the Go slice uses very
little extra memory.
// GetPayloadBytes returns the bytes from the packet ' s payload . This is a Go // slice backed by the C bytes . The result is that the Go slice uses very // little extra memory .
func (h *UdpHdr) GetPayloadBytes(pl uint16) []byte {
	l := int(h.PayloadLen(pl))
	if l <= 0 {
		return []byte{}
	}
	var b []byte
	sh := (*reflect.SliceHeader)((unsafe.Pointer(&b)))
	sh.Cap = l
	sh.Len = l
	sh.Data = uintptr(h.payload)
	return b
}
func ( h * UdpHdr ) GetPayloadBytes ( pl uint16 ) [ ] byte { l := int ( h . PayloadLen ( pl ) ) if l <= 0 { return [ ] byte { } } var b [ ] byte sh := ( * reflect . SliceHeader ) ( ( unsafe . Pointer ( & b ) ) ) sh . Cap = l sh . Len = l sh . Data = uintptr ( h . payload ) return b }
GetPayloadBytes returns the bytes from the packet's payload.
GetPayloadBytes returns the bytes from the packet ' s payload .