AWDL support for macOS/iOS

This commit is contained in:
Neil Alexander 2019-01-13 18:08:41 +00:00
parent 4f7e8856b8
commit 4622a85c34
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
6 changed files with 90 additions and 3 deletions

View file

@ -3,6 +3,7 @@
package yggdrasil
import (
"encoding/hex"
"encoding/json"
"log"
"os"
@ -113,6 +114,16 @@ func (c *Core) GetSubnetString() string {
return c.GetSubnet().String()
}
// Gets the node's public encryption key.
func (c *Core) GetBoxPubKeyString() string {
return hex.EncodeToString(c.boxPub[:])
}
// Gets the node's public signing key.
func (c *Core) GetSigPubKeyString() string {
return hex.EncodeToString(c.sigPub[:])
}
// Wait for a packet from the router. You will use this when implementing a
// dummy adapter in place of real TUN - when this call returns a packet, you
// will probably want to give it to the OS to write to TUN.