Commit e9c80cc6 authored by Nawasan Wisitsingkhon's avatar Nawasan Wisitsingkhon

remove some code that is unused

parent 9c508a2c
use std::{io::Write, mem::size_of, net::TcpStream}; use std::{io::Write, mem::size_of, net::TcpStream};
use byteorder::{BigEndian, WriteBytesExt}; use byteorder::{BigEndian, WriteBytesExt};
use etherparse::SlicedPacket;
use super::OfpHeader; use super::OfpHeader;
...@@ -29,13 +28,7 @@ impl Controller { ...@@ -29,13 +28,7 @@ impl Controller {
} }
pub fn packetIn(&self, xid: u32, payload: &Vec<u8>, stream: &mut TcpStream) { pub fn packetIn(&self, xid: u32, payload: &Vec<u8>, stream: &mut TcpStream) {
match SlicedPacket::from_ethernet(&payload) { // pass
Ok(value) => {
println!("vlan {:?}", value.vlan);
println!("net {:?}", value.net);
},
Err(_) => println!("Error"),
}
} }
pub fn send(&self, xid: u32, message: u8, payload: &Vec<u8>, stream: &mut TcpStream) { pub fn send(&self, xid: u32, message: u8, payload: &Vec<u8>, stream: &mut TcpStream) {
......
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