diff --git a/.travis.yml b/.travis.yml index 3c4bc68..b27eb4d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ env: global: - TESTS=true - PINS="charrua-core.dev:. charrua-unix.dev:. charrua-client.dev:. charrua-client-lwt.dev:. charrua-client-mirage.dev:." - - EXTRA_REMOTES="https://github.com/mirage/mirage-dev.git#layering" + - EXTRA_REMOTES="https://github.com/mirage/mirage-dev.git" matrix: - DISTRO="alpine" OCAML_VERSION="4.06" PACKAGE="charrua-client" - DISTRO="alpine" OCAML_VERSION="4.06" PACKAGE="charrua-client-lwt" diff --git a/CHANGES.md b/CHANGES.md index a1509bc..9c6d485 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,20 +1,24 @@ -### v0.11.2 2019-02-05 +### v0.12.0 (2019-02-25) + +* Adjust to mirage-net 2.0.0 and mirage-protocols 2.0.0 changes (#94, @hannesm) + +### v0.11.2 (2019-02-05) * build system ported to dune (#92, @hannesm) * compatibility with tcpip 3.7.0 (#91, @hannesm) * compatibility with rawlink 1.0 (#90, @hannesm) -### v0.11.1 2019-01-09 +### v0.11.1 (2019-01-09) * compatibility with ipaddr 3.0 (#88, @hannesm) * compatibility with tcpip 3.6.0 (#88, @hannesm) -### v0.11.0 2018-11-16 +### v0.11.0 (2018-11-16) * client: use the Random interface from Mirage directly, avoid calls to Stdlibrandom (removed from mirage-random 1.2.0) * unix: require lwt_log explicitly -### v0.10 2018-09-16 +### v0.10 (2018-09-16) * charrua-unix: safe-string support (@haesbaert) * client: add "anonymity profiles" by asking for common sets of options, to reduce the ease of profiling users by the set of DHCP requests sent (#76 @juga0) @@ -28,25 +32,25 @@ Mirage_protocols_lwt.IPV4 does not define the type alias ethif (#83 @hannesm) * build: various fixes (#71, #72 by @yomimono and @hannesm) -### v0.9 2017-08-02 +### v0.9 (2017-08-02) * core: re-implement UDP checksum on input (#63 @haesbaert) * client: implement renewal logic (breaking API change) (#60 @yomimono) * client: split mirage sublibrary into lwt sublibrary (timing logic) and mirage sublibrary (shims for MirageOS APIs) (#60 @yomimono) * numerous test and build bugfixes (#68 #64 #61 @samoht, #67 #66 #65 @djs55) -### v0.8 2017-06-12 +### v0.8 (2017-06-12) * Port to Jbuilder (#57 @avsm). -### v0.7 2017-14-04 +### v0.7 (2017-14-04) * Fixed a bug where only the first tuple from an option list would be parsed * Fixed parsing of long option lists * Fixed parsing for options 120 and 121 * Updated copyrights -### v0.6 2017-04-01 +### v0.6 (2017-04-01) * `Dhcp_wire.buf_of_pkt` now correctly rejects empty options * `Dhcp_wire.options_of_buf` now enforces minimun length on all cases @@ -54,13 +58,13 @@ * **CRITICAL** Fixed a bug where `dhcp_flags` was read from the wrong offset This bug was present in versions 0.4 and 0.5 -### v0.5 2017-03-14 +### v0.5 (2017-03-14) * Topkg support added * Time type on input_pkt changed to int32 * Bump tcpip support to version 3.1.0 -### v0.4 2017-01-21 +### v0.4 (2017-01-21) * MirageOS3 compatibility * Ocaml 4.02.3 deprecated @@ -72,7 +76,7 @@ This bug was present in versions 0.4 and 0.5 * Improved default lease time * Fixed cases where pkt_of_buf could raise an exception -### v0.3 2016-04-02 +### v0.3 (2016-04-02) * Fixed uninitialized data on packet parsing, normalized to zero * Lease.database moved out of Config.t @@ -83,13 +87,13 @@ This bug was present in versions 0.4 and 0.5 * Convert to ppx * Minor bug fixes -### v0.2 2015-11-10 +### v0.2 (2015-11-10) * Custom exceptions removed, only Invalid_argument now * Improved mli documentation * Major rewrite * Support ocaml 4.01 -### v0.1 2015-10-09 +### v0.1 (2015-10-09) * Initial release diff --git a/charrua-client-lwt.opam b/charrua-client-lwt.opam index 4034724..a978be0 100644 --- a/charrua-client-lwt.opam +++ b/charrua-client-lwt.opam @@ -22,13 +22,11 @@ depends: [ "charrua-client" {>= "0.12.0"} "cstruct" {>="3.0.2"} "ipaddr" {>="3.0.0"} - "rresult" "mirage-random" {>= "1.0.0"} "duration" "mirage-time-lwt" "mirage-net-lwt" {>= "2.0.0"} "logs" - "tcpip" {>= "3.6.0"} "fmt" "lwt" ] diff --git a/charrua-client-mirage.opam b/charrua-client-mirage.opam index 7fe8833..6224fe0 100644 --- a/charrua-client-mirage.opam +++ b/charrua-client-mirage.opam @@ -15,21 +15,14 @@ build: [ depends: [ "dune" {build & >= "1.0"} "ocaml" {>= "4.04.2"} - "charrua-core" {>= "0.12.0"} "charrua-client-lwt" {>= "0.12.0"} - "charrua-client" {>= "0.12.0"} - "cstruct" {>="3.0.2"} "ipaddr" {>= "3.0.0"} - "rresult" "mirage-random" {>= "1.0.0"} "mirage-clock" "mirage-time-lwt" "mirage-net-lwt" "mirage-protocols-lwt" - "duration" "logs" - "tcpip" {>= "3.6.0"} - "fmt" "lwt" ] synopsis: "A DHCP client for MirageOS" diff --git a/client/lwt/dune b/client/lwt/dune index 471f6bf..bb4e6d8 100644 --- a/client/lwt/dune +++ b/client/lwt/dune @@ -2,5 +2,5 @@ (name dhcp_client_lwt) (public_name charrua-client-lwt) (modules dhcp_client_lwt) - (libraries charrua-core.wire lwt charrua-client mirage-time-lwt - mirage-random mirage-net-lwt duration)) + (libraries charrua-core.wire lwt charrua-client cstruct ipaddr mirage-time-lwt + mirage-random mirage-net-lwt duration fmt logs)) diff --git a/client/mirage/dhcp_ipv4.ml b/client/mirage/dhcp_ipv4.ml index a7ac038..03dfbd5 100644 --- a/client/mirage/dhcp_ipv4.ml +++ b/client/mirage/dhcp_ipv4.ml @@ -1,10 +1,10 @@ open Lwt.Infix open Mirage_protocols_lwt -module Make(Dhcp_client : DHCP_CLIENT) (R : Mirage_random.C) (C : Mirage_clock.MCLOCK) (Ethif : ETHIF)(Arp : ARP) = struct +module Make(Dhcp_client : DHCP_CLIENT) (R : Mirage_random.C) (C : Mirage_clock.MCLOCK) (E : ETHERNET) (Arp : ARP) = struct (* for now, just wrap a static ipv4 *) - include Static_ipv4.Make(R)(C)(Ethif)(Arp) - let connect dhcp clock ethif arp = + include Static_ipv4.Make(R)(C)(E)(Arp) + let connect dhcp clock ethernet arp = Lwt_stream.last_new dhcp >>= fun (config : ipv4_config) -> - connect ~ip:config.address ~network:config.network ~gateway:config.gateway clock ethif arp + connect ~ip:config.address ~network:config.network ~gateway:config.gateway clock ethernet arp end diff --git a/client/mirage/dhcp_ipv4.mli b/client/mirage/dhcp_ipv4.mli index 66644ba..57c7be1 100644 --- a/client/mirage/dhcp_ipv4.mli +++ b/client/mirage/dhcp_ipv4.mli @@ -14,7 +14,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. *) -module Make (D: Mirage_protocols_lwt.DHCP_CLIENT) (R : Mirage_random.C) (C : Mirage_clock.MCLOCK) (E:Mirage_protocols_lwt.ETHIF) (A: Mirage_protocols_lwt.ARP) : sig +module Make (D: Mirage_protocols_lwt.DHCP_CLIENT) (R : Mirage_random.C) (C : Mirage_clock.MCLOCK) (E:Mirage_protocols_lwt.ETHERNET) (A: Mirage_protocols_lwt.ARP) : sig include Mirage_protocols_lwt.IPV4 val connect : D.t -> C.t -> E.t -> A.t -> t Lwt.t (** Connect to an ipv4 device using information from a DHCP lease. *) diff --git a/client/mirage/dune b/client/mirage/dune index 7f68baa..aa89796 100644 --- a/client/mirage/dune +++ b/client/mirage/dune @@ -1,6 +1,6 @@ (library (name dhcp_client_mirage) (public_name charrua-client-mirage) - (libraries charrua-client-lwt mirage-clock mirage-random mirage-time-lwt - mirage-net-lwt mirage-protocols-lwt) + (libraries charrua-client-lwt ipaddr mirage-clock mirage-random mirage-time-lwt + mirage-net-lwt mirage-protocols-lwt logs) (wrapped false))