mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 14:45:07 +03:00
Add experimental dummy interface for AWDL
This commit is contained in:
parent
d10a0d6137
commit
f29a098488
4 changed files with 106 additions and 2 deletions
|
@ -11,6 +11,7 @@ import (
|
|||
hjson "github.com/hjson/hjson-go"
|
||||
"github.com/mitchellh/mapstructure"
|
||||
"github.com/yggdrasil-network/yggdrasil-go/src/config"
|
||||
"github.com/yggdrasil-network/yggdrasil-go/src/crypto"
|
||||
"github.com/yggdrasil-network/yggdrasil-go/src/util"
|
||||
)
|
||||
|
||||
|
@ -91,3 +92,11 @@ func (c *Core) RouterSendPacket(buf []byte) error {
|
|||
c.router.tun.send <- packet
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Core) AWDLCreateInterface(boxPubKey []byte, sigPubKey []byte, name string) {
|
||||
var box crypto.BoxPubKey
|
||||
var sig crypto.SigPubKey
|
||||
copy(box[:crypto.BoxPubKeyLen], boxPubKey[:])
|
||||
copy(sig[:crypto.SigPubKeyLen], sigPubKey[:])
|
||||
c.awdl.create(&box, &sig, name)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue