1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! Ethernet bus integration for MDF4 files.
//!
//! This module provides utilities for logging Ethernet traffic to MDF4 files
//! following the ASAM MDF4 Bus Logging specification.
//!
//! # Features
//!
//! - ASAM MDF4 Bus Logging compliant `ETH_Frame` format
//! - Support for standard and jumbo frames
//! - Direction tracking (Tx/Rx)
//! - VLAN tag support (802.1Q)
//! - Common EtherType constants
//!
//! # Example
//!
//! ```ignore
//! use mdf4_rs::ethernet::{RawEthernetLogger, MacAddress, EthernetFrame, ethertype};
//!
//! // Create logger
//! let mut logger = RawEthernetLogger::new()?;
//!
//! // Log from raw bytes
//! logger.log(timestamp_us, &frame_bytes);
//!
//! // Or construct and log a frame
//! let frame = EthernetFrame::new(
//! MacAddress::broadcast(),
//! MacAddress::new([0x00, 0x11, 0x22, 0x33, 0x44, 0x55]),
//! ethertype::IPV4,
//! payload.to_vec(),
//! );
//! logger.log_frame(timestamp_us, frame);
//!
//! // Log with explicit direction
//! logger.log_tx(timestamp_us, &tx_frame_bytes);
//! logger.log_rx(timestamp_us, &rx_frame_bytes);
//!
//! // Finalize
//! let mdf_bytes = logger.finalize()?;
//! ```
// Re-export frame types
pub use ;
// Re-export logger
pub use RawEthernetLogger;