Skip to content

Commit

Permalink
display flow label for ipv6
Browse files Browse the repository at this point in the history
  • Loading branch information
pythops committed Sep 23, 2024
1 parent 643953a commit 4753568
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions oryx-tui/src/packets/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl IpPacket {
let (transport_block, network_block) = {
let chunks = Layout::default()
.direction(Direction::Vertical)
.constraints([Constraint::Length(20), Constraint::Length(9)])
.constraints([Constraint::Length(20), Constraint::Length(10)])
.flex(ratatui::layout::Flex::SpaceAround)
.margin(2)
.split(block);
Expand All @@ -85,7 +85,7 @@ impl IpPacket {
let (transport_block, network_block) = {
let chunks = Layout::default()
.direction(Direction::Vertical)
.constraints([Constraint::Length(8), Constraint::Length(9)])
.constraints([Constraint::Length(8), Constraint::Length(10)])
.flex(ratatui::layout::Flex::SpaceAround)
.margin(2)
.split(block);
Expand All @@ -99,7 +99,7 @@ impl IpPacket {
let (transport_block, network_block) = {
let chunks = Layout::default()
.direction(Direction::Vertical)
.constraints([Constraint::Length(7), Constraint::Length(9)])
.constraints([Constraint::Length(7), Constraint::Length(10)])
.flex(ratatui::layout::Flex::SpaceAround)
.margin(2)
.split(block);
Expand Down Expand Up @@ -252,10 +252,15 @@ impl Ipv6Packet {
Span::styled("Traffic Class", Style::new().bold()),
Span::from(self.traffic_class.to_string()),
]),
// Row::new(vec![
// Span::styled("Flow Label", Style::new().bold()),
// Span::from(&self.flow_label.to_vec().to_string()),
// ]),
Row::new(vec![
Span::styled("Flow Label", Style::new().bold()),
Span::from(format!(
"{:#0x}",
(self.flow_label[0] as u32) << 16
| (self.flow_label[1] as u32) << 8
| (self.flow_label[2] as u32)
)),
]),
Row::new(vec![
Span::styled("Payload Length", Style::new().bold()),
Span::from(self.traffic_class.to_string()),
Expand Down

0 comments on commit 4753568

Please sign in to comment.