Commit ada96ca1 authored by Nawasan Wisitsingkhon's avatar Nawasan Wisitsingkhon

fix: error code

parent e9c80cc6
...@@ -16,7 +16,7 @@ struct EthernetFrame { ...@@ -16,7 +16,7 @@ struct EthernetFrame {
impl EthernetFrame { impl EthernetFrame {
fn parse(payload: &Vec<u8>) { fn parse(payload: &Vec<u8>) {
let mut bytes = Cursor::new(*payload); let mut bytes = Cursor::new(payload.to_vec());
let mut mac_des = vec![0u8; 6]; let mut mac_des = vec![0u8; 6];
let mut mac_src = vec![0u8; 6]; let mut mac_src = vec![0u8; 6];
for i in 0..6 { for i in 0..6 {
......
...@@ -40,7 +40,7 @@ fn main() -> Result<(), std::io::Error> { ...@@ -40,7 +40,7 @@ fn main() -> Result<(), std::io::Error> {
println!("Hello event"); println!("Hello event");
} }
Msg::PacketIn(b) => { Msg::PacketIn(b) => {
controller.packetIn(xid, &payload, &mut stream); controller.packetIn(packet.xid, &payload, &mut stream);
println!("PacketIn event"); println!("PacketIn event");
} }
_ => { _ => {
......
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