mirror of
https://github.com/golang/net.git
synced 2026-03-31 18:37:08 +09:00
Instead of duplicating the logic for cmsg alignment, use CmsgLen and CmsgSpace from golang.org/x/sys/unix. Moreover, this should simplify adding new ports. Change-Id: Ic3ac9cf14781eff5b8e4f34bfd2b1c8bd3b69341 Reviewed-on: https://go-review.googlesource.com/c/net/+/259058 Trust: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matt Layher <mdlayher@gmail.com>
57 lines
833 B
Go
57 lines
833 B
Go
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
|
// cgo -godefs defs_linux.go
|
|
|
|
package socket
|
|
|
|
type iovec struct {
|
|
Base *byte
|
|
Len uint64
|
|
}
|
|
|
|
type msghdr struct {
|
|
Name *byte
|
|
Namelen uint32
|
|
Pad_cgo_0 [4]byte
|
|
Iov *iovec
|
|
Iovlen uint64
|
|
Control *byte
|
|
Controllen uint64
|
|
Flags int32
|
|
Pad_cgo_1 [4]byte
|
|
}
|
|
|
|
type mmsghdr struct {
|
|
Hdr msghdr
|
|
Len uint32
|
|
Pad_cgo_0 [4]byte
|
|
}
|
|
|
|
type cmsghdr struct {
|
|
Len uint64
|
|
Level int32
|
|
Type int32
|
|
}
|
|
|
|
type sockaddrInet struct {
|
|
Family uint16
|
|
Port uint16
|
|
Addr [4]byte /* in_addr */
|
|
X__pad [8]uint8
|
|
}
|
|
|
|
type sockaddrInet6 struct {
|
|
Family uint16
|
|
Port uint16
|
|
Flowinfo uint32
|
|
Addr [16]byte /* in6_addr */
|
|
Scope_id uint32
|
|
}
|
|
|
|
const (
|
|
sizeofIovec = 0x10
|
|
sizeofMsghdr = 0x38
|
|
|
|
sizeofSockaddrInet = 0x10
|
|
sizeofSockaddrInet6 = 0x1c
|
|
)
|