package cstruct

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

Install

Dune Dependency

Authors

Maintainers

Sources

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

Conflicts (1)

  1. async >= "v0.10.0"
OCaml

Innovation. Community. Security.