Skip to content

Commit

Permalink
Merge pull request ocaml#1400 from mirage/master
Browse files Browse the repository at this point in the history
cstruct.1.0.1
  • Loading branch information
avsm committed Dec 9, 2013
2 parents ef3be9c + 9bbde1f commit 62a45df
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 4 deletions.
18 changes: 18 additions & 0 deletions packages/cstruct/cstruct.1.0.1/descr
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
access C structures via a camlp4 extension

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

22 changes: 22 additions & 0 deletions packages/cstruct/cstruct.1.0.1/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
opam-version: "1"
maintainer: "[email protected]"
authors: ["Anil Madhavapeddy"]
homepage: "https://github.com/mirage/ocaml-cstruct"
license: "ISC"
tags: [
"org:mirage"
"org:xapi-project"
]
build: [
[make]
[make "install"]
]
remove: [["ocamlfind" "remove" "cstruct"]]
depends: [
"ocamlfind"
"ocplib-endian"
]
depopts: [
"async"
"lwt"
]
2 changes: 2 additions & 0 deletions packages/cstruct/cstruct.1.0.1/url
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
archive: "https://github.com/mirage/ocaml-cstruct/archive/v1.0.1.tar.gz"
checksum: "74cccbaf30c34924ab1a6883a8249388"
2 changes: 1 addition & 1 deletion packages/mirage-net-direct/mirage-net-direct.0.9.4/url
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
archive: "https://github.com/mirage/mirage-net/archive/v0.9.4.tar.gz"
checksum: "fa9b49140e963ce078370dce006dd37a"
checksum: "f4b8cc459026bea7534304654023143e"
2 changes: 1 addition & 1 deletion packages/mirage-net-socket/mirage-net-socket.0.9.4/url
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
archive: "https://github.com/mirage/mirage-net/archive/v0.9.4.tar.gz"
checksum: "fa9b49140e963ce078370dce006dd37a"
checksum: "f4b8cc459026bea7534304654023143e"
2 changes: 1 addition & 1 deletion packages/mirage-unix/mirage-unix.0.9.9/opam
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build: [
]
remove: [[make "unix-uninstall" "PREFIX=%{prefix}%"]]
depends: [
"cstruct" {>= "0.8.1"}
"cstruct" {>= "1.0.1"}
"ocamlfind"
"lwt" {>= "2.4.3"}
"io-page-unix" {>= "0.9.9"}
Expand Down
2 changes: 1 addition & 1 deletion packages/mirage-xen/mirage-xen.0.9.9/opam
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build: [
]
remove: [[make "xen-uninstall" "PREFIX=%{prefix}%"]]
depends: [
"cstruct" {>= "0.8.1"}
"cstruct" {>= "1.0.1"}
"ocamlfind"
"io-page-xen" {>= "0.9.9"}
"mirage-clock-xen" {>= "1.0.0"}
Expand Down

0 comments on commit 62a45df

Please sign in to comment.