Commit 47df7ae9 authored by Nawasan Wisitsingkhon's avatar Nawasan Wisitsingkhon

update ofp version code

parent a4ddcb00
use tenjin::{example, openflow::ofp10::ControllerFrame10}; use tenjin::{example, openflow::ofp13::ControllerFrame13};
extern crate byteorder; extern crate byteorder;
fn main() -> Result<(), std::io::Error> { fn main() -> Result<(), std::io::Error> {
let controller = example::Controller10::new(); let controller = example::Controller13::new();
controller.listener("127.0.0.1:6633"); controller.listener("127.0.0.1:6633");
Ok(()) Ok(())
} }
...@@ -23,7 +23,7 @@ impl OpenflowHeader for OfpHeader { ...@@ -23,7 +23,7 @@ impl OpenflowHeader for OfpHeader {
} }
} }
fn version(&self) -> usize { fn version(&self) -> usize {
1 4
} }
fn message(&self) -> u8 { fn message(&self) -> u8 {
self.message self.message
......
...@@ -35,10 +35,10 @@ impl OfpMsgEvent for Openflow13 { ...@@ -35,10 +35,10 @@ impl OfpMsgEvent for Openflow13 {
PacketOutEvent::new(port_id, payload, actions) PacketOutEvent::new(port_id, payload, actions)
} }
fn ofp_version() -> usize { fn ofp_version() -> usize {
1 4
} }
fn version(&self) -> usize { fn version(&self) -> usize {
1 4
} }
fn header(&self, message: u8, length: u16, xid: u32) -> OfpHeader { fn header(&self, message: u8, length: u16, xid: u32) -> OfpHeader {
......
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