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
6c677f99
Commit
6c677f99
authored
Jul 01, 2024
by
Nawasan Wisitsingkhon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add action oxm and others
parent
36bf05c2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
4 deletions
+47
-4
mac_address.rs
src/etherparser/net/mac_address.rs
+1
-0
actions.rs
src/openflow/ofp13/events/actions.rs
+0
-0
instructions.rs
src/openflow/ofp13/events/flow_mod/instructions.rs
+40
-0
match_fields.rs
src/openflow/ofp13/events/flow_mod/match_fields.rs
+2
-2
mod.rs
src/openflow/ofp13/events/flow_mod/mod.rs
+4
-2
No files found.
src/etherparser/net/mac_address.rs
View file @
6c677f99
use
byteorder
::
WriteBytesExt
;
#[derive(Clone)]
pub
struct
MacAddr
{
mac
:
[
u8
;
6
],
}
...
...
src/openflow/ofp13/events/actions.rs
View file @
6c677f99
This diff is collapsed.
Click to expand it.
src/openflow/ofp13/events/flow_mod/instructions.rs
0 → 100644
View file @
6c677f99
use
crate
::
openflow
::
ofp13
::
Action
;
#[repr(u16)]
pub
enum
InstructType
{
GotoTable
=
1
,
WriteMetadata
=
2
,
WriteActions
=
3
,
ApplyActions
=
4
,
ClearActions
=
5
,
Meter
=
6
,
Experimenter
=
0xffff
,
}
impl
From
<
InstructType
>
for
u16
{
fn
from
(
value
:
InstructType
)
->
Self
{
value
as
u16
}
}
pub
struct
GotoTable
{
typ
:
InstructType
,
len
:
u16
,
table_id
:
u8
,
pad
:
[
u8
;
3
],
}
pub
struct
WriteMetadata
{
typ
:
InstructType
,
len
:
u16
,
pad
:
[
u8
;
4
],
metadata
:
u64
,
meta_mask
:
u64
,
}
pub
struct
InstructActions
{
typ
:
InstructType
,
len
:
u16
,
pad
:
[
u8
;
4
],
action_header
:
Vec
<
Action
>
,
}
src/openflow/ofp13/events/flow_mod/match_fields.rs
View file @
6c677f99
...
...
@@ -76,7 +76,7 @@ pub struct OxmHeader {
}
impl
OxmHeader
{
fn
new
(
field
:
OxmMatchFields
,
size
:
u8
)
->
Self
{
pub
fn
new
(
field
:
OxmMatchFields
,
size
:
u8
)
->
Self
{
Self
{
class
:
OxmClass
::
OpenflowBasic
,
field
,
...
...
@@ -85,7 +85,7 @@ impl OxmHeader {
experimenter
:
None
,
}
}
fn
marshal
(
&
self
,
bytes
:
&
mut
Vec
<
u8
>
)
{
pub
fn
marshal
(
&
self
,
bytes
:
&
mut
Vec
<
u8
>
)
{
bytes
.write_u16
::
<
BigEndian
>
(
self
.class
.clone
()
.into
());
let
field
:
u8
=
self
.field
.clone
()
.into
();
bytes
.write_u8
(
field
<<
1
|
if
self
.hasmask
{
1
}
else
{
0
});
...
...
src/openflow/ofp13/events/flow_mod/mod.rs
View file @
6c677f99
...
...
@@ -8,4 +8,6 @@ pub mod match_fields;
pub
use
match_fields
::{
Mask
,
MatchFields
};
pub
mod
flow_mod_flags
;
pub
use
flow_mod_flags
::
FlowModFlags
;
\ No newline at end of file
pub
use
flow_mod_flags
::
FlowModFlags
;
pub
mod
instructions
;
\ No newline at end of file
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