diff --git a/Cargo.lock b/Cargo.lock index c60c788..7060a7b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -750,21 +750,6 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" -[[package]] -name = "orca" -version = "0.1.0" -dependencies = [ - "bytes", - "chrono", - "crc", - "deku", - "env_logger", - "libc", - "log", - "pcap-file", - "thiserror", -] - [[package]] name = "parking_lot" version = "0.12.1" @@ -902,6 +887,21 @@ checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" [[package]] name = "rayhunter" version = "0.1.0" +dependencies = [ + "bytes", + "chrono", + "crc", + "deku", + "env_logger", + "libc", + "log", + "pcap-file", + "thiserror", +] + +[[package]] +name = "rayhunter-daemon" +version = "0.1.0" dependencies = [ "axum", "chrono", @@ -911,7 +911,7 @@ dependencies = [ "include_dir", "log", "mime_guess", - "orca", + "rayhunter", "serde", "tempdir", "thiserror", diff --git a/Cargo.toml b/Cargo.toml index 958cdeb..11a66a4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [workspace] members = [ - "orca", - "rayhunter", + "lib", + "bin", ] resolver = "2" diff --git a/bin/Cargo.toml b/bin/Cargo.toml index 9538413..63f96d0 100644 --- a/bin/Cargo.toml +++ b/bin/Cargo.toml @@ -1,12 +1,14 @@ [package] -name = "rayhunter" +name = "rayhunter-daemon" version = "0.1.0" edition = "2021" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[[bin]] +name = "rayhunter" +path = "src/main.rs" [dependencies] -orca = { path = "../orca" } +rayhunter = { path = "../lib" } toml = "0.8.8" serde = { version = "1.0.193", features = ["derive"] } tokio = { version = "1.35.1", features = ["full"] } diff --git a/bin/src/diag.rs b/bin/src/diag.rs index 3aefe1b..1086ec2 100644 --- a/bin/src/diag.rs +++ b/bin/src/diag.rs @@ -2,11 +2,11 @@ use std::sync::Arc; use axum::extract::State; use axum::http::StatusCode; -use orca::diag_device::DiagDevice; -use orca::diag_reader::DiagReader; +use rayhunter::diag_device::DiagDevice; +use rayhunter::diag_reader::DiagReader; use tokio::sync::RwLock; use tokio::sync::mpsc::{Receiver, self}; -use orca::qmdl::QmdlWriter; +use rayhunter::qmdl::QmdlWriter; use log::{debug, info}; use tokio::sync::mpsc::error::TryRecvError; use tokio::task::JoinHandle; diff --git a/bin/src/error.rs b/bin/src/error.rs index 42c5f48..78d15a8 100644 --- a/bin/src/error.rs +++ b/bin/src/error.rs @@ -1,5 +1,5 @@ use thiserror::Error; -use orca::diag_device::DiagDeviceError; +use rayhunter::diag_device::DiagDeviceError; use crate::qmdl_store::QmdlStoreError; diff --git a/bin/src/main.rs b/bin/src/main.rs index 41aec2c..55fab69 100644 --- a/bin/src/main.rs +++ b/bin/src/main.rs @@ -17,10 +17,10 @@ use crate::error::RayhunterError; use axum::response::Redirect; use diag::{DiagDeviceCtrlMessage, start_recording, stop_recording}; use log::{info, error}; -use orca::diag_device::DiagDevice; +use rayhunter::diag_device::DiagDevice; use axum::routing::{get, post}; use axum::Router; -use orca::qmdl::QmdlWriter; +use rayhunter::qmdl::QmdlWriter; use stats::get_qmdl_manifest; use tokio::sync::mpsc::{self, Sender}; use tokio::task::JoinHandle; diff --git a/bin/src/pcap.rs b/bin/src/pcap.rs index ea51ba1..7694c39 100644 --- a/bin/src/pcap.rs +++ b/bin/src/pcap.rs @@ -1,9 +1,9 @@ use crate::ServerState; -use orca::gsmtap_parser::GsmtapParser; -use orca::pcap::GsmtapPcapWriter; -use orca::qmdl::{QmdlReader, QmdlReaderError}; -use orca::diag_reader::DiagReader; +use rayhunter::gsmtap_parser::GsmtapParser; +use rayhunter::pcap::GsmtapPcapWriter; +use rayhunter::qmdl::{QmdlReader, QmdlReaderError}; +use rayhunter::diag_reader::DiagReader; use axum::body::Body; use axum::http::header::CONTENT_TYPE; use axum::extract::{State, Path}; diff --git a/bin/static/index.html b/bin/static/index.html index c7387b1..3ba9b67 100644 --- a/bin/static/index.html +++ b/bin/static/index.html @@ -1,6 +1,6 @@ - ORCA + rayhunter