Skip to content

Commit

Permalink
misc(tcp): add documentation for TcpFlags
Browse files Browse the repository at this point in the history
Signed-off-by: Anhad Singh <[email protected]>
  • Loading branch information
Andy-Python-Programmer committed Oct 7, 2023
1 parent 14fd222 commit d25d5f7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/transport/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,22 @@ bitflags::bitflags! {
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(transparent)]
pub struct TcpFlags: u16 {
/// No more data from sender.
const FIN = 1 << 0;
/// Synchronize sequence numbers.
const SYN = 1 << 1;
/// Reset the connection.
const RST = 1 << 2;
/// Push Function.
const PSH = 1 << 3;
/// Acknowledgment field is significant.
const ACK = 1 << 4;
/// Urgent pointer field is significant.
const URG = 1 << 5;
/// ECN-Echo.
const ECE = 1 << 6;
/// Congestion Window Reduced.
const CWR = 1 << 7;
}
}

Expand Down

0 comments on commit d25d5f7

Please sign in to comment.