Skip to content

Commit

Permalink
Expose the various values in the TcpOption structure for external pro…
Browse files Browse the repository at this point in the history
…gram access
  • Loading branch information
rikonaka committed Aug 18, 2023
1 parent 87f362d commit 50c2bad
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pnet_packet/src/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,13 @@ pub mod TcpOptionNumbers {
#[packet]
pub struct TcpOption {
#[construct_with(u8)]
number: TcpOptionNumber,
pub number: TcpOptionNumber,
#[length_fn = "tcp_option_length"]
// The length field is an optional field, using a Vec is a way to implement
// it
length: Vec<u8>,
// The length field is an optional field, using a Vec is a way to implement it.
pub length: Vec<u8>,
#[length_fn = "tcp_option_payload_length"]
#[payload]
data: Vec<u8>,
pub data: Vec<u8>,
}

impl TcpOption {
Expand Down

0 comments on commit 50c2bad

Please sign in to comment.