package tcpip
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=6e32bf540d291e9b7325cb3dd00df2f695533e009c46ea534d5518b9492c7348
sha512=2e9f9ca2eeac637599eb48e087b4632598539f1c76f9251758995c7eedeb723f8b951d557a2a53b85a58d50a04e68e15598581f88fca8997733e800fcfca422b
doc/tcpip.stack-socket/Tcpip_stack_socket/V4/index.html
Module Tcpip_stack_socket.V4
Source
include Mirage_stack.V4
with module UDPV4 = Udpv4_socket
and module TCPV4 = Tcpv4_socket
and module IPV4 = Ipv4_socket
The type representing the internal state of the IPv4 stack.
Disconnect from the IPv4 stack. While this might take some time to complete, it can never result in an error.
udpv4 t
obtains a descriptor for use with the UDPV4
module, usually to transmit traffic.
tcpv4 t
obtains a descriptor for use with the TCPV4
module, usually to initiate outgoing connections.
ipv4 t
obtains a descriptor for use with the IPV4
module, which can handle raw IPv4 frames, or manipulate IP address configuration on the stack interface.
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
. Multiple bindings to the same port will overwrite previous bindings, so callbacks will not chain if ports clash.
val listen_tcpv4 :
?keepalive:Mirage_protocols.Keepalive.t ->
t ->
port:int ->
(TCPV4.flow -> unit Lwt.t) ->
unit
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
. Multiple bindings to the same port will overwrite previous bindings, so callbacks will not chain if ports clash. If ~keepalive
is provided then these keepalive settings will be applied to the accepted connections before the callback is called.