package mirage-qubes-ipv4

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Parameters

module D : Qubes.S.DB
module R : Mirage_random.S
module C : Mirage_clock.MCLOCK
module Ethernet : Ethernet.S
module Arp : Arp.S

Signature

include Tcpip.Ip.S with type ipaddr = Ipaddr.V4.t
type nonrec error = private [>
  1. | Tcpip__Ip.error
]
val pp_error : error Fmt.t
type ipaddr = Ipaddr.V4.t
val pp_ipaddr : ipaddr Fmt.t
type t
val disconnect : t -> unit Lwt.t
type callback = src:ipaddr -> dst:ipaddr -> Cstruct.t -> unit Lwt.t
val input : t -> tcp:callback -> udp:callback -> default:(proto:int -> callback) -> Cstruct.t -> unit Lwt.t
val write : t -> ?fragment:bool -> ?ttl:int -> ?src:ipaddr -> ipaddr -> Tcpip__Ip.proto -> ?size:int -> (Cstruct.t -> int) -> Cstruct.t list -> (unit, error) Stdlib.result Lwt.t
val pseudoheader : t -> ?src:ipaddr -> ipaddr -> Tcpip__Ip.proto -> int -> Cstruct.t
val src : t -> dst:ipaddr -> ipaddr
val get_ip : t -> ipaddr list
val mtu : t -> dst:ipaddr -> int
val connect : D.t -> Ethernet.t -> Arp.t -> t Lwt.t

connect db ethernet arp attempts to use the provided db * to look up the correct IPV4 information, and construct * an ipv4 implementation based on ethernet and arp. If db * can't be read or doesn't contain useful values, connect will * raise a failure.

OCaml

Innovation. Community. Security.