module Router:sig
..end
typeport_range =
int * int
val port_in_range : 'a -> 'a * 'a -> bool
type
route = {
|
iface_num : |
(* |
Test on incoming iface
| *) |
|
src_mask : |
(* |
Test on source IP
| *) |
|
dst_mask : |
(* |
Test on dest IP
| *) |
|
ip_proto : |
(* |
Test on IP protocol
| *) |
|
src_port : |
(* |
Test on source port
| *) |
|
dst_port : |
route
is a set of optional tests.
Test on dest port
val test_route : route ->
int ->
Ip.Addr.t option ->
Ip.Addr.t option -> Ip.Proto.t option -> int option -> int option -> bool
type
t = {
|
trxs : |
|
route_tbl : |
The route table is an array of route to output interface indices.
val route : int -> t -> Bitstring.bitstring -> unit
val set_read : int -> t -> (Bitstring.bitstring -> unit) -> unit
make
.val make : Tools.trx array -> (route * int) array -> t
val make_from_addrs : (Ip.Addr.t * Eth.Addr.t) BatEnum.t ->
(route * int) array -> t * Tools.trx array