|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Data Structures | |
| struct | net_dplpmtud_path |
| Transport-owned DPLPMTUD path handle. More... | |
Macros | |
| #define | NET_DPLPMTUD_BASE_PLPMTU 1200U |
| Default base PLPMTU from RFC 8899/RFC 9000 for UDP-based transports. | |
Enumerations | |
| enum | net_dplpmtud_state { NET_DPLPMTUD_STATE_BASE = 0 , NET_DPLPMTUD_STATE_SEARCHING , NET_DPLPMTUD_STATE_SEARCH_COMPLETE , NET_DPLPMTUD_STATE_ERROR } |
| DPLPMTUD search state. More... | |
Functions | |
| int | net_dplpmtud_init_path (struct net_dplpmtud_path *path, const struct net_sockaddr *dst, uint16_t max_plpmtu) |
| Initialize a DPLPMTUD path handle for a remote destination. | |
| void | net_dplpmtud_set_path_max_plpmtu (struct net_dplpmtud_path *path, uint16_t max_plpmtu) |
| Update the transport-local maximum PLPMTU for a path. | |
| int | net_dplpmtud_get_path_mtu (struct net_dplpmtud_path *path) |
| Get the currently validated PLPMTU for a path. | |
| int | net_dplpmtud_get_path_probe_size (struct net_dplpmtud_path *path) |
| Get the next probe size a transport may transmit for a path. | |
| bool | net_dplpmtud_path_probe_in_flight (struct net_dplpmtud_path *path) |
| Check whether a probe is currently in flight for a path. | |
| int | net_dplpmtud_on_path_probe_sent (struct net_dplpmtud_path *path, uint16_t probe_size) |
| Report that a probe has been sent for a path. | |
| int | net_dplpmtud_on_path_probe_acked (struct net_dplpmtud_path *path, uint16_t probe_size) |
| Report that a probe was acknowledged for a path. | |
| int | net_dplpmtud_on_path_probe_lost (struct net_dplpmtud_path *path, uint16_t probe_size) |
| Report that a probe was lost for a path. | |
| void | net_dplpmtud_note_path_blackhole (struct net_dplpmtud_path *path) |
| Report black-hole fallback for a path. | |
Generic Datagram Packetization Layer Path MTU Discovery (:rfc:8899) for UDP transports. The stack owns per-destination search state (validated PLPMTU, probe size, retry counters). Each transport owns probe packet construction, send with don't fragment, and confirmation through its loss-recovery path.
Typical integration:
ICMP Packet Too Big (PTB) updates through the PMTU destination cache are applied automatically. Validated probe results are written back into that cache for other stack users.
QUIC uses this API internally; see :ref:quic_dplpmtud.
| #define NET_DPLPMTUD_BASE_PLPMTU 1200U |
#include <zephyr/net/dplpmtud.h>
Default base PLPMTU from RFC 8899/RFC 9000 for UDP-based transports.
| enum net_dplpmtud_state |
#include <zephyr/net/dplpmtud.h>
DPLPMTUD search state.
| int net_dplpmtud_get_path_mtu | ( | struct net_dplpmtud_path * | path | ) |
#include <zephyr/net/dplpmtud.h>
Get the currently validated PLPMTU for a path.
The path must have been initialized with net_dplpmtud_init_path(). This call does not create per-destination DPLPMTUD state.
| path | Initialized path handle |
| int net_dplpmtud_get_path_probe_size | ( | struct net_dplpmtud_path * | path | ) |
#include <zephyr/net/dplpmtud.h>
Get the next probe size a transport may transmit for a path.
The path must have been initialized with net_dplpmtud_init_path(). This call does not create per-destination DPLPMTUD state.
| path | Initialized path handle |
| int net_dplpmtud_init_path | ( | struct net_dplpmtud_path * | path, |
| const struct net_sockaddr * | dst, | ||
| uint16_t | max_plpmtu ) |
#include <zephyr/net/dplpmtud.h>
Initialize a DPLPMTUD path handle for a remote destination.
| path | Path handle to initialize |
| dst | Remote destination address |
| max_plpmtu | Transport-local maximum PLPMTU, or 0 if uncapped |
| 0 | on success |
| -EINVAL | if an argument is invalid |
| -ENOMEM | if no DPLPMTUD state entry can be created |
| void net_dplpmtud_note_path_blackhole | ( | struct net_dplpmtud_path * | path | ) |
#include <zephyr/net/dplpmtud.h>
Report black-hole fallback for a path.
Resets the validated PLPMTU toward the base size, stops probing, and records the path in the error state. Transports may also call this when they detect a black hole without an ICMP PTB.
| path | Initialized path handle |
| int net_dplpmtud_on_path_probe_acked | ( | struct net_dplpmtud_path * | path, |
| uint16_t | probe_size ) |
#include <zephyr/net/dplpmtud.h>
Report that a probe was acknowledged for a path.
| path | Initialized path handle |
| probe_size | Probe size acknowledged by the transport |
| 0 | on success |
| negative | errno otherwise |
| int net_dplpmtud_on_path_probe_lost | ( | struct net_dplpmtud_path * | path, |
| uint16_t | probe_size ) |
#include <zephyr/net/dplpmtud.h>
Report that a probe was lost for a path.
| path | Initialized path handle |
| probe_size | Probe size declared lost by the transport |
| 0 | on success |
| negative | errno otherwise |
| int net_dplpmtud_on_path_probe_sent | ( | struct net_dplpmtud_path * | path, |
| uint16_t | probe_size ) |
#include <zephyr/net/dplpmtud.h>
Report that a probe has been sent for a path.
| path | Initialized path handle |
| probe_size | Probe size sent by the transport |
| 0 | on success |
| -EINVAL | if an argument is invalid |
| -EMSGSIZE | if the probe exceeds the transport-local path limit |
| negative | errno from the DPLPMTUD core otherwise |
| bool net_dplpmtud_path_probe_in_flight | ( | struct net_dplpmtud_path * | path | ) |
#include <zephyr/net/dplpmtud.h>
Check whether a probe is currently in flight for a path.
The path must have been initialized with net_dplpmtud_init_path(). This call does not create per-destination DPLPMTUD state.
| path | Initialized path handle |
| void net_dplpmtud_set_path_max_plpmtu | ( | struct net_dplpmtud_path * | path, |
| uint16_t | max_plpmtu ) |
#include <zephyr/net/dplpmtud.h>
Update the transport-local maximum PLPMTU for a path.
| path | Initialized path handle |
| max_plpmtu | Transport-local maximum PLPMTU, or 0 if uncapped |