cstructversion

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

Tags org:mirage org:xapi-project
AuthorAnil Madhavapeddy
LicenseISC
Published
Homepagehttps://github.com/mirage/ocaml-cstruct
Maintaineranil@recoil.org
Dependencies
Optional dependencies
Conflicts
Source [http] https://github.com/mirage/ocaml-cstruct/archive/v0.8.1.tar.gz
sha256=3d73cbd88fd8e8238e90e065c861c11e449aef99129c3291f3854020f2ca29ec
md5=3b48bbbd966c0a2da15914109ff0d0c3
Edithttps://github.com/ocaml/opam-repository/tree/master/packages/cstruct/cstruct.0.8.1/opam
Required by
Optionally used by