package tcpip
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=36b4c156be16702ba4c6d781a2da8ba1462b22370d15570e1116056cbf025233
sha512=56a1aab616349152beff7d0a504db15dc3d0010cb36322ce06b7abb43bd9d1a6ec0daa23fd6632fcc758c89737ba48046bb591d4a70021e273b80e716b55c44f
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.