Priority support (#964)

* Allow setting link priorities

* Fix a bug

* Allow setting priority on listeners and multicast interfaces

* Update `yggdrasilctl`

* Update to Arceliar/ironwood#5
This commit is contained in:
Neil Alexander 2022-10-26 09:24:24 +01:00 committed by GitHub
parent 9a9452dcc8
commit f08dec822a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 79 additions and 56 deletions

View file

@ -20,14 +20,15 @@ type SelfInfo struct {
}
type PeerInfo struct {
Key ed25519.PublicKey
Root ed25519.PublicKey
Coords []uint64
Port uint64
Remote string
RXBytes uint64
TXBytes uint64
Uptime time.Duration
Key ed25519.PublicKey
Root ed25519.PublicKey
Coords []uint64
Port uint64
Priority uint8
Remote string
RXBytes uint64
TXBytes uint64
Uptime time.Duration
}
type DHTEntryInfo struct {
@ -75,6 +76,7 @@ func (c *Core) GetPeers() []PeerInfo {
info.Root = p.Root
info.Coords = p.Coords
info.Port = p.Port
info.Priority = p.Priority
info.Remote = p.Conn.RemoteAddr().String()
if name := names[p.Conn]; name != "" {
info.Remote = name