From 2c52955edc33ceb556e15a410f6d5e90aefcf243 Mon Sep 17 00:00:00 2001 From: Nawasan Wisitsingkhon Date: Sun, 19 May 2024 11:28:41 +0700 Subject: [PATCH] packet_out change port_id to in_port --- src/openflow/events/packet_out.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/openflow/events/packet_out.rs b/src/openflow/events/packet_out.rs index 8b3ae6c..3ec495d 100644 --- a/src/openflow/events/packet_out.rs +++ b/src/openflow/events/packet_out.rs @@ -14,7 +14,7 @@ use super::{flow_mod::SizeCheck, FlowAction, Payload}; pub struct PacketOutEvent { pub payload: Payload, - pub port_id: Option, + pub in_port: Option, pub actions: Vec, } @@ -24,7 +24,7 @@ impl MessageMarshal for PacketOutEvent { Payload::Buffered(n, _) => n as i32, Payload::NoBuffered(_) => -1, }); - match self.port_id { + match self.in_port { Some(id) => { PseudoPort::PhysicalPort(id).marshal(bytes); } @@ -53,9 +53,9 @@ impl MessageMarshal for PacketOutEvent { } impl PacketOutEvent { - pub fn new(port_id: Option, payload: Payload, actions: Vec) -> Self { + pub fn new(in_port: Option, payload: Payload, actions: Vec) -> Self { Self { - port_id, + in_port, payload, actions, } @@ -82,7 +82,7 @@ impl PacketOutEvent { Payload::Buffered(n as u32, bytes.fill_buf().unwrap().to_ascii_lowercase()) } }, - port_id: { + in_port: { if in_port == OfpPort::None as u16 { None } else {