package arp

  1. Overview
  2. Docs
Address Resolution Protocol purely in OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

arp-3.1.1.tbz
sha256=ea33c589e9deea300fb62bc2ba0b557cfdfeea4f40e600685b3a68c6868f06f1
sha512=5824ea057094d6035cac4235f0dd984af9d56fb9ec9aa621af3bc24674c97df328cd77efb749743f295f94c040e39d9b1caf68a13253393685dfae02fce6e869

doc/arp.mirage/Arp/module-type-S/index.html

Module type Arp.SSource

Address resolution protocol, translating network addresses (e.g. IPv4) into link layer addresses (MAC).

Sourcetype t

The type representing the internal state of the ARP layer.

Sourceval disconnect : t -> unit Lwt.t

Disconnect from the ARP layer. While this might take some time to complete, it can never result in an error.

Sourcetype error = private [>
  1. | `Timeout
]

The type for ARP errors.

Sourceval pp_error : error Fmt.t

pp_error is the pretty-printer for errors.

Sourceval pp : t Fmt.t

Prettyprint cache contents

Sourceval get_ips : t -> Ipaddr.V4.t list

get_ips arp gets the bound IP address list in the arp value.

Sourceval set_ips : t -> Ipaddr.V4.t list -> unit Lwt.t

set_ips arp sets the bound IP address list, which will transmit a GARP packet also.

Sourceval remove_ip : t -> Ipaddr.V4.t -> unit Lwt.t

remove_ip arp ip removes ip to the bound IP address list in the arp value, which will transmit a GARP packet for any remaining IPs in the bound IP address list after the removal.

Sourceval add_ip : t -> Ipaddr.V4.t -> unit Lwt.t

add_ip arp ip adds ip to the bound IP address list in the arp value, which will transmit a GARP packet also.

Sourceval query : t -> Ipaddr.V4.t -> (Macaddr.t, error) result Lwt.t

query arp ip queries the cache in arp for an ARP entry corresponding to ip, which may result in the sender sleeping waiting for a response.

Sourceval input : t -> Cstruct.t -> unit Lwt.t

input arp frame will handle an ARP frame. If it is a response, it will update its cache, otherwise will try to satisfy the request.

OCaml

Innovation. Community. Security.