package dns-mirage

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

Parameters

Signature

module IPM : sig ... end

IPM is a map using ip * port as key.

type f

A 2byte-length per message flow abstraction, the embedding of DNS frames via TCP.

val of_flow : S.TCP.flow -> f

of_flow flow is f.

val flow : f -> S.TCP.flow

flow f is the underlying flow.

val read_tcp : f -> (Cstruct.t, unit) Stdlib.result Lwt.t

read_tcp f returns either a buffer or an error (logs actual error).

val send_tcp : S.TCP.flow -> Cstruct.t -> (unit, unit) Stdlib.result Lwt.t

send_tcp flow buf sends the buffer, either succeeds or fails (logs actual error).

val send_tcp_multiple : S.TCP.flow -> Cstruct.t list -> (unit, unit) Stdlib.result Lwt.t

send_tcp_multiple flow bufs sends the buffers, either succeeds or fails (logs actual error).

val send_udp : S.t -> int -> Ipaddr.t -> int -> Cstruct.t -> unit Lwt.t

send_udp stack source_port dst dst_port buf sends the buf as UDP packet to dst on dst_port.

OCaml

Innovation. Community. Security.