/usr/share/gocode/src/github.com/linuxkit/virtsock/pkg/hvsock/hvsock_fallback.go is in golang-github-linuxkit-virtsock-dev 0.0~git20170720.0.0416e3d-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | // +build !linux,!windows
package hvsock
import (
"errors"
"time"
)
const (
sysAF_HYPERV = 42
sysSHV_PROTO_RAW = 1
)
type hvsockListener struct {
acceptFD int
laddr HypervAddr
}
//
// System call wrapper
//
func hvsocket(typ, proto int) (int, error) {
return 0, errors.New("hvsocket() not implemented")
}
func connect(s int, a *HypervAddr) (err error) {
return errors.New("connect() not implemented")
}
func bind(s int, a HypervAddr) error {
return errors.New("bind() not implemented")
}
func accept(s int, a *HypervAddr) (int, error) {
return 0, errors.New("accept() not implemented")
}
type hvsockConn struct {
fd int
local HypervAddr
remote HypervAddr
}
func newHVsockConn(fd int, local HypervAddr, remote HypervAddr) (*HVsockConn, error) {
v := &hvsockConn{local: local, remote: remote}
return &HVsockConn{hvsockConn: *v}, errors.New("newHVsockConn() not implemented")
}
func (v *HVsockConn) close() error {
return errors.New("close() not implemented")
}
func (v *HVsockConn) read(buf []byte) (int, error) {
return 0, errors.New("read() not implemented")
}
func (v *HVsockConn) write(buf []byte) (int, error) {
return 0, errors.New("write() not implemented")
}
// SetReadDeadline dummy doc to silence lint
func (v *HVsockConn) SetReadDeadline(t time.Time) error {
return nil // FIXME
}
// SetWriteDeadline dummy doc to silence lint
func (v *HVsockConn) SetWriteDeadline(t time.Time) error {
return nil // FIXME
}
// SetDeadline dummy doc to silence lint
func (v *HVsockConn) SetDeadline(t time.Time) error {
return nil // FIXME
}
|