package tcpip
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=916e688aba897676c444db8129f4963ad739f8d1be631d9e009c6228b4b7d6ed
sha512=a8f5fa8f7e96758075c93211132839950477b756fba490207a7d630f2766757bbb44bbdd02e2b1f2b4a7d83d4d8b10d34cb03903bbd516e7d7c1a9a987eb1915
doc/tcpip.ipv4/Ipv4_packet/Marshal/index.html
Module Ipv4_packet.MarshalSource
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.