diff --git a/README.md b/README.md index 3277a56b..d759d66f 100644 --- a/README.md +++ b/README.md @@ -330,13 +330,14 @@ ## Supported network services Please, remember that this is just a convention: - > **Warning** + > [!WARNING] > > The Internet Assigned Numbers Authority (IANA) is responsible for maintaining > the official assignments of port numbers for specific uses.
> However, many unofficial uses of well-known port numbers occur in practice. - The full list of services is generated from Nmap's service collection and is available in the file `services.txt`. + Sniffnet's list of services is generated from [Nmap's service collection](https://nmap.org/book/nmap-services.html) + and is available in the file [`services.txt`](https://raw.githubusercontent.com/GyulyVGC/sniffnet/main/services.txt). diff --git a/build.rs b/build.rs index 2b94d460..23623522 100644 --- a/build.rs +++ b/build.rs @@ -31,8 +31,8 @@ fn set_icon() { } fn build_services_phf() { - let path = Path::new(&env::var("OUT_DIR").unwrap()).join("services.rs"); - let mut file = BufWriter::new(File::create(path).unwrap()); + let out_path = Path::new(&env::var("OUT_DIR").unwrap()).join("services.rs"); + let mut output = BufWriter::new(File::create(out_path).unwrap()); let mut services_map = phf_codegen::Map::new(); @@ -53,7 +53,7 @@ fn build_services_phf() { assert_eq!(num_entries, 12066); writeln!( - &mut file, + &mut output, "#[allow(clippy::unreadable_literal)]\n\ static SERVICES: phf::Map = {};", services_map.build() diff --git a/src/networking/types/protocol.rs b/src/networking/types/protocol.rs index eb812929..5e2c1781 100644 --- a/src/networking/types/protocol.rs +++ b/src/networking/types/protocol.rs @@ -1,3 +1,5 @@ +// WARNING: this file is imported in build.rs + /// Enum representing the possible observed values of protocol. #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] #[allow(clippy::upper_case_acronyms)] diff --git a/src/networking/types/service_query.rs b/src/networking/types/service_query.rs index 716113ed..514cc89a 100644 --- a/src/networking/types/service_query.rs +++ b/src/networking/types/service_query.rs @@ -1,3 +1,5 @@ +// WARNING: this file is imported in build.rs + use std::hash::Hash; /// Used to query the phf services map (key of the map).