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
e9c80cc6
Commit
e9c80cc6
authored
Apr 16, 2024
by
Nawasan Wisitsingkhon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove some code that is unused
parent
9c508a2c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
8 deletions
+1
-8
controller.rs
src/openflow/controller.rs
+1
-8
No files found.
src/openflow/controller.rs
View file @
e9c80cc6
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
)
{
...
...
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