forked from ocaml/opam-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ocaml#1400 from mirage/master
cstruct.1.0.1
- Loading branch information
Showing
7 changed files
with
46 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters