Module S.RLU_IPv4

type netif
type addr
type subnet_mask
type rlu
type outcome = {
out_netif : netif;
next_hop_addr : addr;
}
type route =
| Local of {
dst_addr : addr;
subnet_mask : subnet_mask;
netif : netif;
}
| Remote of {
dst_addr : addr;
subnet_mask : subnet_mask;
netif : netif;
next_hop_addr : addr;
}
val make : unit -> rlu
val route : rlu -> dst_addr:addr -> outcome option
val add_route : rlu -> route -> unit
val add_route_local : rlu -> dst_addr:addr -> subnet_mask:subnet_mask -> netif:netif -> unit
val add_route_remote : rlu -> dst_addr:addr -> subnet_mask:subnet_mask -> netif:netif -> next_hop_addr:addr -> unit
val add_routes : rlu -> route list -> unit
val remove_route : rlu -> route -> unit
val remove_routes : rlu -> route list -> unit