This commit is contained in:
Adam Ierymenko 2019-09-20 21:00:54 -07:00
commit fbf74d3baa
No known key found for this signature in database
GPG key ID: C8877CF2D7A5D7F3
5 changed files with 52 additions and 11 deletions

View file

@ -22,7 +22,7 @@ import (
)
//#cgo CFLAGS: -O3
//#cgo LDFLAGS: ${SRCDIR}/../../../build/node/libzt_core.a ${SRCDIR}/../../../build/go/native/libzt_go_native.a -lc++
//#cgo LDFLAGS: ${SRCDIR}/../../../build/node/libzt_core.a ${SRCDIR}/../../../build/go/native/libzt_go_native.a -lc++ -lpthread
//#define ZT_CGO 1
//#include <stdint.h>
//#include "../../native/GoGlue.h"
@ -50,6 +50,8 @@ const (
CoreVersionBuild int = C.ZEROTIER_ONE_VERSION_BUILD
)
//////////////////////////////////////////////////////////////////////////////
// Node is an instance of a ZeroTier node
type Node struct {
gn *C.ZT_GoNode
@ -92,6 +94,19 @@ func (n *Node) Close() {
}
}
// Join joins a network
// If tap is nil, the default system tap for this OS/platform is used (if available).
func (n *Node) Join(nwid uint64, tap Tap) (*Network, error) {
return nil, nil
}
// Leave leaves a network
func (n *Node) Leave(nwid uint64) error {
return nil
}
//////////////////////////////////////////////////////////////////////////////
func (n *Node) pathCheck(ztAddress uint64, af int, ip net.IP, port int) bool {
return true
}