package mirage-dns

  1. Overview
  2. Docs
type error = private [>
  1. | Mirage_protocols.Ip.error
]
val pp_error : error Fmt.t
type buffer = buffer
type ethif
type ipaddr = ipv4addr
type prefix
type 'a io = 'a io
type t = ipv4
val disconnect : t -> unit io
type callback = src:ipaddr -> dst:ipaddr -> buffer -> unit io
val input : t -> tcp:callback -> udp:callback -> default:(proto:int -> callback) -> buffer -> unit io
val allocate_frame : t -> dst:ipaddr -> proto:[ `ICMP | `TCP | `UDP ] -> buffer * int
val write : t -> buffer -> buffer -> (unit, error) Pervasives.result io
val writev : t -> buffer -> buffer list -> (unit, error) Pervasives.result io
val checksum : buffer -> buffer list -> int
val pseudoheader : t -> dst:ipaddr -> proto:[< `TCP | `UDP ] -> int -> buffer
val src : t -> dst:ipaddr -> ipaddr
val set_ip : t -> ipaddr -> unit io
val get_ip : t -> ipaddr list
type uipaddr
val to_uipaddr : ipaddr -> uipaddr
val of_uipaddr : uipaddr -> ipaddr option
val mtu : t -> int
OCaml

Innovation. Community. Security.