Rip is already taken on crates.io

This commit is contained in:
Kevin Cotugno 2018-11-29 20:26:34 -08:00
parent 03e18b00b1
commit 2c106cdd26
6 changed files with 21 additions and 21 deletions

2
Cargo.lock generated
View File

@ -54,7 +54,7 @@ dependencies = [
] ]
[[package]] [[package]]
name = "rip" name = "ripper"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",

View File

@ -1,19 +1,19 @@
[package] [package]
name = "rip" name = "ripper"
version = "0.1.0" version = "0.1.0"
authors = ["Kevin Cotugno <kevin@kevincotugno.com>"] authors = ["Kevin Cotugno <kevin@kevincotugno.com>"]
[[bin]] [[bin]]
name = "rip" name = "ripper"
path = "src/bin/client.rs" path = "src/bin/client.rs"
[[bin]] [[bin]]
name = "rip-server" name = "ripper-server"
path = "src/bin/server.rs" path = "src/bin/server.rs"
[lib] [lib]
name = "rip" name = "ripper"
path = "src/rip/lib.rs" path = "src/ripper/lib.rs"
[dependencies] [dependencies]
clap = "~2.32" clap = "~2.32"

View File

@ -1 +1 @@
# Rip # Ripper

View File

@ -4,11 +4,11 @@ use std::io::Write;
use std::net::IpAddr; use std::net::IpAddr;
fn main() { fn main() {
let port = rip::DEFAULT_PORT.to_string(); let port = ripper::DEFAULT_PORT.to_string();
let args = App::new(rip::NAME) let args = App::new(ripper::NAME)
.version(rip::VERSION) .version(ripper::VERSION)
.author(rip::AUTHOR) .author(ripper::AUTHOR)
.about(rip::ABOUT) .about(ripper::ABOUT)
.arg( .arg(
Arg::with_name("port") Arg::with_name("port")
.short("p") .short("p")
@ -42,10 +42,10 @@ fn run(args: &ArgMatches) -> Result<IpAddr, String> {
Err(_) => return Err("Port must be a valid unsigned 16bit integer".to_string()), Err(_) => return Err("Port must be a valid unsigned 16bit integer".to_string()),
}; };
let dest = match rip::parse_socket_addr(args.value_of("host").unwrap(), port) { let dest = match ripper::parse_socket_addr(args.value_of("host").unwrap(), port) {
Ok(v) => v, Ok(v) => v,
Err(err) => return Err(err), Err(err) => return Err(err),
}; };
rip::run_client(dest) ripper::run_client(dest)
} }

View File

@ -1,14 +1,14 @@
extern crate clap; extern crate clap;
use clap::{App, Arg, ArgMatches}; use clap::{App, Arg, ArgMatches};
const NAME: &str = "rip-server"; const NAME: &str = "ripper-server";
fn main() { fn main() {
let port = rip::DEFAULT_PORT.to_string(); let port = ripper::DEFAULT_PORT.to_string();
let args = App::new(NAME) let args = App::new(NAME)
.version(rip::VERSION) .version(ripper::VERSION)
.author(rip::AUTHOR) .author(ripper::AUTHOR)
.about(rip::ABOUT) .about(ripper::ABOUT)
.arg( .arg(
Arg::with_name("port") Arg::with_name("port")
.short("p") .short("p")
@ -32,5 +32,5 @@ fn run(args: &ArgMatches) -> Result<(), String> {
Err(_) => return Err("Port must be a valid unsigned 16bit integer".to_string()), Err(_) => return Err("Port must be a valid unsigned 16bit integer".to_string()),
}; };
rip::run_server(port) ripper::run_server(port)
} }

View File

@ -2,7 +2,7 @@ use std::io;
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, UdpSocket}; use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, UdpSocket};
use std::time::Duration; use std::time::Duration;
pub const NAME: &str = "rip"; pub const NAME: &str = "ripper";
pub const VERSION: &str = "0.1.0"; pub const VERSION: &str = "0.1.0";
pub const ABOUT: &str = "Rip is a simple client/server to retrieving a public IP via UDP."; pub const ABOUT: &str = "Rip is a simple client/server to retrieving a public IP via UDP.";
pub const AUTHOR: &str = "Kevin Cotugno <kevin@kevincotugno.com>"; pub const AUTHOR: &str = "Kevin Cotugno <kevin@kevincotugno.com>";