Add support for Multipath TCP

This commit is contained in:
Neil Alexander 2023-08-12 17:50:24 +01:00
parent fec96a38a4
commit ed8991571a
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
9 changed files with 108 additions and 48 deletions

View file

@ -30,6 +30,7 @@ type PeerInfo struct {
Coords []uint64
Port uint64
Priority uint8
Multipath bool
RXBytes uint64
TXBytes uint64
Uptime time.Duration
@ -87,6 +88,7 @@ func (c *Core) GetPeers() []PeerInfo {
peerinfo.RXBytes = atomic.LoadUint64(&c.rx)
peerinfo.TXBytes = atomic.LoadUint64(&c.tx)
peerinfo.Uptime = time.Since(c.up)
peerinfo.Multipath = isMPTCP(c)
}
if p, ok := conns[conn]; ok {
peerinfo.Key = p.Key