package cstruct

  1. Overview
  2. No Docs

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"
  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-btrees
  68. mirage-channel-lwt
  69. mirage-clock-unix < "1.0.0"
  70. mirage-clock-xen < "1.0.0"
  71. mirage-conduit = "2.3.1"
  72. mirage-console-solo5 >= "0.2.0"
  73. mirage-console-unix < "2.3.2"
  74. mirage-console-xen = "4.0.0"
  75. mirage-console-xen-backend >= "2.3.2" & < "2.3.4" | = "4.0.0"
  76. mirage-console-xen-cli
  77. mirage-dns < "2.6.0"
  78. mirage-entropy < "0.5.0"
  79. mirage-entropy-unix
  80. mirage-entropy-xen
  81. mirage-flow < "1.2.0"
  82. mirage-flow-rawlink >= "1.1.0"
  83. mirage-fs >= "0.4.0" & < "1.0.0"
  84. mirage-fs-mem
  85. mirage-fs-unix < "1.4.1"
  86. mirage-kv-lwt >= "2.0.0"
  87. mirage-nat < "2.2.4"
  88. mirage-net = "0.5.2"
  89. mirage-net-fd < "0.2.1"
  90. mirage-net-lwt
  91. mirage-net-macosx
  92. mirage-net-solo5
  93. mirage-net-unix != "2.4.1"
  94. mirage-net-xen < "1.6.0"
  95. mirage-profile < "0.7.0"
  96. mirage-qubes < "0.3"
  97. mirage-solo5
  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 < "0.3.0" | = "1.1.0"
  117. pcap-format = "0.3.3"
  118. pcf-format
  119. ppx_cstruct < "3.0.1"
  120. protocol-9p < "0.6.0"
  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. rfc6287 >= "1.0.2" & < "1.0.4"
  128. salsa20 < "1.1.0"
  129. salsa20-core < "1.0.0"
  130. scrypt-kdf < "1.1.0"
  131. sendmail >= "0.4.1" & < "0.5.0"
  132. shared-block-ring < "2.3.0"
  133. shared-memory-ring < "1.2.0"
  134. slack
  135. ssh-agent
  136. tar-format >= "0.2.0" & < "0.5.0"
  137. tcpip < "2.7.0"
  138. tftp
  139. tls < "0.7.1"
  140. u2f = "0.1.1"
  141. vchan < "2.1.0"
  142. vhd-format < "0.8.0"
  143. vhd-format-lwt
  144. vhd-tool
  145. vmnet < "1.1.0"
  146. websocket = "2.2"
  147. x509 < "0.6.3"
  148. xapi-rrd-transport
  149. xe
  150. xe-unikernel-upload
  151. xen-api-client >= "0.9.6"
  152. xen-block-driver >= "0.2.5"
  153. xen-gnt
  154. xenstore >= "1.2.0" & < "1.3.0"
  155. xentropyd

Conflicts

None