Skip to content

Commit

Permalink
Bump version to 0.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
SajjadPourali committed Jul 24, 2024
1 parent 88bfd2c commit f7220f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ['Narrowlink <opensource@narrowlink.com>']
description = 'Asynchronous lightweight userspace implementation of TCP/IP stack for Tun device'
name = "ipstack"
version = "0.0.10"
version = "0.1.0"
edition = "2021"
license = "Apache-2.0"
repository = 'https://github.com/narrowlink/ipstack'
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Unstable, under development.
### Usage

```rust
use etherparse::{IcmpEchoHeader, Icmpv4Header};
use etherparse::{IcmpEchoHeader, Icmpv4Header, IpNumber};
use ipstack::stream::IpStackStream;
use std::net::{IpAddr, Ipv4Addr, SocketAddr};
use tokio::net::TcpStream;
Expand Down Expand Up @@ -58,7 +58,7 @@ async fn main() {
});
}
IpStackStream::UnknownTransport(u) => {
if u.src_addr().is_ipv4() && u.ip_protocol() == etherparse::IpNumber(1) {
if u.src_addr().is_ipv4() && IpNumber::from(u.ip_protocol()) == IpNumber::ICMP {
let (icmp_header, req_payload) = Icmpv4Header::from_slice(u.payload()).unwrap();
if let etherparse::Icmpv4Type::EchoRequest(req) = icmp_header.icmp_type {
println!("ICMPv4 echo");
Expand Down

0 comments on commit f7220f8

Please sign in to comment.