Commit fddc1a6c authored by Nawasan Wisitsingkhon's avatar Nawasan Wisitsingkhon

send packet_out in controller

parent a7725227
...@@ -45,12 +45,17 @@ impl<OME: OfpMsgEvent> ControllerFrame<OME> for Controller<OME> { ...@@ -45,12 +45,17 @@ impl<OME: OfpMsgEvent> ControllerFrame<OME> for Controller<OME> {
dst_src_match.mac_src = Some(mac_dst); dst_src_match.mac_src = Some(mac_dst);
let actions = vec![FlowAction::Oputput(PseudoPort::PhysicalPort(*p))]; let actions = vec![FlowAction::Oputput(PseudoPort::PhysicalPort(*p))];
self.add_flow(xid, src_dst_match, actions, stream); self.add_flow(0, src_dst_match, actions, stream);
let actions = vec![FlowAction::Oputput(PseudoPort::PhysicalPort(src_port))]; let actions = vec![FlowAction::Oputput(PseudoPort::PhysicalPort(src_port))];
self.add_flow(xid, dst_src_match, actions, stream); self.add_flow(0, dst_src_match, actions, stream);
// let pkt_out = let packet_out = self.ofp.packet_out(
None,
packetin.payload,
vec![FlowAction::Oputput(PseudoPort::PhysicalPort(*p))],
);
self.send_msg(packet_out, xid, stream);
} }
None => todo!(), None => todo!(),
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment