Type: feature
Change-Id: I0bc51288bc63a0583b98314e4e2a62383b0d6e43
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
return fmt.Errorf("Failed to create UNIX domain socket")
}
usa := &syscall.SockaddrUnix{Name: socket.filename}
-
// Bind to address and start listening
err = syscall.SetsockoptInt(fd, syscall.SOL_SOCKET, syscall.SO_PASSCRED, 1)
if err != nil {
init := MsgInit{
Version: Version,
Id: cc.i.args.Id,
- Mode: interfaceModeEthernet,
+ Mode: cc.i.args.Mode,
}
copy(init.Name[:], []byte(cc.socket.appName))
type Arguments struct {
Id uint32 // Interface identifier unique across socket. Used to identify peer interface when connecting
IsMaster bool // Interface role master/slave
+ Mode interfaceMode
Name string
Secret [24]byte // optional parameter, secrets of the interfaces must match if they are to connect
MemoryConfig MemoryConfig
type interfaceMode uint8
const (
- interfaceModeEthernet interfaceMode = iota
- interfaceModeIp
- interfaceModePuntInject
+ InterfaceModeEthernet interfaceMode = iota
+ InterfaceModeIp
+ InterfaceModePuntInject
)
const msgSize = 128