Skip to content

Commit

Permalink
Some fixes for tcpip
Browse files Browse the repository at this point in the history
For mirage/mirage#969
`implements` requires public library name.
Dummy tcpip lib so that `tcpip` is resolved.
Fix dependencies in the opam definition.
  • Loading branch information
TheLortex committed Feb 14, 2019
1 parent 11490b7 commit b6d5989
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 6 deletions.
4 changes: 4 additions & 0 deletions src/tcpip/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(library
(name tcpip)
(public_name tcpip)
)
Empty file added src/tcpip/tcpip.ml
Empty file.
2 changes: 1 addition & 1 deletion src/tcpip_checksum/ocaml/dune
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(library
(name tcpip_checksum_ocaml)
(public_name tcpip-checksum.ocaml)
(implements tcpip_checksum))
(implements tcpip-checksum))
2 changes: 1 addition & 1 deletion src/tcpip_checksum/unix/dune
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(library
(name tcpip_checksum_unix)
(public_name tcpip-checksum.unix)
(implements tcpip_checksum)
(implements tcpip-checksum)
(c_names checksum_stubs))

(copy_files# ../checksum_stubs.c)
Expand Down
3 changes: 2 additions & 1 deletion src/tcpip_checksum/xen/dune
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
(library
(name tcpip_checksum_xen)
(public_name tcpip-checksum.xen)
(implements tcpip_checksum)
(implements tcpip-checksum)
(libraries mirage-xen-ocaml)
(c_names checksum_stubs)
(c_flags (:include c_flags_xen.sexp)))

Expand Down
34 changes: 34 additions & 0 deletions tcpip-checksum.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
opam-version: "2.0"
maintainer: "anil@recoil.org"
homepage: "https://github.com/mirage/mirage-tcpip"
dev-repo: "git+https://github.com/mirage/mirage-tcpip.git"
bug-reports: "https://github.com/mirage/mirage-tcpip/issues"
doc: "https://mirage.github.io/mirage-tcpip/"
authors: [
"Anil Madhavapeddy" "Balraj Singh" "Richard Mortier" "Nicolas Ojeda Bar"
"Thomas Gazagnaire" "Vincent Bernardoff" "Magnus Skjegstad" "Mindy Preston"
"Thomas Leonard" "David Scott" "Gabor Pali" "Hannes Mehnert" "Haris Rotsos"
"Kia" "Luke Dunstan" "Pablo Polvorin" "Tim Cuthbertson" "lnmx" "pqwy" ]
license: "ISC"
tags: ["org:mirage"]

build: [
["dune" "subst"] {pinned}
["dune" "build" "-p" name "-j" jobs]
["dune" "runtest" "-p" name "-j" jobs] {with-test}
]

depends: [
"dune" {build & >= "1.0"}
"configurator" {build}
"ocaml" {>= "4.03.0"}
"cstruct" {>= "3.0.2"}
"mirage-xen-ocaml" {>= "3.1.0"}
]
synopsis: "Checksum functions for TCP/IP"
description: """
Virtual library tcpip-checksum with three implementations:
tcpip-checksum.ocaml: pure OCaml
tcpip-checksum.unix: Unix native version
tcpip-checksum.xen: Xen native version
"""
6 changes: 3 additions & 3 deletions tcpip.opam
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ build: [
]

depends: [
"dune" {build & >= "1.0"}
"dune" {build & >= "1.0"}
"configurator" {build}
"ocaml" {>= "4.03.0"}
"rresult" {>= "0.5.0"}
"cstruct" {>= "3.0.2"}
"cstruct-lwt"
"mirage-net" {>= "1.0.0"}
"mirage-net-lwt" {>= "1.0.0"}
"mirage-clock" {>= "1.2.0"}
Expand All @@ -35,6 +34,7 @@ depends: [
"mirage-protocols-lwt" {>= "1.4.0"}
"mirage-time-lwt" {>= "1.0.0"}
"ipaddr" {>= "3.0.0"}
"tcpip-checksum"
"macaddr"
"mirage-profile" {>= "0.5"}
"fmt"
Expand All @@ -47,7 +47,7 @@ depends: [
"ethernet"
"mirage-flow" {with-test & >= "1.2.0"}
"mirage-vnetif" {with-test & >= "0.4.0"}
"alcotest" {with-test & >="0.7.0"}
"alcotest" {with-test & >= "0.7.0"}
"pcap-format" {with-test}
"mirage-clock-unix" {with-test & >= "1.2.0"}
"mirage-random-test" {with-test}
Expand Down

0 comments on commit b6d5989

Please sign in to comment.