package tcpip
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=d452e23f4e62c8b32c977f742e72c50fe673b82e23dc80b29d8263be764d2c72
sha512=9a4aeb5c7ec0392524d1d261026e5de047dec09054f2dca63d9743aed1d27ccfd655ae693554091b4ef7d9eabfeef218e71e8bf13ea8304ebedd8e8a7d4f484a
doc/tcpip.ipv4/Ipv4_packet/Marshal/index.html
Module Ipv4_packet.Marshal
Source
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.
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.
make_cstruct ~payload_len t
allocates, fills, and returns a buffer representing 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.