cstruct 1.3.1
Author | Anil Madhavapeddy | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
License | ISC | |||||||||||||||||||||||||
Homepage | https://github.com/mirage/ocaml-cstruct | |||||||||||||||||||||||||
Maintainer | anil@recoil.org | |||||||||||||||||||||||||
Tags | org:mirage and org:xapi-project | |||||||||||||||||||||||||
Dependencies |
|
|||||||||||||||||||||||||
Optional dependencies |
|
|||||||||||||||||||||||||
Published | Jul 12, 2014 | |||||||||||||||||||||||||
Source [http] |
https://github.com/mirage/ocaml-cstruct/archive/v1.3.1.tar.gz c45e596b93d40844553cfb27485613c1 |
|||||||||||||||||||||||||
Edit | https://github.com/ocaml/opam-repository/tree/master/packages/cstruct/cstruct.1.3.1/opam |
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
Necessary for | ||
---|---|---|
asn1-combinators | ||
cohttp | ||
& | >= 0.9.7 | |
< 0.10.0 | ||
cowabloga | ||
>= 0.0.5 | ||
crc | ||
dns | ||
>= 0.8.0 | ||
fat-filesystem | ||
frenetic | ||
< 2.0.0 | ||
io-page | ||
io-page-unix | ||
io-page-xen | ||
mbr-format | ||
mirage | ||
| | < 0.9.1 | |
>= 0.10.0 | ||
mirage-block-unix | ||
mirage-block-xen | ||
mirage-clock-unix | ||
< 1.0.0 | ||
mirage-clock-xen | ||
< 1.0.0 | ||
mirage-entropy-unix | ||
mirage-entropy-xen | ||
mirage-fs | ||
>= 0.4.0 | ||
mirage-fs-unix | ||
mirage-net-unix | ||
mirage-net-xen | ||
mirage-tcpip-unix | ||
mirage-tcpip-xen | ||
mirage-unix | ||
mirage-www | ||
>= 1.1.0 | ||
mirage-xen | ||
mstruct | ||
nbd | ||
>= 0.9.2 | ||
nocrypto | ||
openflow | ||
ox | ||
< 1.1.1 | ||
packet | ||
pcap-format | ||
>= 0.3.3 | ||
pcf-format | ||
shared-memory-ring | ||
tar-format | ||
>= 0.2.0 | ||
tcpip | ||
tls | ||
tuntap | ||
& | >= 0.5 | |
< 0.6 | ||
vchan | ||
>= 0.9.6 | ||
vhd-format | ||
vhd-tool | ||
x509 | ||
xe | ||
xe-unikernel-upload | ||
xen-api-client | ||
>= 0.9.6 | ||
xen-block-driver | ||
| | < 0.2.4 | |
>= 0.2.5 | ||
xen-gnt | ||
xenctrl | ||
>= 0.9.8 | ||
xenstore | ||
>= 1.2.0 | ||
Optional for | ||
frenetic | ||
>= 2.0.0 | ||
mirage-types | ||
>= 1.1.0 |