package tcpip

  1. Overview
  2. Docs
OCaml TCP/IP networking stack, used in MirageOS

Install

dune-project
 Dependency

Authors

Maintainers

Sources

tcpip-v6.4.0.tbz
sha256=6e32bf540d291e9b7325cb3dd00df2f695533e009c46ea534d5518b9492c7348
sha512=2e9f9ca2eeac637599eb48e087b4632598539f1c76f9251758995c7eedeb723f8b951d557a2a53b85a58d50a04e68e15598581f88fca8997733e800fcfca422b

doc/tcpip.ipv4/Ipv4_packet/Marshal/index.html

Module Ipv4_packet.MarshalSource

Sourcetype error = string
Sourceval protocol_to_int : protocol -> Cstruct.uint16
Sourceval pseudoheader : src:Ipaddr.V4.t -> dst:Ipaddr.V4.t -> proto:protocol -> int -> Cstruct.t

pseudoheader src dst proto len constructs a pseudoheader, suitable for inclusion in transport-layer checksum calculations, including the information supplied. len should be the total length of the transport-layer header and payload.

Sourceval into_cstruct : payload_len:int -> t -> Cstruct.t -> (unit, error) result

into_cstruct ~payload_len t buf attempts to write a header representing t (including t.options) into buf at offset 0. If there is insufficient space to represent t, an error will be returned.

Sourceval make_cstruct : payload_len:int -> t -> Cstruct.t

make_cstruct ~payload_len t allocates, fills, and returns a buffer repesenting the IPV4 header corresponding to t. If t.options is non-empty, t.options will be concatenated onto the result. A variable amount of memory (at least 20 bytes for a zero-length options field) will be allocated. Note: no space is allocated for the payload.

OCaml

Innovation. Community. Security.