1 // Copyright 2017 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 // +build darwin dragonfly freebsd netbsd openbsd
11 func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) {
17 h.Control = (*byte)(unsafe.Pointer(&oob[0]))
18 h.Controllen = uint32(len(oob))
21 h.Name = (*byte)(unsafe.Pointer(&sa[0]))
22 h.Namelen = uint32(len(sa))
26 func (h *msghdr) name() []byte {
27 if h.Name != nil && h.Namelen > 0 {
28 return (*[sizeofSockaddrInet6]byte)(unsafe.Pointer(h.Name))[:h.Namelen]
33 func (h *msghdr) controllen() int {
34 return int(h.Controllen)
37 func (h *msghdr) flags() int {