cstruct

access C structures via a camlp4 extension
Description

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
Install
Published
10 Aug 2014
Maintainers
Sources
v1.4.0.tar.gz
md5=1abb98c513db70654ef31c76fb379427
Dependencies
Reverse Dependencies
albatross
< "1.3.0"
angstrom
< "0.7.0"
asn1-combinators
< "0.2.0-1"
charrua-unix
< "0.3" | = "0.6"
cohttp
>= "0.9.7" & < "0.10.0"
conduit
>= "0.6.0" & < "0.15.2"
conduit-async
= "3.0.0"
conduit-lwt
= "3.0.0"
cowabloga
>= "0.0.5"
crunch
>= "2.0.0" & < "3.0.0"
cstruct-lwt
< "3.0.0"
cstruct-unix
< "3.0.0"
datakit-ci
>= "0.10.0" & < "0.12.4"
depyt
< "0.3.0"
dns
>= "0.8.0" & < "0.18.0"
dream
< "1.0.0~alpha2"
duff
< "0.3"
eqaf
>= "0.8"
fat-filesystem
< "0.11.0"
frenetic
< "2.0.0" | >= "3.2.0" & < "5.0.5"
git
>= "1.4.3" & < "1.6.0" | >= "2.0.0" & < "3.0.0"
git-http
< "1.11.0"
git-mirage
= "1.11.0"
github-hooks
>= "0.2.0"
gluten-mirage
< "0.3.0"
hvsock
< "1.0.0"
io-page
< "2.0.0"
io-page-unix
< "2.0.0"
io-page-xen
< "2.0.0"
irmin
>= "0.9.0" & < "0.10.0"
irmin-git
>= "2.3.0"
letsencrypt
= "0.2.5"
mirage
>= "0.7.2" & < "0.9.1" | >= "0.10.0" & < "2.4.0"
mirage-block
< "1.0.0"
mirage-console-xen-backend
>= "2.3.2" & < "2.3.4" | = "4.0.0"
mirage-dns
< "2.6.0"
mirage-flow
< "1.2.0"
mirage-fs
>= "0.4.0" & < "1.0.0"
mirage-kv-lwt
>= "2.0.0"
mirage-nat
< "2.2.4"
mirage-net
= "0.5.2"
mirage-unix
< "3.0.8"
mirage-vnetif
< "0.4.0"
mirage-www
< "0.4.0" | >= "1.1.0"
mstruct
< "1.3.4"
nbd
>= "0.9.2" & < "2.1.0"
nocrypto
< "0.5.0"
otr
< "0.2.0"
ox
< "1.1.1"
pbkdf
= "1.1.0"
pcap-format
= "0.3.3"
ppx_cstruct
< "3.0.1"
protocol-9p
< "0.5.1"
protocol-9p-tool
= "0.12.0" | >= "2.0.0" & < "2.0.2"
qcow
< "0.11.0"
rawlink
< "0.4"
resp-mirage
= "0.10.0"
sendmail
>= "0.4.1" & < "0.5.0"
tar-format
>= "0.2.0" & < "0.5.0"
tcpip
< "2.7.0"
tls
< "0.6.0"
u2f
= "0.1.1"
vchan
< "2.1.0"
vhd-format
< "0.8.0"
vmnet
< "1.1.0"
websocket
= "2.2"
x509
< "0.5.0"
xen-api-client
>= "0.9.6"
xenstore
>= "1.2.0" & < "1.3.0"