Skip to content
Commit 753daa65 authored by Patrik Flykt's avatar Patrik Flykt Committed by Anas Nashif
Browse files

net: pkt: Compute TX payload data length



Compute the length of the TX payload that is transported in one
IPv4 or IPv6 datagram taking into account UDP, ICMP or TCP
headers in addition to any IPv6 extension headers added by RPL.
The TCP implementation in Zephyr is known to currently carry at
maximum 8 bytes of options. If the protocol is not known to the
stack, assume that the application handles any protocol headers
as well as the data. Also, if the net_pkt does not have a
context associated, length check on the data is omitted when
appending.

Although payload length is calculated also for TCP, the TCP MSS
value is used as before.

Define IPv4 minimum MTU as 576 octets, See RFC 791, Sections 3.1.
and 3.2.

Signed-off-by: default avatarPatrik Flykt <patrik.flykt@intel.com>
parent 9097a664
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment