ot::Ip6::PadOption::InitToPadHeaderWithSize() method
Initializes the Pad Option for padding an IPv6 Extension header with a given current size. The Extension Header Length is in 8-bytes unit, so the total size should be a multiple of 8. This method determines the Pad Option size needed for appending to Extension Header based on it current size @p aHeaderSize so to make it a multiple of 8. This method returns `kErrorAlready` when the @p aHeaderSize is already a multiple of 8 (i.e., no padding is needed).
Arguments
The current IPv6 Extension header size (in bytes).
Return value
kErrorNone The Pad Option is successfully initialized. kErrorAlready The @p aHeaderSize is already a multiple of 8 and no padding is needed.
![]()
if (padOption.InitToPadHeaderWithSize(len + sizeof(hdr)) == kErrorNone)
ot::Ip6::PadOption::InitToPadHeaderWithSize() is called by 3 functions and calls 1 function:
![]()
ot::Ip6::PadOption::InitToPadHeaderWithSize()
ot::Ip6::PadOption::InitToPadHeaderWithSize() reads 3 variables:
![]()
ot::Ip6::PadOption::InitToPadHeaderWithSize()