Pure OCaml ARP table lookup - reads /proc/net/arp on Linux and arp -a on macOS/BSD
OCaml 85.0%
Dune 4.4%
Other 10.5%
8 1 0

Clone this repository

https://tangled.org/gazagnaire.org/ocaml-arp https://tangled.org/did:plc:jhift2vwcxhou52p3sewcrpx/ocaml-arp
git@git.recoil.org:gazagnaire.org/ocaml-arp git@git.recoil.org:did:plc:jhift2vwcxhou52p3sewcrpx/ocaml-arp

For self-hosted knots, clone URLs may differ based on your setup.

Download tar.gz
README.md

ocaml-sle#

Pure OCaml implementation of CCSDS Space Link Extension (SLE) protocols for ground station communication.

Features#

  • RAF - Return All Frames (downlink telemetry)
  • RCF - Return Channel Frames (filtered downlink)
  • FCLTU - Forward CLTU (uplink telecommands)
  • TML - Transport Mapping Layer framing
  • ISP1 - Authentication

Installation#

opam install sle sle-eio

Usage#

The sle package provides a pure functional state machine with no I/O effects. The sle-eio package wraps it with Eio for TCP communication.

Eio_main.run @@ fun env ->
Eio.Switch.run @@ fun sw ->
let config = Sle_eio.default_config ~host:"sle-provider.example.com" ~port:5100 in
match Sle_eio.connect ~sw ~net:(Eio.Stdenv.net env) ~clock:(Eio.Stdenv.clock env) config with
| Error e -> Fmt.epr "Connection failed: %a@." Sle_eio.pp_error e
| Ok client ->
    match Sle_eio.bind client ~initiator_id:"user" ~responder_port_id:"RAF"
            ~service_type:Sle.Bind.Raf_all ~version:5
            ~service_instance_id:"sagr=1.spack=..." with
    | Error e -> Fmt.epr "Bind failed: %a@." Sle_eio.pp_error e
    | Ok _version ->
        match Sle_eio.start_raf client ~start_time:None ~stop_time:None
                ~requested_quality:Sle.Common.Good with
        | Error e -> Fmt.epr "Start failed: %a@." Sle_eio.pp_error e
        | Ok () ->
            (* Receive frames *)
            let rec loop () =
              match Sle_eio.recv_frame client with
              | Error Sle_eio.Closed -> ()
              | Error e -> Fmt.epr "Error: %a@." Sle_eio.pp_error e
              | Ok frame ->
                  process_frame frame.data;
                  loop ()
            in
            loop ()

References#

Licence#

ISC