J-Schoepplenberg/zero-packet

Where to find TcpParser?

Closed this issue · 1 comments

Hi,

This is an interesting looking crate, and I have some ideas for contributions.

I was looking at the docs and see an example using TcpParser. Is that not yet implemented, or expected to be imported from another crate?

// Alternatively, just parse headers directly manually.
// By adjusting the index of the slice you can find different headers.
if let Some(tcp) = TcpParser::new(&packet)? {
    let src_port = tcp.get_src_port();
    // ...
}

https://docs.rs/zero-packet/0.0.8/zero_packet/#packetparser

Hey, thank you! Simply outdated example, since I'm still iterating around. It's supposed to be TcpReader now. :)