Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
Tenjin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nawasan Wisitsingkhon
Tenjin
Commits
38b947f3
Commit
38b947f3
authored
Oct 20, 2024
by
Nawasan Wisitsingkhon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some warning and use cli in main
parent
db268eb4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
ctrl10.rs
src/example/ctrl10.rs
+1
-1
main.rs
src/main.rs
+2
-3
No files found.
src/example/ctrl10.rs
View file @
38b947f3
...
@@ -70,7 +70,7 @@ impl ControllerFrame10 for Controller10 {
...
@@ -70,7 +70,7 @@ impl ControllerFrame10 for Controller10 {
match_fields
.mac_dest
=
Some
(
mac_dst
);
match_fields
.mac_dest
=
Some
(
mac_dst
);
match_fields
.mac_src
=
Some
(
mac_src
);
match_fields
.mac_src
=
Some
(
mac_src
);
if
let
Some
(
buf_id
)
=
packetin
.buf_id
{
if
let
Some
(
buf_id
)
=
packetin
.buf_id
{
self
.add_flow
(
xid
,
1
,
match_fields
,
&
actions
,
Some
(
buf_id
as
u32
),
stream
)
self
.add_flow
(
xid
,
1
,
match_fields
,
&
actions
,
Some
(
buf_id
),
stream
)
.await
;
.await
;
return
;
return
;
}
else
{
}
else
{
...
...
src/main.rs
View file @
38b947f3
use
tenjin
::
{
example
::{
Controller10
,
Controller13
},
openflow
::{
ofp10
::
ControllerFrame10
,
ofp13
::
ControllerFrame13
}}
;
use
tenjin
::
cli
::
cli_system
;
/**
/**
* If you prefer to run only Controller without cli.
* If you prefer to run only Controller without cli.
...
@@ -12,6 +12,5 @@ fn main() {
...
@@ -12,6 +12,5 @@ fn main() {
*/
*/
#
[
tokio
::
main
]
#
[
tokio
::
main
]
async
fn
main
()
{
async
fn
main
()
{
let
controller
=
Controller10
::
new
();
cli_system
::
system
()
.await
;
controller
.listener
(
"127.0.0.1:6653"
)
.await
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment