lib: serialize MAC RACH attempts to GSMTAP

This also refactors the gsmtap code into a neater module, and adds MAC
UL & DL logs to our diag capture.
This commit is contained in:
Will Greenberg
2026-06-18 13:45:59 -07:00
committed by Will Greenberg
parent 64c59d5e08
commit 30f663be2f
11 changed files with 266 additions and 33 deletions
+11
View File
@@ -0,0 +1,11 @@
use deku::reader::Reader;
use std::io::Cursor;
pub fn unhexlify(hexlified_bytes: &str) -> (usize, Reader<Cursor<Vec<u8>>>) {
let byte_len = hexlified_bytes.len() / 2;
let bytes = (0..hexlified_bytes.len())
.step_by(2)
.map(|i| u8::from_str_radix(&hexlified_bytes[i..i + 2], 16).unwrap())
.collect();
(byte_len, Reader::new(Cursor::new(bytes)))
}