👎Deprecated since 0.1.1:
renamed to ule; update your Cargo.toml
Expand description
Structs§
- Payload
Chain - The decoded payload area of an SNDU (RFC 4326 §5): a chain of extension
headers terminated by a final
TypeField(an EtherType, or the introducing Type of a trailing Mandatory header) and the opaque PDU bytes. - Sndu
- A parsed/owned SubNetwork Data Unit (RFC 4326 §4).
- UleReceiver
- A de-fragmenting ULE receiver (RFC 4326 §7).
Enums§
- Error
- A ULE parse / serialize error.
- Extension
Header - A single ULE extension header in a chain (RFC 4326 §5).
- MandatoryH
Type - Typed H-Type for a Mandatory extension header (
H-LEN = 0, RFC 4326 §5). - OptionalH
Type - Typed H-Type for an Optional extension header (
H-LEN = 1..=5, RFC 4326 §5). - Type
Field - A decoded ULE Type field (RFC 4326 §4.4).
Constants§
- BASE_
HEADER_ LEN - Size in bytes of the SNDU base header (
D+Length+Type). - CRC_LEN
- Size in bytes of the CRC-32 trailer.
- END_
INDICATOR - The two-byte value (
D = 1,Length = 0x7FFF) that marks an End Indicator. - END_
INDICATOR_ LENGTH - The 15-bit
Lengthvalue of an End Indicator — all length bits set. - ETHERTYPE_
BOUNDARY - The boundary between Next-Header codes and EtherTypes (RFC 4326 §4.4): decimal 1536. Values below are Next-Headers; values at or above are EtherTypes.
- ETHERTYPE_
IPV4 - IPv4 EtherType (RFC 4326 §4.7.2).
- ETHERTYPE_
IPV6 - IPv6 EtherType (RFC 4326 §4.7.3).
- H_
TYPE_ BRIDGED_ FRAME - H-Type of the Bridged-Frame mandatory extension header (RFC 4326 §5.2).
- H_
TYPE_ EXT_ PADDING - H-Type of the Extension-Padding optional extension header (RFC 4326 §5.3),
IANA value
0x100→H-Typebyte0x00,H-LEN1..=5. - H_
TYPE_ PDU_ CONCAT - H-Type of the PDU-Concat mandatory extension header (RFC 5163 §3.2).
- H_
TYPE_ TEST_ SNDU - H-Type of the Test-SNDU mandatory extension header (RFC 4326 §5.1).
- H_
TYPE_ TIMESTAMP - H-Type of the TimeStamp optional extension header (RFC 5163 §3.3),
decimal 257 →
H-Typebyte0x01withH-LEN = 3. - H_
TYPE_ TS_ CONCAT - H-Type of the MPEG-2 TS-Concat mandatory extension header (RFC 5163 §3.1).
- NPA_LEN
- Size in bytes of the Destination NPA address (present when
D = 0). - PADDING_
BYTE - The 0xFF byte used for TS-payload padding / stuffing (§4.3, §6).
- TS_
PAYLOAD_ LEN - The number of TS-packet payload bytes when AFC =
01(payload only): the 188-byte packet minus its 4-byte header (RFC 4326 §3).
Functions§
- is_
end_ indicator trueif the two bytes at the start ofdataare a ULE End Indicator (0xFFFF:D = 1,Length = 0x7FFF) — no further SNDUs in this TS packet (RFC 4326 §4.3).
Type Aliases§
- Result
- Result alias for ULE parsing.