package tcpip
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=86ba5d92f9078bddc65312f63b5f4ce34fd2570d765433b23a226ab84d75a9c0
sha512=a348a597cf4ba1e19f7fc97d6d1cb980711d09b6944efacba91d23daf419fc8cb8a83a2d263bcc7b96ff5d37ad5dbfa4a3879db9ac4c0b35528b80acb87cf8f7
doc/tcpip.ipv6/Ipv6/Make/index.html
Module Ipv6.MakeSource
Parameters
module N : Mirage_net.Smodule E : Ethernet.Smodule R : Mirage_random.Smodule T : Mirage_time.Smodule Clock : Mirage_clock.MCLOCKSignature
include Tcpip.Ip.S
with type ipaddr = Ipaddr.V6.t
and type prefix = Ipaddr.V6.Prefix.t
The type for IP errors.
The type for IP addresses.
The type for the IP address and netmask.
The type representing the internal state of the IP layer.
Disconnect from the IP layer. While this might take some time to complete, it can never result in an error.
An input continuation used by the parsing functions to pass on an input packet down the stack.
callback ~src ~dst buf will be called with src and dst containing the source and destination IP address respectively, and buf will be a buffer pointing at the start of the IP payload.
val input :
t ->
tcp:callback ->
udp:callback ->
default:(proto:int -> callback) ->
Cstruct.t ->
unit Lwt.tinput ~tcp ~udp ~default ip buf demultiplexes an incoming buffer that contains an IP frame. It examines the protocol header and passes the result onto either the tcp or udp function, or the default function for unknown IP protocols.
val write :
t ->
?fragment:bool ->
?ttl:int ->
?src:ipaddr ->
ipaddr ->
Tcpip.Ip.proto ->
?size:int ->
(Cstruct.t -> int) ->
Cstruct.t list ->
(unit, error) result Lwt.twrite t ~fragment ~ttl ~src dst proto ~size headerf payload allocates a buffer, writes the IP header, and calls the headerf function. This may write to the provided buffer of size (default 0). If size + ip header exceeds the maximum transfer unit, an error is returned. The payload is appended. The optional fragment argument defaults to true, in which case multiple IP-fragmented frames are sent if the payload is too big for a single frame. When it is false, the don't fragment bit is set and if the payload and header would exceed the maximum transfer unit, an error is returned.
pseudoheader t ~src dst proto len gives a pseudoheader suitable for use in TCP or UDP checksum calculation based on t.
src ip ~dst is the source address to be used to send a packet to dst. In the case of IPv4, this will always return the same IP, which is the only one set.
Get the IP addresses associated with this interface. For IPv4, only one IP address can be set at a time, so the list will always be of length 1 (and may be the default value, [10.0.0.2]).
Get the prefix associated with this interface. For IPv4, only one prefix can be set at a time, so the list will always be of length 1, e.g. [10.0.0.2/24].
val connect :
?no_init:bool ->
?handle_ra:bool ->
?cidr:Ipaddr.V6.Prefix.t ->
?gateway:Ipaddr.V6.t ->
N.t ->
E.t ->
t Lwt.t