2016-03-12 13:32:55 +01:00
|
|
|
package data
|
|
|
|
|
2017-01-20 22:27:44 +01:00
|
|
|
// Neighbours struct
|
2016-03-12 13:32:55 +01:00
|
|
|
type Neighbours struct {
|
|
|
|
Batadv map[string]BatadvNeighbours `json:"batadv"`
|
2017-12-05 23:17:49 +01:00
|
|
|
Babel map[string]BabelNeighbours `json:"babel"`
|
2022-07-09 20:20:48 +02:00
|
|
|
LLDP map[string][]string `json:"lldp"`
|
2016-03-12 13:32:55 +01:00
|
|
|
//WifiNeighbours map[string]WifiNeighbours `json:"wifi"`
|
2017-01-20 22:27:44 +01:00
|
|
|
NodeID string `json:"node_id"`
|
2016-03-12 13:32:55 +01:00
|
|
|
}
|
|
|
|
|
2017-01-20 22:27:44 +01:00
|
|
|
// WifiLink struct
|
2016-03-12 13:32:55 +01:00
|
|
|
type WifiLink struct {
|
|
|
|
Inactive int `json:"inactive"`
|
|
|
|
Noise int `json:"nois"`
|
|
|
|
Signal int `json:"signal"`
|
|
|
|
}
|
|
|
|
|
2017-01-20 22:27:44 +01:00
|
|
|
// BatmanLink struct
|
2016-03-12 13:32:55 +01:00
|
|
|
type BatmanLink struct {
|
|
|
|
Lastseen float64 `json:"lastseen"`
|
2023-09-18 19:56:18 +02:00
|
|
|
TQ int `json:"tq"`
|
2016-03-12 13:32:55 +01:00
|
|
|
}
|
|
|
|
|
2017-12-05 23:17:49 +01:00
|
|
|
// BabelLink struct
|
|
|
|
type BabelLink struct {
|
|
|
|
// How need this:
|
|
|
|
RXCost int `json:"rxcost"`
|
|
|
|
TXCost int `json:"txcost"`
|
|
|
|
Cost int `json:"cost"`
|
|
|
|
Reachability int `json:"reachability"`
|
|
|
|
}
|
|
|
|
|
2017-01-20 22:27:44 +01:00
|
|
|
// BatadvNeighbours struct
|
2016-03-12 13:32:55 +01:00
|
|
|
type BatadvNeighbours struct {
|
|
|
|
Neighbours map[string]BatmanLink `json:"neighbours"`
|
|
|
|
}
|
|
|
|
|
2017-12-05 23:17:49 +01:00
|
|
|
// BabelNeighbours struct
|
|
|
|
type BabelNeighbours struct {
|
|
|
|
Protocol string `json:"protocol"`
|
|
|
|
LinkLocalAddress string `json:"ll-addr"`
|
|
|
|
Neighbours map[string]BabelLink `json:"neighbours"`
|
|
|
|
}
|
|
|
|
|
2017-01-20 22:27:44 +01:00
|
|
|
// WifiNeighbours struct
|
2016-03-12 13:32:55 +01:00
|
|
|
type WifiNeighbours struct {
|
|
|
|
Neighbours map[string]WifiLink `json:"neighbours"`
|
|
|
|
}
|