a bunch of really (not)good tests
This commit is contained in:
parent
2db5e1d3ac
commit
43ec0ddbca
4 changed files with 246 additions and 7 deletions
4
src/lib.rs
Normal file
4
src/lib.rs
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
pub mod sniffing;
|
||||
pub mod config;
|
||||
pub mod geoparsers;
|
||||
pub mod startup;
|
||||
10
src/main.rs
10
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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue