(entries []*protocol.RouteTableEntry)
| 403 | } |
| 404 | |
| 405 | func sortRouteTableEntries(entries []*protocol.RouteTableEntry) { |
| 406 | slices.SortFunc(entries, func(a, b *protocol.RouteTableEntry) int { |
| 407 | if c := cmp.Compare(a.Prefix, b.Prefix); c != 0 { |
| 408 | return c |
| 409 | } |
| 410 | return cmp.Compare(a.Nh, b.Nh) |
| 411 | }) |
| 412 | } |
| 413 | |
| 414 | func handleIPCProbe(n *Nylon, req *protocol.ProbeRequest) *protocol.IpcResponse { |
| 415 | neigh := n.RouterState.GetNeighbour(state.NodeId(req.PeerId)) |