net_bsd.go 692 Bytes
Newer Older
Juan Batiz-Benet's avatar
Juan Batiz-Benet committed
1 2 3 4 5
// +build darwin dragonfly freebsd netbsd openbsd

package sockaddrnet

import (
Steven Allen's avatar
Steven Allen committed
6
	"golang.org/x/sys/unix"
Juan Batiz-Benet's avatar
Juan Batiz-Benet committed
7 8 9
)

const (
Steven Allen's avatar
Steven Allen committed
10 11 12 13
	AF_INET   = unix.AF_INET
	AF_INET6  = unix.AF_INET6
	AF_UNIX   = unix.AF_UNIX
	AF_UNSPEC = unix.AF_UNSPEC
Juan Batiz-Benet's avatar
Juan Batiz-Benet committed
14

Steven Allen's avatar
Steven Allen committed
15 16 17 18 19
	IPPROTO_IP   = unix.IPPROTO_IP
	IPPROTO_IPV4 = unix.IPPROTO_IPV4
	IPPROTO_IPV6 = unix.IPPROTO_IPV6
	IPPROTO_TCP  = unix.IPPROTO_TCP
	IPPROTO_UDP  = unix.IPPROTO_UDP
Juan Batiz-Benet's avatar
Juan Batiz-Benet committed
20

Steven Allen's avatar
Steven Allen committed
21 22 23
	SOCK_DGRAM     = unix.SOCK_DGRAM
	SOCK_STREAM    = unix.SOCK_STREAM
	SOCK_SEQPACKET = unix.SOCK_SEQPACKET
Juan Batiz-Benet's avatar
Juan Batiz-Benet committed
24
)
Steven Allen's avatar
Steven Allen committed
25 26 27 28 29 30

type Sockaddr = unix.Sockaddr
type SockaddrInet4 = unix.SockaddrInet4
type SockaddrInet6 = unix.SockaddrInet6
type SockaddrUnix = unix.SockaddrUnix
type RawSockaddrAny = unix.RawSockaddrAny