()
| 59 | } |
| 60 | |
| 61 | func (s *RouterState) StringRoutes() string { |
| 62 | buf := make([]string, 0) |
| 63 | for prefix, route := range s.Routes { |
| 64 | buf = append(buf, fmt.Sprintf("%s via %s", prefix, route)) |
| 65 | } |
| 66 | slices.Sort(buf) |
| 67 | return strings.Join(buf, "\n") |
| 68 | } |
| 69 | |
| 70 | type Neighbour struct { |
| 71 | Id NodeId |
no outgoing calls