package cstruct

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

Install

Dune Dependency

Authors

Maintainers

Sources

v1.8.0.tar.gz
sha256=e1635072283ae5db7889966ce92e916749bcd192012a0c46285827beba1263d7
md5=61de655438620caebb0e011cd96d5bf9

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: 09 Feb 2016

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
  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-btrees
  71. mirage-channel-lwt
  72. mirage-clock-unix < "1.0.0"
  73. mirage-clock-xen < "1.0.0"
  74. mirage-conduit = "2.3.1"
  75. mirage-console-solo5 >= "0.2.0"
  76. mirage-console-unix < "2.3.2"
  77. mirage-console-xen = "4.0.0"
  78. mirage-console-xen-backend >= "2.3.2" & < "2.3.4" | = "4.0.0"
  79. mirage-console-xen-cli
  80. mirage-dns < "2.6.0"
  81. mirage-entropy < "0.5.0"
  82. mirage-entropy-unix
  83. mirage-entropy-xen
  84. mirage-flow < "1.2.0"
  85. mirage-flow-rawlink >= "1.1.0"
  86. mirage-fs >= "0.4.0" & < "1.0.0"
  87. mirage-fs-mem
  88. mirage-fs-unix < "1.4.1"
  89. mirage-kv-lwt >= "2.0.0"
  90. mirage-nat < "2.2.4"
  91. mirage-net = "0.5.2"
  92. mirage-net-fd < "0.2.1"
  93. mirage-net-lwt
  94. mirage-net-macosx
  95. mirage-net-solo5
  96. mirage-net-unix != "2.4.1"
  97. mirage-net-xen < "1.6.0"
  98. mirage-profile < "0.7.0"
  99. mirage-qubes < "0.3"
  100. mirage-solo5
  101. mirage-tc
  102. mirage-tcpip-unix
  103. mirage-tcpip-xen
  104. mirage-types-lwt < "3.4.0"
  105. mirage-unix < "3.0.8"
  106. mirage-vnetif < "0.4.0"
  107. mirage-www < "0.4.0" | >= "1.1.0"
  108. mirage-xen < "2.0.0" | >= "2.3.2"
  109. monorobot
  110. mrt-format
  111. mstruct < "1.3.4"
  112. nbd >= "0.9.2" & < "2.1.0"
  113. nocrypto < "0.5.4"
  114. noise
  115. openflow
  116. otr < "0.3.1"
  117. ox < "1.1.1"
  118. packet
  119. pbkdf < "0.3.0" | = "1.1.0"
  120. pcap-format = "0.3.3"
  121. pcf-format
  122. ppx_cstruct < "3.0.1"
  123. protocol-9p < "0.6.0"
  124. protocol-9p-tool = "0.12.0" | >= "2.0.0" & < "2.0.2"
  125. qcow < "0.11.0"
  126. qcow-format
  127. qcow-tool
  128. rawlink < "0.4"
  129. resp-mirage = "0.10.0"
  130. rfc6287 >= "1.0.2" & < "1.0.4"
  131. salsa20 < "1.1.0"
  132. salsa20-core < "1.0.0"
  133. scrypt-kdf < "1.1.0"
  134. sendmail >= "0.4.1" & < "0.5.0"
  135. shared-block-ring < "2.3.0"
  136. shared-memory-ring < "1.2.0"
  137. slack
  138. ssh-agent
  139. tar-format >= "0.2.0" & < "0.5.0"
  140. tcpip < "2.7.0"
  141. tftp
  142. tls < "0.7.1"
  143. u2f = "0.1.1"
  144. vchan < "2.1.0"
  145. vhd-format < "0.8.0"
  146. vhd-format-lwt
  147. vhd-tool
  148. vmnet < "1.1.0"
  149. websocket = "2.2"
  150. x509 < "0.6.3"
  151. xapi-rrd-transport
  152. xe
  153. xe-unikernel-upload
  154. xen-api-client >= "0.9.6"
  155. xen-block-driver >= "0.2.5"
  156. xen-gnt
  157. xenstore >= "1.2.0" & < "1.3.0"
  158. xentropyd

Conflicts

None

OCaml

Innovation. Community. Security.