ocaml-arp#
Pure OCaml ARP table lookup. Reads the system ARP cache to resolve IP addresses to MAC addresses.
- Linux: reads
/proc/net/arpdirectly - macOS/BSD: parses output of
arp -a
Installation#
Install with opam:
$ opam install nox-arp
If opam cannot find the package, it may not yet be released in the public
opam-repository. Add the overlay repository, then install it:
$ opam repo add samoht https://tangled.org/gazagnaire.org/opam-overlay.git
$ opam update
$ opam install nox-arp
Usage#
let () =
let entries = Arp.table () in
List.iter
(fun (e : Arp.entry) -> Printf.printf "%s -> %s\n" e.ip e.mac)
entries
Licence#
ISC