summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs4
-rw-r--r--src/main.rs10
-rw-r--r--src/sniffing/headers.rs4
3 files changed, 11 insertions, 7 deletions
diff --git a/src/lib.rs b/src/lib.rs
new file mode 100644
index 0000000..29905b0
--- /dev/null
+++ b/src/lib.rs
@@ -0,0 +1,4 @@
+pub mod sniffing;
+pub mod config;
+pub mod geoparsers;
+pub mod startup;
diff --git a/src/main.rs b/src/main.rs
index 464146a..d90ae5d 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,9 +1,9 @@
-mod config;
-mod geoparsers;
-pub mod sniffing;
-mod startup;
+// mod config;
+// mod geoparsers;
+// pub mod sniffing;
+// mod startup;
-use startup::init;
+use nsc::startup::init;
use std::io::Read;
diff --git a/src/sniffing/headers.rs b/src/sniffing/headers.rs
index c90a849..9b605b9 100644
--- a/src/sniffing/headers.rs
+++ b/src/sniffing/headers.rs
@@ -3,7 +3,7 @@ use tun::Error;
// Here we will recieve bytes and try to get their destanation & apply Rules for them.
use crate::config::Config;
-#[derive(Debug)]
+#[derive(Debug, PartialEq)]
pub enum Protocol {
TCP,
UDP,
@@ -12,7 +12,7 @@ pub enum Protocol {
type Ipv4 = [u8; 4];
type Ipv6 = [u8; 16];
type Port = u16;
-#[derive(Debug)]
+#[derive(Debug, PartialEq)]
pub enum PacketInfo {
// <https://www.geeksforgeeks.org/computer-networks/what-is-ipv4/>
V4 {