OSDN Git Service

new repo
[bytom/vapor.git] / vendor / golang.org / x / net / internal / socket / sys_stub.go
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.
4
5 // +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
6
7 package socket
8
9 import (
10         "errors"
11         "net"
12         "runtime"
13         "unsafe"
14 )
15
16 const (
17         sysAF_UNSPEC = 0x0
18         sysAF_INET   = 0x2
19         sysAF_INET6  = 0xa
20
21         sysSOCK_RAW = 0x3
22 )
23
24 func probeProtocolStack() int {
25         switch runtime.GOARCH {
26         case "amd64p32", "mips64p32":
27                 return 4
28         default:
29                 var p uintptr
30                 return int(unsafe.Sizeof(p))
31         }
32 }
33
34 func marshalInetAddr(ip net.IP, port int, zone string) []byte {
35         return nil
36 }
37
38 func parseInetAddr(b []byte, network string) (net.Addr, error) {
39         return nil, errors.New("not implemented")
40 }
41
42 func getsockopt(s uintptr, level, name int, b []byte) (int, error) {
43         return 0, errors.New("not implemented")
44 }
45
46 func setsockopt(s uintptr, level, name int, b []byte) error {
47         return errors.New("not implemented")
48 }
49
50 func recvmsg(s uintptr, h *msghdr, flags int) (int, error) {
51         return 0, errors.New("not implemented")
52 }
53
54 func sendmsg(s uintptr, h *msghdr, flags int) (int, error) {
55         return 0, errors.New("not implemented")
56 }
57
58 func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
59         return 0, errors.New("not implemented")
60 }
61
62 func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
63         return 0, errors.New("not implemented")
64 }