mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-20 13:24:09 -07:00
This commit is contained in:
parent
b540181990
commit
fbf74d3baa
5 changed files with 52 additions and 11 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue