Module Cf_netif


module Cf_netif: sig .. end
Network interface name/index mapping.


Overview

Wrapper around the standard network interface name/index mapping functions defined in

<net/if.h>
.
val nametoindex : string -> int
Use nametoindex name to get the index for the interface name. Raises Not_found if the interface does not currently exist.
val indextoname : int -> string
Use indextoname index to get the index for the interface name. Raises Not_found if the interface does not currently exist.
val nameindex : unit -> (int * string) list
Use nameindex () to obtain the current list of network interfaces, by index and name.