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
46111381
Commit
46111381
authored
Jul 25, 2024
by
Nawasan Wisitsingkhon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
declare one point for ofp version
parent
6c4a5497
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
ofp_header.rs
src/openflow/ofp13/ofp_header.rs
+4
-2
ofp_manager.rs
src/openflow/ofp13/ofp_manager.rs
+2
-2
No files found.
src/openflow/ofp13/ofp_header.rs
View file @
46111381
...
@@ -6,6 +6,8 @@ use std::{
...
@@ -6,6 +6,8 @@ use std::{
use
crate
::
openflow
::
ofp13
::
OpenflowHeader
;
use
crate
::
openflow
::
ofp13
::
OpenflowHeader
;
use
super
::{
OfpMsgEvent
,
Openflow13
};
pub
struct
OfpHeader
{
pub
struct
OfpHeader
{
pub
version
:
u8
,
pub
version
:
u8
,
pub
message
:
u8
,
pub
message
:
u8
,
...
@@ -16,14 +18,14 @@ pub struct OfpHeader {
...
@@ -16,14 +18,14 @@ pub struct OfpHeader {
impl
OpenflowHeader
for
OfpHeader
{
impl
OpenflowHeader
for
OfpHeader
{
fn
new
(
message
:
u8
,
length
:
usize
,
xid
:
usize
)
->
Self
{
fn
new
(
message
:
u8
,
length
:
usize
,
xid
:
usize
)
->
Self
{
Self
{
Self
{
version
:
4
,
version
:
Openflow13
::
ofp_version
()
as
u8
,
message
,
message
,
length
:
(
size_of
::
<
OfpHeader
>
()
+
length
)
as
u16
,
length
:
(
size_of
::
<
OfpHeader
>
()
+
length
)
as
u16
,
xid
:
xid
as
u32
,
xid
:
xid
as
u32
,
}
}
}
}
fn
version
(
&
self
)
->
usize
{
fn
version
(
&
self
)
->
usize
{
4
Openflow13
::
ofp_version
()
}
}
fn
message
(
&
self
)
->
u8
{
fn
message
(
&
self
)
->
u8
{
self
.message
self
.message
...
...
src/openflow/ofp13/ofp_manager.rs
View file @
46111381
...
@@ -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
{
4
0x0
4
}
}
fn
version
(
&
self
)
->
usize
{
fn
version
(
&
self
)
->
usize
{
4
Self
::
ofp_version
()
}
}
fn
header
(
&
self
,
message
:
u8
,
length
:
u16
,
xid
:
u32
)
->
OfpHeader
{
fn
header
(
&
self
,
message
:
u8
,
length
:
u16
,
xid
:
u32
)
->
OfpHeader
{
...
...
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