ekko

Crates.ioekko
lib.rsekko
version0.7.3
sourcesrc
created_at2020-10-06 15:52:20.107906
updated_at2023-05-14 20:46:24.854351
descriptionEkko is a simple and light utility for sending echo requests.
homepagehttps://github.com/dev-bio/ekko
repositoryhttps://github.com/dev-bio/ekko
max_upload_size
id296648
size50,070
André Storfjord Kristiansen (dev-bio)

documentation

README

Ekko - Echo Request Utility

Echo Request Utility

dependency status Documentation License


Ekko aims to be a light utility for sending echo requests; currently in its early stages.

Usage

To use ekko, add this to your Cargo.toml:

[dependencies]
ekko = "0.7.3"

Example

The following example will trace the route to the specified destination.

use ekko::{ 

    EkkoResponse,
    EkkoError,
    Ekko,
};

fn main() -> Result<(), EkkoError> {
    let sender = Ekko::with_target([8, 8, 8, 8])?;

    for hops in 0..32 {
        let responses = sender.send_range(0..hops)?;
        for ekko in responses.iter() {
            match ekko {

                EkkoResponse::Destination(_) => {
                    for ekko in responses.iter() {
                        println!("{ekko:?}")
                    }
    
                    return Ok(()) 
                }

                _ => continue
            }
        }
    }

    Ok(())
}

Contributing

All contributions are welcome, don't hesitate to open an issue if something is missing!

License

MIT

Commit count: 74

cargo fmt