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

mark S.listen_{tcp(v4),udp(v4)} as deprecated #20

Merged
merged 2 commits into from
Nov 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
### v3.0.0

* Remove Mirage_stack_lwt module
* mark listen_{tcp(v4),udp(v4)} as deprecated, now that mirage-protocols 6.0.0
contains UDP.listen and TCP.listen
* Remove mirage-device dependency

### v2.2.0 (2020-09-28)

* add Mirage_stack.V4V6 module type (#19 @hannesm)
Expand Down
5 changes: 2 additions & 3 deletions mirage-stack.opam
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ homepage: "https://github.com/mirage/mirage-stack"
doc: "https://mirage.github.io/mirage-stack/"
bug-reports: "https://github.com/mirage/mirage-stack/issues"
depends: [
"ocaml" {>= "4.06.0"}
"ocaml" {>= "4.08.0"}
"dune" {>= "1.0"}
"mirage-device" {>= "2.0.0"}
"mirage-protocols" {>= "4.0.0"}
"fmt"
"lwt" {>= "4.0.0"}
]
build: [
["dune" "subst"] {pinned}
["dune" "subst"] {dev}
["dune" "build" "-p" name "-j" jobs]
]
dev-repo: "git+https://github.com/mirage/mirage-stack.git"
Expand Down
3 changes: 1 addition & 2 deletions src/dune
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
(library
(name mirage_stack)
(public_name mirage-stack)
(libraries mirage-protocols mirage-device fmt lwt)
(wrapped false))
(libraries mirage-protocols fmt lwt))
27 changes: 24 additions & 3 deletions src/mirage_stack.ml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
module type V4 = sig

include Mirage_device.S
type t
(** The type representing the internal state of the IPv4 stack. *)

val disconnect: t -> unit Lwt.t
(** Disconnect from the IPv4 stack. While this might take some time to
complete, it can never result in an error. *)

module UDPV4: Mirage_protocols.UDPV4

Expand All @@ -22,6 +27,7 @@ module type V4 = sig
configuration on the stack interface. *)

val listen_udpv4: t -> port:int -> UDPV4.callback -> unit
[@@ocaml.deprecated "use UDPV4.listen instead (since mirage-protocols 6.0.0)."]
(** [listen_udpv4 t ~port cb] registers the [cb] callback on the
UDPv4 [port] and immediately return. If [port] is invalid (not
between 0 and 65535 inclusive), it raises [Invalid_argument].
Expand All @@ -30,6 +36,7 @@ module type V4 = sig

val listen_tcpv4: ?keepalive:Mirage_protocols.Keepalive.t
-> t -> port:int -> (TCPV4.flow -> unit Lwt.t) -> unit
[@@ocaml.deprecated "use TCPV4.listen instead (since mirage-protocols 6.0.0)."]
(** [listen_tcpv4 ~keepalive t ~port cb] registers the [cb] callback
on the TCPv4 [port] and immediately return. If [port] is invalid (not
between 0 and 65535 inclusive), it raises [Invalid_argument].
Expand All @@ -45,7 +52,12 @@ module type V4 = sig
end

module type V6 = sig
include Mirage_device.S
type t
(** The type representing the internal state of the IPv6 stack. *)

val disconnect: t -> unit Lwt.t
(** Disconnect from the IPv6 stack. While this might take some time to
complete, it can never result in an error. *)

module UDP: Mirage_protocols.UDPV6

Expand All @@ -67,6 +79,7 @@ module type V6 = sig
configuration on the stack interface. *)

val listen_udp: t -> port:int -> UDP.callback -> unit
[@@ocaml.deprecated "use UDP.listen instead (since mirage-protocols 6.0.0)."]
(** [listen_udp t ~port cb] registers the [cb] callback on the
UDPv6 [port] and immediately return. If [port] is invalid (not
between 0 and 65535 inclusive), it raises [Invalid_argument].
Expand All @@ -75,6 +88,7 @@ module type V6 = sig

val listen_tcp: ?keepalive:Mirage_protocols.Keepalive.t
-> t -> port:int -> (TCP.flow -> unit Lwt.t) -> unit
[@@ocaml.deprecated "use TCP.listen instead (since mirage-protocols 6.0.0)."]
(** [listen_tcp ~keepalive t ~port cb] registers the [cb] callback
on the TCPv6 [port] and immediately return. If [port] is invalid (not
between 0 and 65535 inclusive), it raises [Invalid_argument].
Expand All @@ -90,7 +104,12 @@ module type V6 = sig
end

module type V4V6 = sig
include Mirage_device.S
type t
(** The type representing the internal state of the dual IPv4 and IPv6 stack. *)

val disconnect: t -> unit Lwt.t
(** Disconnect from the dual IPv4 and IPv6 stack. While this might take some
time to complete, it can never result in an error. *)

module UDP: Mirage_protocols.UDP with type ipaddr = Ipaddr.t

Expand All @@ -112,6 +131,7 @@ module type V4V6 = sig
configuration on the stack interface. *)

val listen_udp: t -> port:int -> UDP.callback -> unit
[@@ocaml.deprecated "use UDP.listen instead (since mirage-protocols 6.0.0)."]
(** [listen_udp t ~port cb] registers the [cb] callback on the
UDP [port] and immediately return. If [port] is invalid (not
between 0 and 65535 inclusive), it raises [Invalid_argument].
Expand All @@ -120,6 +140,7 @@ module type V4V6 = sig

val listen_tcp: ?keepalive:Mirage_protocols.Keepalive.t
-> t -> port:int -> (TCP.flow -> unit Lwt.t) -> unit
[@@ocaml.deprecated "use TCP.listen instead (since mirage-protocols 6.0.0)."]
(** [listen_tcp ~keepalive t ~port cb] registers the [cb] callback
on the TCP [port] and immediately return. If [port] is invalid (not
between 0 and 65535 inclusive), it raises [Invalid_argument].
Expand Down
3 changes: 0 additions & 3 deletions src/mirage_stack_lwt.ml

This file was deleted.