Pure OCaml ARP table lookup - reads /proc/net/arp on Linux and arp -a on macOS/BSD
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ocaml-linkedin: apply dune fmt

Pure formatting changes from `dune fmt`: doc comment placement moves
from above the binding to below it for `type`s, multi-line `match`
expressions collapse onto one line where they fit, and infix operator
applications pick up spaces (`Soup.($?)` -> `Soup.( $? )`). No
semantic changes.

+24 -6
+17 -6
README.md
··· 8 8 9 9 ## Installation 10 10 11 + Install with opam: 12 + 13 + ```sh 14 + $ opam install arp 11 15 ``` 12 - opam install arp 16 + 17 + If opam cannot find the package, it may not yet be released in the public 18 + `opam-repository`. Add the overlay repository, then install it: 19 + 20 + ```sh 21 + $ opam repo add samoht https://tangled.org/gazagnaire.org/opam-overlay.git 22 + $ opam update 23 + $ opam install arp 13 24 ``` 14 25 15 26 ## Usage 16 27 17 28 ```ocaml 18 - let entries = Arp.table () in 19 - List.iter 20 - (fun (e : Arp.entry) -> 21 - Printf.printf "%s -> %s\n" e.ip e.mac) 22 - entries 29 + let () = 30 + let entries = Arp.table () in 31 + List.iter 32 + (fun (e : Arp.entry) -> Printf.printf "%s -> %s\n" e.ip e.mac) 33 + entries 23 34 ``` 24 35 25 36 ## Licence
+1
arp.opam
··· 9 9 depends: [ 10 10 "ocaml" {>= "4.14.0"} 11 11 "dune" {>= "3.21" & >= "3.0"} 12 + "mdx" {with-test} 12 13 "alcotest" {with-test} 13 14 "odoc" {with-doc} 14 15 ]
+4
dune
··· 1 1 (env 2 2 (dev 3 3 (flags :standard %{dune-warnings}))) 4 + 5 + (mdx 6 + (files README.md) 7 + (libraries arp))
+2
dune-project
··· 1 1 (lang dune 3.21) 2 + (using mdx 0.4) 2 3 (name arp) 3 4 (source (tangled gazagnaire.org/ocaml-arp)) 4 5 ··· 13 14 (depends 14 15 (ocaml (>= 4.14.0)) 15 16 (dune (>= 3.0)) 17 + (mdx :with-test) 16 18 (alcotest :with-test)))