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
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"
  32. fat-filesystem >= "0.10.0" & < "0.11.0"
  33. frenetic < "2.0.0" | >= "3.2.0" & < "5.0.5"
  34. git >= "1.4.3" & < "1.6.0" | >= "2.0.0" & < "3.0.0"
  35. git-http < "1.11.0"
  36. git-mirage = "1.11.0"
  37. github-hooks >= "0.2.0"
  38. gluten-mirage < "0.3.0"
  39. gpt
  40. h2-mirage
  41. hacl-star >= "0.7.0"
  42. hex >= "0.2.0"
  43. hkdf < "1.0.3"
  44. hvsock < "1.0.0"
  45. io-page < "2.0.0"
  46. io-page-unix < "2.0.0"
  47. io-page-xen < "2.0.0"
  48. ipaddr-cstruct < "5.2.0"
  49. irmin >= "0.9.0" & < "2.0.0"
  50. irmin-git >= "2.3.0"
  51. irmin-indexeddb >= "0.3"
  52. iso-filesystem
  53. key-parsers >= "0.5.0" & < "1.2.1"
  54. launchd
  55. letsencrypt = "0.2.5"
  56. letsencrypt-app < "0.4.0"
  57. macaddr-cstruct < "5.2.0"
  58. mbr-format < "1.0.0"
  59. metrics-mirage
  60. mirage >= "0.7.2" & < "0.9.1" | >= "0.10.0" & < "2.4.0"
  61. mirage-block < "1.0.0"
  62. mirage-block-ccm < "1.1.0"
  63. mirage-block-ramdisk
  64. mirage-block-solo5 < "0.6.2"
  65. mirage-block-unix < "2.8.3"
  66. mirage-block-xen < "1.4.0"
  67. mirage-channel-lwt
  68. mirage-clock-unix < "1.0.0"
  69. mirage-clock-xen < "1.0.0"
  70. mirage-conduit = "2.3.1"
  71. mirage-console-solo5 >= "0.2.0"
  72. mirage-console-unix < "2.3.2"
  73. mirage-console-xen = "4.0.0"
  74. mirage-console-xen-backend >= "2.3.2" & < "2.3.4" | = "4.0.0"
  75. mirage-console-xen-cli
  76. mirage-dns < "2.6.0"
  77. mirage-entropy < "0.5.0"
  78. mirage-entropy-unix
  79. mirage-entropy-xen
  80. mirage-flow < "1.2.0"
  81. mirage-flow-rawlink >= "1.1.0"
  82. mirage-fs >= "0.4.0" & < "1.0.0"
  83. mirage-fs-mem
  84. mirage-fs-unix < "1.4.1"
  85. mirage-kv-lwt >= "2.0.0"
  86. mirage-nat < "2.2.4"
  87. mirage-net = "0.5.2"
  88. mirage-net-fd < "0.2.1"
  89. mirage-net-lwt
  90. mirage-net-macosx
  91. mirage-net-solo5
  92. mirage-net-unix != "2.4.1"
  93. mirage-net-xen < "1.6.0"
  94. mirage-profile < "0.7.0"
  95. mirage-qubes < "0.3"
  96. mirage-solo5
  97. mirage-tc
  98. mirage-tcpip-unix
  99. mirage-tcpip-xen
  100. mirage-types-lwt < "3.4.0"
  101. mirage-unix < "3.0.8"
  102. mirage-vnetif < "0.4.0"
  103. mirage-www < "0.4.0" | >= "1.1.0"
  104. mirage-xen < "2.0.0" | >= "2.3.2"
  105. monorobot
  106. mrt-format
  107. mstruct < "1.3.4"
  108. nbd >= "0.9.2" & < "2.1.0"
  109. nocrypto < "0.5.4"
  110. noise
  111. openflow
  112. otr < "0.3.1"
  113. ox < "1.1.1"
  114. packet
  115. pbkdf < "0.3.0" | = "1.1.0"
  116. pcap-format = "0.3.3"
  117. pcf-format
  118. ppx_cstruct < "3.0.1"
  119. protocol-9p < "0.6.0"
  120. protocol-9p-tool = "0.12.0" | >= "2.0.0" & < "2.0.2"
  121. qcow < "0.11.0"
  122. qcow-format
  123. qcow-tool
  124. rawlink < "0.4"
  125. resp-mirage = "0.10.0"
  126. rfc6287 >= "1.0.2" & < "1.0.4"
  127. salsa20 < "1.1.0"
  128. salsa20-core < "1.0.0"
  129. scrypt-kdf < "1.1.0"
  130. sendmail >= "0.4.1" & < "0.5.0"
  131. shared-block-ring < "2.3.0"
  132. shared-memory-ring < "1.2.0"
  133. slack
  134. ssh-agent
  135. tar-format >= "0.2.0" & < "0.5.0"
  136. tcpip < "2.7.0"
  137. tftp
  138. tls < "0.7.1"
  139. u2f = "0.1.1"
  140. vchan < "2.1.0"
  141. vhd-format < "0.8.0"
  142. vhd-format-lwt
  143. vhd-tool
  144. vmnet < "1.1.0"
  145. websocket = "2.2"
  146. x509 < "0.6.3"
  147. xapi-rrd-transport
  148. xe
  149. xe-unikernel-upload
  150. xen-api-client >= "0.9.6"
  151. xen-block-driver >= "0.2.5"
  152. xen-gnt
  153. xenstore >= "1.2.0" & < "1.3.0"
  154. xentropyd

Conflicts

None