Skip to content

Commit

Permalink
update version and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Arikato111 committed Aug 4, 2024
1 parent 1a98099 commit f1c8a60
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tenjin"
version = "0.1.0"
version = "0.2.0"
edition = "2021"

[lib]
Expand Down
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,48 @@ To understand The software-defined networking well, I trying to create a simple

## 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

```bash
Expand Down

0 comments on commit f1c8a60

Please sign in to comment.