package cstruct

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

Install

Dune Dependency

Authors

Maintainers

Sources

cstruct-1.6.0.tar.gz
sha256=0f90a1b7a03091cf22a3ccb11a0cce03b6500f064ad3766b5ed81418ac008ece
md5=3104c76f548aeee8715e3ba0b98c28fe

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: 19 Apr 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"
  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.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. iso-filesystem
  55. key-parsers >= "0.5.0" & < "1.2.1"
  56. launchd
  57. letsencrypt = "0.2.5"
  58. letsencrypt-app < "0.4.0"
  59. macaddr-cstruct < "5.2.0"
  60. mbr-format < "1.0.0"
  61. metrics-mirage
  62. mirage >= "0.7.2" & < "0.9.1" | >= "0.10.0" & < "2.4.0"
  63. mirage-block < "1.0.0"
  64. mirage-block-ccm < "1.1.0"
  65. mirage-block-ramdisk
  66. mirage-block-solo5 < "0.6.2"
  67. mirage-block-unix < "2.8.3"
  68. mirage-block-xen < "1.4.0"
  69. mirage-channel-lwt
  70. mirage-clock-unix < "1.0.0"
  71. mirage-clock-xen < "1.0.0"
  72. mirage-conduit = "2.3.1"
  73. mirage-console-solo5 >= "0.2.0"
  74. mirage-console-unix < "2.3.2"
  75. mirage-console-xen = "4.0.0"
  76. mirage-console-xen-backend >= "2.3.2" & < "2.3.4" | = "4.0.0"
  77. mirage-console-xen-cli
  78. mirage-dns < "2.6.0"
  79. mirage-entropy < "0.5.0"
  80. mirage-entropy-unix
  81. mirage-entropy-xen
  82. mirage-flow < "1.2.0"
  83. mirage-flow-rawlink >= "1.1.0"
  84. mirage-fs >= "0.4.0" & < "1.0.0"
  85. mirage-fs-mem
  86. mirage-fs-unix < "1.4.1"
  87. mirage-kv-lwt >= "2.0.0"
  88. mirage-nat < "2.2.4"
  89. mirage-net = "0.5.2"
  90. mirage-net-lwt
  91. mirage-net-macosx
  92. mirage-net-solo5
  93. mirage-net-unix < "2.3.0"
  94. mirage-net-xen < "1.5.0"
  95. mirage-profile < "0.7.0"
  96. mirage-qubes < "0.3"
  97. mirage-solo5 < "0.9.4"
  98. mirage-tc
  99. mirage-tcpip-unix
  100. mirage-tcpip-xen
  101. mirage-types-lwt < "3.4.0"
  102. mirage-unix < "3.0.8"
  103. mirage-vnetif < "0.4.0"
  104. mirage-www < "0.4.0" | >= "1.1.0"
  105. mirage-xen < "2.0.0" | >= "2.3.2"
  106. monorobot
  107. mrt-format
  108. mstruct < "1.3.4"
  109. nbd >= "0.9.2" & < "2.1.0"
  110. nocrypto < "0.5.4"
  111. noise
  112. openflow
  113. otr < "0.3.1"
  114. ox < "1.1.1"
  115. packet
  116. pbkdf = "1.1.0"
  117. pcap-format = "0.3.3"
  118. pcf-format
  119. ppx_cstruct < "3.0.1"
  120. protocol-9p < "0.5.2"
  121. protocol-9p-tool = "0.12.0" | >= "2.0.0" & < "2.0.2"
  122. qcow < "0.11.0"
  123. qcow-format
  124. qcow-tool
  125. rawlink < "0.4"
  126. resp-mirage = "0.10.0"
  127. sendmail >= "0.4.1" & < "0.5.0"
  128. shared-block-ring < "2.3.0"
  129. shared-memory-ring < "1.2.0"
  130. slack
  131. ssh-agent
  132. tar-format >= "0.2.0" & < "0.5.0"
  133. tcpip < "2.7.0"
  134. tftp
  135. tls < "0.7.1"
  136. u2f = "0.1.1"
  137. vchan < "2.1.0"
  138. vhd-format < "0.8.0"
  139. vhd-format-lwt
  140. vhd-tool
  141. vmnet < "1.1.0"
  142. websocket = "2.2"
  143. x509 < "0.6.3"
  144. xapi-rrd-transport
  145. xe
  146. xe-unikernel-upload
  147. xen-api-client >= "0.9.6"
  148. xen-block-driver >= "0.2.5"
  149. xen-gnt
  150. xenstore >= "1.2.0" & < "1.3.0"
  151. xentropyd

Conflicts

None

OCaml

Innovation. Community. Security.