#port #description #service #protocols #information

port-desc

Port service description library from internet assigned number authority

2 releases

0.1.1 Aug 17, 2024
0.1.0 Aug 16, 2024

#1468 in Network programming

Download history 286/week @ 2024-08-16 5/week @ 2024-08-23 40/week @ 2024-08-30 54/week @ 2024-09-06 86/week @ 2024-09-13 65/week @ 2024-09-20 51/week @ 2024-09-27 51/week @ 2024-10-04 69/week @ 2024-10-11 51/week @ 2024-10-18 31/week @ 2024-10-25 33/week @ 2024-11-01 27/week @ 2024-11-08 32/week @ 2024-11-15 35/week @ 2024-11-22 76/week @ 2024-11-29

173 downloads per month
Used in netscanner

MIT license

1MB
181 lines

port-desc

Port service description library from internet assigned number authority

Usage

Include in the Cargo.toml file:

port-desc = { version = "0.1.1" }

then

use port_desc::{PortDescription, TransportProtocol};

fn main() {
    let ports = PortDescription::defult();
    match ports {
        Ok(p) => {
            let port_num = 80;
            let entry = p.get_port_service_name(port_num, TransportProtocol::Tcp);
            println!("TCP Port {} service name: {}", port_num, entry);
        },
        Err(e) => {
            println!("{:?}", e);
        }
    }
}

You can always take a look at examples files.

Dependencies

~1.4–2.2MB
~33K SLoC