Commit f1c8a60e authored by Nawasan Wisitsingkhon's avatar Nawasan Wisitsingkhon

update version and update readme

parent 1a980996
...@@ -10,7 +10,7 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" ...@@ -10,7 +10,7 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]] [[package]]
name = "tenjin" name = "tenjin"
version = "0.1.0" version = "0.2.0"
dependencies = [ dependencies = [
"byteorder", "byteorder",
] ]
[package] [package]
name = "tenjin" name = "tenjin"
version = "0.1.0" version = "0.2.0"
edition = "2021" edition = "2021"
[lib] [lib]
......
...@@ -8,6 +8,48 @@ To understand The software-defined networking well, I trying to create a simple ...@@ -8,6 +8,48 @@ To understand The software-defined networking well, I trying to create a simple
## Get started ## Get started
### Openflow 1.3
1. import Controller13 into main func.
```rust
use tenjin::{example, openflow::ofp13::ControllerFrame13};
extern crate byteorder;
fn main() -> Result<(), std::io::Error> {
let controller = example::Controller13::new();
controller.listener("127.0.0.1:6633");
Ok(())
}
```
2. run Tenjin
```bash
cargo run --release
```
3. run mininet
```bash
sudo mn --controller=remote,ip=127.0.0.1 --mac --switch=ovsk,protocols=OpenFlow13 --topo=tree,2
```
### Openflow 1.0
import Controller10 into main func.
```rust
use tenjin::{example, openflow::ofp10::ControllerFrame10};
extern crate byteorder;
fn main() -> Result<(), std::io::Error> {
let controller = example::Controller10::new();
controller.listener("127.0.0.1:6633");
Ok(())
}
```
run Tenjin run Tenjin
```bash ```bash
......
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