Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt to mirage/mirage-protocols#28 changes: #457

Merged
merged 2 commits into from
Nov 11, 2021
Merged

Conversation

hannesm
Copy link
Member

@hannesm hannesm commented Nov 7, 2021

TCP and UDP layers (direct & socket):
type ipinput is gone
val handle no longer has a ~listener argument
val listen : t -> ~port:int -> (?keepalive) -> callback -> unit
val unlisten : t -> ~port:int -> unit

On the code level: the listener hash tables moved from stack-* to tcp and udp
(tcp/flow; udp/udp; tcp{v4,v6.v4v6}_socket; udp{v4,v6,v4v6}_socket).

This moved quite some code in the socket stack from the tcpip_stack_socket to
the respective tcp/udp layers.

Adapt to mirage/mirage-protocols#28 changes (that are required); fixes #452

Any review would be highly appreciated. The merge and release plan is to first cut a mirage-protocols release (with exising tcpip getting upper bounds), then a mirage-tcpip release with mirage-protocols lower bound.

@dinosaure
Copy link
Member

So I did a quick look on this PR (don't have enough time to really go deeper) and I really like the interface which gives to us a chance to de-allocate the listening resource.

May be @talex5 can do an other view about lwt stuffs and the switch_off field but it seems fine for me 👍.

TCP and UDP layers (direct & socket):
type ipinput is gone
val handle no longer has a ~listener argument
val listen : t -> ~port:int -> (?keepalive) -> callback -> unit
val unlisten : t -> ~port:int -> unit

On the code level: the listener hash tables moved from stack-* to tcp and udp
(tcp/flow; udp/udp; tcp{v4,v6.v4v6}_socket; udp{v4,v6,v4v6}_socket).

This moved quite some code in the socket stack from the tcpip_stack_socket to
the respective tcp/udp layers.
@hannesm
Copy link
Member Author

hannesm commented Nov 11, 2021

strangely somehow the CI (analysis phase), even after "rebuild", does not seem to know anything about mirage-protocols 6.0.0 (merged yesterday ocaml/opam-repository@df836af) -- any insights how/when/why this happens?

@talex5
Copy link
Contributor

talex5 commented Nov 11, 2021

We recently added signature checks for GitHub events. Possibly the opam-repository configuration needs updating with a secret. I'll see if I can find someone with access to that...

@talex5
Copy link
Contributor

talex5 commented Nov 11, 2021

OK, should be building now - thanks to @dra27!

@hannesm
Copy link
Member Author

hannesm commented Nov 11, 2021

CI succeeded, apart from ppc64 which timed out.

@hannesm hannesm merged commit 6681eda into mirage:main Nov 11, 2021
@hannesm hannesm deleted the new-stack branch November 11, 2021 11:18
hannesm added a commit to hannesm/opam-repository that referenced this pull request Nov 11, 2021
CHANGES:

* Adapt to mirage-protocols 6.0.0 API (mirage/mirage-tcpip#457 @hannesm)
* TCP and UDP now have a listen and unlisten function (fixes mirage/mirage-tcpip#452)
* type ipinput (in TCP and UDP) and listener (in TCP) have been removed
hannesm added a commit to hannesm/mirage-tcpip that referenced this pull request Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unlisten of a port
3 participants