Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: remove excessive formatting in dgram.md #35234

Merged
merged 1 commit into from
Sep 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions doc/api/dgram.md
Original file line number Diff line number Diff line change
Expand Up @@ -520,25 +520,25 @@ client.connect(41234, 'localhost', (err) => {

#### Note about UDP datagram size

The maximum size of an `IPv4/v6` datagram depends on the `MTU`
(_Maximum Transmission Unit_) and on the `Payload Length` field size.
The maximum size of an IPv4/v6 datagram depends on the `MTU`
(Maximum Transmission Unit) and on the `Payload Length` field size.

* The `Payload Length` field is `16 bits` wide, which means that a normal
payload cannot exceed 64K octets _including_ the internet header and data
* The `Payload Length` field is 16 bits wide, which means that a normal
payload cannot exceed 64K octets including the internet header and data
(65,507 bytes = 65,535 − 8 bytes UDP header − 20 bytes IP header);
this is generally true for loopback interfaces, but such long datagram
messages are impractical for most hosts and networks.

* The `MTU` is the largest size a given link layer technology can support for
datagram messages. For any link, `IPv4` mandates a minimum `MTU` of `68`
octets, while the recommended `MTU` for IPv4 is `576` (typically recommended
datagram messages. For any link, IPv4 mandates a minimum `MTU` of 68
octets, while the recommended `MTU` for IPv4 is 576 (typically recommended
as the `MTU` for dial-up type applications), whether they arrive whole or in
fragments.

For `IPv6`, the minimum `MTU` is `1280` octets, however, the mandatory minimum
fragment reassembly buffer size is `1500` octets. The value of `68` octets is
For IPv6, the minimum `MTU` is 1280 octets. However, the mandatory minimum
fragment reassembly buffer size is 1500 octets. The value of 68 octets is
very small, since most current link layer technologies, like Ethernet, have a
minimum `MTU` of `1500`.
minimum `MTU` of 1500.

It is impossible to know in advance the MTU of each link through which
a packet might travel. Sending a datagram greater than the receiver `MTU` will
Expand Down