Skip to main content

Module e2e

Module e2e 

Source
Expand description

End-to-end (E2E) protection utilities for SOME/IP payloads. E2E (End-to-End) protection for SOME/IP payloads.

This module implements E2E Profile 4 and Profile 5 protection as specified in the Open SOME/IP Specification.

§Example

use simple_someip::e2e::{
    Profile4Config, Profile4State,
    protect_profile4, check_profile4,
    E2ECheckStatus,
};

let config = Profile4Config::new(0x12345678, 15);
let mut protect_state = Profile4State::new();
let mut check_state = Profile4State::new();

let payload = b"Hello, SOME/IP!";
let mut buf = [0u8; 128];
let len = protect_profile4(&config, &mut protect_state, payload, &mut buf).unwrap();

let result = check_profile4(&config, &mut check_state, &buf[..len]);
assert!(matches!(result.status, E2ECheckStatus::Ok));

Structs§

E2ECheckResult
Result from an E2E check operation.
E2EKey
Identifies a data element for E2E protection lookup.
Profile4Config
Configuration for E2E Profile 4.
Profile4State
State for E2E Profile 4 protection/checking.
Profile5Config
Configuration for E2E Profile 5.
Profile5State
State for E2E Profile 5 protection/checking.

Enums§

E2ECheckStatus
Status result from E2E check operations.
E2EProfile
Describes which E2E profile to apply for a given data element.
Error
Errors that can occur during E2E protection or checking.

Constants§

PROFILE4_HEADER_SIZE
Profile 4 header size in bytes.
PROFILE5_HEADER_SIZE
Profile 5 header size in bytes.

Functions§

check_profile4
Check E2E Profile 4 protected data.
check_profile5
Check E2E Profile 5 protected data.
check_profile5_with_header
Check E2E Profile 5 protected data with SOME/IP upper-header in the CRC.
protect_profile4
Add E2E Profile 4 protection to a payload.
protect_profile5
Add E2E Profile 5 protection to a payload.
protect_profile5_with_header
Add E2E Profile 5 protection with SOME/IP upper-header in the CRC.