package tcpip

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

Install

dune-project
 Dependency

Authors

Maintainers

Sources

tcpip-8.1.0.tbz
sha256=86ba5d92f9078bddc65312f63b5f4ce34fd2570d765433b23a226ab84d75a9c0
sha512=a348a597cf4ba1e19f7fc97d6d1cb980711d09b6944efacba91d23daf419fc8cb8a83a2d263bcc7b96ff5d37ad5dbfa4a3879db9ac4c0b35528b80acb87cf8f7

doc/tcpip.udp/Udp_packet/Marshal/index.html

Module Udp_packet.MarshalSource

Sourcetype error = string
Sourceval into_cstruct : pseudoheader:Cstruct.t -> payload:Cstruct.t -> t -> Cstruct.t -> (unit, error) result

into_cstruct ~pseudoheader ~payload t buf attempts to assemble a UDP header in buf with t.src_port and t.dst_port set, along with the correct length and checksum. It does not write pseudoheader or payload into the buffer, but requires them to calculate the correct checksum.

Sourceval make_cstruct : pseudoheader:Cstruct.t -> payload:Cstruct.t -> t -> Cstruct.t

make_cstruct ~pseudoheader ~payload t allocates, fills, and and returns a buffer representing the UDP header corresponding to t. make_cstruct will allocate 8 bytes for the UDP header. payload and pseudoheader are not directly represented in the output, and are required for correct computation of the UDP checksum only. The checksum will be properly set to reflect the pseudoheader, header, and payload.

OCaml

Innovation. Community. Security.