package tcpip
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=59377ed359080d8da94aec91474a533bad955c12be79827bec853ccb496d659a
sha512=3f2ed5cbd5bdcd9a664e9ee0b7dbfc65b0a698e6c4bb77ee6a85a139b18cdee24415d76fb821466a9aff2e390318a8657b83871768c259557f25684ab6ccf83b
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.