CCSDS File Delivery Protocol (CCSDS 727.0-B-5) for space file transfer
OCaml 98.2%
Dune 0.5%
Other 1.3%
32 1 0

Clone this repository

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

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

Download tar.gz
README.md

cfdp#

Pure OCaml implementation of CCSDS File Delivery Protocol (CCSDS 727.0-B-5) for reliable file transfer in space communications.

Overview#

CFDP provides file transfer services for space missions with support for high-delay and disruption-prone links. It operates above the underlying data link layer and provides:

  • Class 1: Unacknowledged (unreliable) transfers
  • Class 2: Acknowledged (reliable) transfers with NAK-based retransmission

Features#

  • Full PDU header encoding/decoding
  • Entity ID support (1-8 bytes, up to 2^63-1)
  • Transaction sequence numbers
  • CRC-32 checksum support
  • File directive PDUs (Metadata, EOF, ACK, NAK, Finished)
  • Segmented file data transfers

Installation#

opam install cfdp

Usage#

open Cfdp

(* Create entity IDs *)
let source = Entity_id.of_int64 1L
let dest = Entity_id.of_int64 2L

(* Create a transaction *)
let seq_nr = Seq_nr.of_int64 42L

(* Build a file data PDU *)
let header = Pdu_header.v
  ~source_entity:source
  ~dest_entity:dest
  ~seq_nr
  ~direction:`Toward_receiver
  ~transmission_mode:`Acknowledged
  ()

(* Encode to bytes *)
let bytes = Pdu_header.encode header
  • ION - NASA/JPL DTN with CFDP
  • lib-cfdp - NASA CFDP library

References#

Licence#

ISC License. See LICENSE.md for details.