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