Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #11 from hannesm/less-types
Browse files Browse the repository at this point in the history
remove netif and 'netif config types, also ip is no longer part of UDP/TCP
  • Loading branch information
hannesm authored Sep 14, 2018
2 parents eaac102 + b83053b commit 20375f2
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ env:
global:
- EXTRA_REMOTES="https://github.com/mirage/mirage-dev.git"
- PACKAGE="mirage-stack"
- PINS="mirage-stack-lwt:."
- PINS="mirage-stack:. mirage-stack-lwt:."
- REVDEPS=true
- DEPOPTS="mirage-stack-lwt"
matrix:
Expand Down
15 changes: 9 additions & 6 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
v1.2.0 2017-09-06
-----------------
### v1.3.0 2018-09-15

- remove unused type `netif` and `'netif config` from V4 signature
- remove `'netif stackv4_config` and `socket_stack_config`
- adjust to mirage-protocols 1.4.0: remove `ip` from UDPV4 and TCPV4

### v1.2.0 2017-09-06

- add an optional argument ?keepalive to `listen_tcpv4` which allows TCP
keepalives on accepted connections.
- jbuilder is now a build dependency

v1.1.0 2017-06-16
-----------------
### v1.1.0 2017-06-16

- port to Jbuilder

v1.0.0 2016-12-29
-----------------
### v1.0.0 2016-12-29

- import V4 module type from mirage-types and mirage-types-lwt, where it was STACKV4
9 changes: 0 additions & 9 deletions lwt/mirage_stack_lwt.ml
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
type 'netif stackv4_config = {
name: string;
interface: 'netif;
}

type socket_stack_config =
Ipaddr.V4.t list

module type V4 = sig
include Mirage_stack.V4
with type 'a io = 'a Lwt.t
and type 'a config = 'a stackv4_config
and type ipv4addr = Ipaddr.V4.t
and type buffer = Cstruct.t
end
4 changes: 2 additions & 2 deletions mirage-stack-lwt.opam
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ bug-reports: "https://github.com/mirage/mirage-stack/issues"
tags: ["org:mirage"]

build: [
[ "jbuilder" "subst" ] {pinned}
[ "jbuilder" "subst" "-p" name ] {pinned}
[ "jbuilder" "build" "-p" name "-j" jobs ]
]

depends: [
"jbuilder" {build & >="1.0+beta9"}
"mirage-stack" {>= "1.0.0"}
"mirage-stack" {>= "1.3.0"}
"ipaddr"
"lwt"
"cstruct" {>= "2.4.0"}
Expand Down
4 changes: 2 additions & 2 deletions mirage-stack.opam
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ bug-reports: "https://github.com/mirage/mirage-stack/issues"
tags: ["org:mirage"]

build: [
[ "jbuilder" "subst" ] {pinned}
[ "jbuilder" "subst" "-p" name ] {pinned}
[ "jbuilder" "build" "-p" name "-j" jobs ]
]

depends: [
"jbuilder" {build & >="1.0+beta9"}
"mirage-device" {>= "1.0.0"}
"mirage-protocols" {>= "1.3.0"}
"mirage-protocols" {>= "1.4.0"}
"fmt"
]

Expand Down
10 changes: 0 additions & 10 deletions src/mirage_stack.ml
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
module type V4 = sig
type netif
(** The type for network interface that is used to transmit and
receive traffic associated with this stack. *)

type 'netif config
(** The type for the collection of user configuration specified to
construct a stack. *)

type ipv4addr
(** The type for IPv4 addresses. *)

Expand All @@ -29,14 +21,12 @@ module type V4 = sig
and type ipaddr = ipv4addr
and type buffer = buffer
and type t = udpv4
and type ip = ipv4

module TCPV4: Mirage_protocols.TCP
with type +'a io = 'a io
and type ipaddr = ipv4addr
and type buffer = buffer
and type t = tcpv4
and type ip = ipv4

module IPV4: Mirage_protocols.IPV4
with type +'a io = 'a io
Expand Down

0 comments on commit 20375f2

Please sign in to comment.