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§
- E2ECheck
Result - Result from an E2E check operation.
- E2EKey
- Identifies a data element for E2E protection lookup.
- Profile4
Config - Configuration for E2E Profile 4.
- Profile4
State - State for E2E Profile 4 protection/checking.
- Profile5
Config - Configuration for E2E Profile 5.
- Profile5
State - State for E2E Profile 5 protection/checking.
Enums§
- E2ECheck
Status - 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§
- PROFIL
E4_ HEADER_ SIZE - Profile 4 header size in bytes.
- PROFIL
E5_ 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.