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
746c46b8
Commit
746c46b8
authored
Aug 01, 2024
by
Nawasan Wisitsingkhon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change MatchType (Try to fix BadType)
parent
5353dd2e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
ctrl13.rs
src/example/ctrl13.rs
+1
-1
match_fields.rs
src/openflow/ofp13/events/flow_mod/match_fields.rs
+4
-3
No files found.
src/example/ctrl13.rs
View file @
746c46b8
...
...
@@ -127,7 +127,7 @@ impl Controller13 {
stream
:
&
mut
TcpStream
,
)
{
self
.send_msg
(
FlowModEvent
::
add_flow
(
10
,
flow
,
actions
.clone
(),
table_id
,
buffer_id
),
FlowModEvent
::
add_flow
(
priority
,
flow
,
actions
.clone
(),
table_id
,
buffer_id
),
xid
,
stream
,
)
...
...
src/openflow/ofp13/events/flow_mod/match_fields.rs
View file @
746c46b8
...
...
@@ -9,9 +9,9 @@ use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt};
use
crate
::
etherparser
::
MacAddr
;
/**
* +----------
----+-
-------------+---------------------------+
* +----------
-----+--
-------------+---------------------------+
* | Type | Length | OXM Fields |
* +-----
---------+---
-----------+---------------------------+
* +-----
----------+----
-----------+---------------------------+
* | (Optional) | (16 bits) | (Array of variable length)|
* |---------------+---------------+---------------------------+
*/
...
...
@@ -25,7 +25,7 @@ pub struct OfpMatch {
impl
OfpMatch
{
pub
fn
new
()
->
Self
{
Self
{
typ
:
MatchType
::
OXM
,
typ
:
MatchType
::
Standard
,
length
:
4
,
oxm_fields
:
Vec
::
new
(),
}
...
...
@@ -33,6 +33,7 @@ impl OfpMatch {
pub
fn
marshal
(
&
self
,
bytes
:
&
mut
Vec
<
u8
>
)
{
bytes
.write_u16
::
<
BigEndian
>
(
self
.typ
.clone
()
.into
());
bytes
.write_u16
::
<
BigEndian
>
(
self
.length
+
(
self
.oxm_fields
.len
()
as
u16
));
bytes
.write_u32
::
<
BigEndian
>
(
0
);
bytes
.append
(
&
mut
self
.oxm_fields
.clone
());
}
}
...
...
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