package cstruct

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

Install

Dune Dependency

Authors

Maintainers

Sources

v1.2.0.tar.gz
md5=443aa8d02ab45c14e708e23951b8cd65

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: 08 Jun 2014

Dependencies (6)

  1. ocamlbuild build & != "0.9.0"
  2. camlp4
  3. ounit
  4. ocplib-endian
  5. ocamlfind
  6. ocaml < "4.06.0"

Dev Dependencies

None

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

Conflicts (1)

  1. async >= "v0.10.0"