// With an unsafe.Pointer to the block of C memory NewUdpHdr returns a filled in UdpHdr struct.
With an unsafe.Pointer to the block of C memory NewUdpHdr returns a filled in UdpHdr struct.
// With an unsafe . Pointer to the block of C memory NewUdpHdr returns a filled in UdpHdr struct .
func NewUdpHdr(p unsafe.Pointer) (*UdpHdr, unsafe.Pointer) {
	udpHead := &UdpHdr{
		cptr: (*C.struct_udphdr)(p),
	}
	udpHead.Source = uint16(C.udphdr_source_ntohs(udpHead.cptr))
	udpHead.Dest = uint16(C.udphdr_dest_ntohs(udpHead.cptr))
	udpHead.Len = uint16(C.udphdr_len_ntohs(udpHead.cptr))
	udpHead.Check = uint16(C.udphdr_check_ntohs(udpHead.cptr))
	udpHead.payload = unsafe.Pointer(uintptr(p) + 8)
	return udpHead, udpHead.payload
}
func NewUdpHdr ( p unsafe . Pointer ) ( * UdpHdr , unsafe . Pointer ) { udpHead := & UdpHdr { cptr : ( * C . struct_udphdr ) ( p ) , } udpHead . Source = uint16 ( C . udphdr_source_ntohs ( udpHead . cptr ) ) udpHead . Dest = uint16 ( C . udphdr_dest_ntohs ( udpHead . cptr ) ) udpHead . Len = uint16 ( C . udphdr_len_ntohs ( udpHead . cptr ) ) udpHead . Check = uint16 ( C . udphdr_check_ntohs ( udpHead . cptr ) ) udpHead . payload = unsafe . Pointer ( uintptr ( p ) + 8 ) return udpHead , udpHead . payload }
With an unsafe.Pointer to the block of C memory NewUdpHdr returns a filled in UdpHdr struct.
With an unsafe . Pointer to the block of C memory NewUdpHdr returns a filled in UdpHdr struct .