• en

cstruct

access C structures via a camlp4 extension

Cstruct is a library and syntax extension to make it easier to access C-like structures directly from OCaml. It supports both reading and writing to these structures, and they are accessed via the Bigarray module.

An example pcap description is:

cstruct pcap_header {
  uint32_t magic_number;   (* magic number *)
  uint16_t version_major;  (* major version number *)
  uint16_t version_minor;  (* minor version number *)
  uint32_t thiszone;       (* GMT to local correction *)
  uint32_t sigfigs;        (* accuracy of timestamps *)
  uint32_t snaplen;        (* max length of captured packets, in octets *)
  uint32_t network         (* data link type *)
} as little_endian
Author Anil Madhavapeddy
License ISC
Homepage https://github.com/mirage/ocaml-cstruct
Maintainer anil@recoil.org
Tags org:mirage and org:xapi-project

Events

Aug 10, 2014

Published version 1.4.0

Jul 12, 2014

Published version 1.3.1

Jul 5, 2014

Published version 1.3.0

Jun 8, 2014

Published version 1.2.0

Feb 20, 2014

Published version 1.1.0

Dec 9, 2013

Published version 1.0.1

Dec 5, 2013

Published version 1.0.0

Nov 7, 2013

Published version 0.8.1

Oct 14, 2013

Published version 0.8.0

Mar 6, 2013

Published version 0.7.1

Feb 25, 2013

Published version 0.7.0

Feb 8, 2013

Published version 0.6.2

Dec 20, 2012

Published version 0.6.1

Dec 20, 2012

Published version 0.6.0

Dec 17, 2012

Published version 0.5.3

Dec 11, 2012

Published version 0.5.2

Sep 29, 2012

Published version 0.5.1

Sep 21, 2012

Published version 0.5.0

Sep 4, 2012

Published version 0.4.1

Sep 2, 2012

Published version 0.4.0