package cstruct

  1. Overview
  2. No Docs
access C structures via a camlp4 extension

Install

Dune Dependency

Authors

Maintainers

Sources

v1.7.1.tar.gz
sha256=7869d096fe7c6231bbceefe3b2205417b28b6c10f4174b7e2cfdfa46956eaaa5
md5=45cc951528ab9b5c6680a27a4f93d7fe

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

Tags

org:mirage org:xapi-project

Published: 15 Dec 2015

Dependencies (7)

  1. conf-time
  2. ocamlbuild build & != "0.9.0"
  3. sexplib < "113.01.00"
  4. ocplib-endian
  5. type_conv build
  6. ocamlfind build
  7. ocaml >= "4.01.0"

Dev Dependencies (1)

  1. ounit with-test

  1. albatross < "1.3.0"
  2. angstrom < "0.7.0"
  3. arakoon >= "1.8.6" & < "1.8.12"
  4. asn1-combinators >= "0.1.2" & != "0.2.0-1" & < "0.2.6"
  5. balancer
  6. buffer-pool
  7. capnp-rpc-net >= "1.1" & < "1.2.1"
  8. channel
  9. charrua-client < "0.9"
  10. charrua-core < "0.3"
  11. charrua-unix < "0.3" | = "0.6"
  12. cohttp >= "0.9.7" & < "0.10.0"
  13. conduit >= "0.6.0" & < "0.15.2"
  14. conduit-async = "3.0.0"
  15. conduit-lwt = "3.0.0"
  16. conex < "0.10.0"
  17. conex-mirage-crypto
  18. conex-nocrypto
  19. cowabloga >= "0.0.5"
  20. crc
  21. crunch >= "2.0.0" & < "3.0.0"
  22. cstruct-lwt < "3.0.0"
  23. cstruct-unix < "3.0.0"
  24. datakit-ci >= "0.10.0" & < "0.12.4"
  25. datakit-client < "0.9.0"
  26. datakit-server < "0.9.0"
  27. depyt < "0.3.0"
  28. dns >= "0.15.0" & < "0.18.0"
  29. dream < "1.0.0~alpha2"
  30. duff < "0.3"
  31. eqaf >= "0.8" & < "0.10"
  32. eqaf-cstruct
  33. fat-filesystem >= "0.10.0" & < "0.11.0"
  34. frenetic < "2.0.0" | >= "3.2.0" & < "5.0.5"
  35. git >= "1.4.3" & < "1.6.0" | >= "2.0.0" & < "3.0.0"
  36. git-http < "1.11.0"
  37. git-mirage = "1.11.0"
  38. github-hooks >= "0.2.0"
  39. gluten-mirage < "0.3.0"
  40. gpt
  41. h2-mirage
  42. hacl-star >= "0.7.0"
  43. hex >= "0.2.0"
  44. hkdf < "1.0.3"
  45. httpun-mirage
  46. httpun-ws-mirage
  47. hvsock < "1.0.0"
  48. io-page < "2.0.0"
  49. io-page-unix < "2.0.0"
  50. io-page-xen < "2.0.0"
  51. ipaddr-cstruct < "5.2.0"
  52. irmin >= "0.9.0" & < "2.0.0"
  53. irmin-git >= "2.3.0"
  54. irmin-indexeddb >= "0.3"
  55. iso-filesystem
  56. key-parsers >= "0.5.0" & < "1.2.1"
  57. launchd
  58. letsencrypt = "0.2.5"
  59. letsencrypt-app < "0.4.0"
  60. macaddr-cstruct < "5.2.0"
  61. mbr-format < "1.0.0"
  62. metrics-mirage
  63. mirage >= "0.7.2" & < "0.9.1" | >= "0.10.0" & < "2.4.0"
  64. mirage-block < "1.0.0"
  65. mirage-block-ccm < "1.1.0"
  66. mirage-block-ramdisk
  67. mirage-block-solo5 < "0.6.2"
  68. mirage-block-unix < "2.8.3"
  69. mirage-block-xen < "1.4.0"
  70. mirage-channel-lwt
  71. mirage-clock-unix < "1.0.0"
  72. mirage-clock-xen < "1.0.0"
  73. mirage-conduit = "2.3.1"
  74. mirage-console-solo5 >= "0.2.0"
  75. mirage-console-unix < "2.3.2"
  76. mirage-console-xen = "4.0.0"
  77. mirage-console-xen-backend >= "2.3.2" & < "2.3.4" | = "4.0.0"
  78. mirage-console-xen-cli
  79. mirage-dns < "2.6.0"
  80. mirage-entropy < "0.5.0"
  81. mirage-entropy-unix
  82. mirage-entropy-xen
  83. mirage-flow < "1.2.0"
  84. mirage-flow-rawlink >= "1.1.0"
  85. mirage-fs >= "0.4.0" & < "1.0.0"
  86. mirage-fs-mem
  87. mirage-fs-unix < "1.4.1"
  88. mirage-kv-lwt >= "2.0.0"
  89. mirage-nat < "2.2.4"
  90. mirage-net = "0.5.2"
  91. mirage-net-fd < "0.2.1"
  92. mirage-net-lwt
  93. mirage-net-macosx
  94. mirage-net-solo5
  95. mirage-net-unix != "2.4.1"
  96. mirage-net-xen < "1.6.0"
  97. mirage-profile < "0.7.0"
  98. mirage-qubes < "0.3"
  99. mirage-solo5 < "0.9.4"
  100. mirage-tc
  101. mirage-tcpip-unix
  102. mirage-tcpip-xen
  103. mirage-types-lwt < "3.4.0"
  104. mirage-unix < "3.0.8"
  105. mirage-vnetif < "0.4.0"
  106. mirage-www < "0.4.0" | >= "1.1.0"
  107. mirage-xen < "2.0.0" | >= "2.3.2"
  108. monorobot
  109. mrt-format
  110. mstruct < "1.3.4"
  111. nbd >= "0.9.2" & < "2.1.0"
  112. nocrypto < "0.5.4"
  113. noise
  114. openflow
  115. otr < "0.3.1"
  116. ox < "1.1.1"
  117. packet
  118. pbkdf < "0.3.0" | = "1.1.0"
  119. pcap-format = "0.3.3"
  120. pcf-format
  121. ppx_cstruct < "3.0.1"
  122. protocol-9p < "0.6.0"
  123. protocol-9p-tool = "0.12.0" | >= "2.0.0" & < "2.0.2"
  124. qcow < "0.11.0"
  125. qcow-format
  126. qcow-tool
  127. rawlink < "0.4"
  128. resp-mirage = "0.10.0"
  129. rfc6287 >= "1.0.2" & < "1.0.4"
  130. salsa20 < "1.1.0"
  131. salsa20-core < "1.0.0"
  132. scrypt-kdf < "1.1.0"
  133. sendmail >= "0.4.1" & < "0.5.0"
  134. shared-block-ring < "2.3.0"
  135. shared-memory-ring < "1.2.0"
  136. slack
  137. ssh-agent
  138. tar-format >= "0.2.0" & < "0.5.0"
  139. tcpip < "2.7.0"
  140. tftp
  141. tls < "0.7.1"
  142. u2f = "0.1.1"
  143. vchan < "2.1.0"
  144. vhd-format < "0.8.0"
  145. vhd-format-lwt
  146. vhd-tool
  147. vmnet < "1.1.0"
  148. websocket = "2.2"
  149. x509 < "0.6.3"
  150. xapi-rrd-transport
  151. xe
  152. xe-unikernel-upload
  153. xen-api-client >= "0.9.6"
  154. xen-block-driver >= "0.2.5"
  155. xen-gnt
  156. xenstore >= "1.2.0" & < "1.3.0"
  157. xentropyd

Conflicts

None

OCaml

Innovation. Community. Security.