Source file
src/syscall/net_fake.go
1
2
3
4
5
6
7
8
9
10 package syscall
11
12 const (
13 AF_UNSPEC = iota
14 AF_UNIX
15 AF_INET
16 AF_INET6
17 )
18
19 const (
20 SOCK_STREAM = 1 + iota
21 SOCK_DGRAM
22 SOCK_RAW
23 SOCK_SEQPACKET
24 )
25
26 const (
27 IPPROTO_IP = 0
28 IPPROTO_IPV4 = 4
29 IPPROTO_IPV6 = 0x29
30 IPPROTO_TCP = 6
31 IPPROTO_UDP = 0x11
32 )
33
34 const (
35 _ = iota
36 IPV6_V6ONLY
37 SOMAXCONN
38 SO_ERROR
39 )
40
41
42 const (
43 _ = iota
44 F_DUPFD_CLOEXEC
45 SYS_FCNTL = 500
46 )
47
48 type Sockaddr any
49
50 type SockaddrInet4 struct {
51 Port int
52 Addr [4]byte
53 }
54
55 type SockaddrInet6 struct {
56 Port int
57 ZoneId uint32
58 Addr [16]byte
59 }
60
61 type SockaddrUnix struct {
62 Name string
63 }
64
View as plain text