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
1b3d278d
Commit
1b3d278d
authored
Jun 24, 2024
by
Nawasan Wisitsingkhon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add OxmHeader and OxmClass
parent
27cd7329
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
match_fields.rs
src/openflow/ofp13/events/flow_mod/match_fields.rs
+33
-0
No files found.
src/openflow/ofp13/events/flow_mod/match_fields.rs
View file @
1b3d278d
...
@@ -94,6 +94,39 @@ impl Wildcards {
...
@@ -94,6 +94,39 @@ impl Wildcards {
}
}
}
}
pub
enum
MatchType
{
Standard
=
0
,
OXM
=
1
,
//, the OpenFlow 1.1 match type OFPMT_STANDARD is deprecated
}
/**
* | class | field | length | - | body |
* | :---: | :---: | :----: | - | :--: |
* | 16 | 7 | 1 | - | length bytes |
*/
pub
struct
OxmHeader
{
class
:
OxmClass
,
// Match class: member class or reserved class
field
:
u8
,
// 7bit Match field within the class
hasmask
:
u8
,
// 1bit Set if OXM include a bitmask in payload
length
:
u8
,
// Length of OXM payload
}
/**
* NXM allocates only two vendors,
* 0x0000 for fields supported by OpenFlow 1.0
* and 0x0001 for fields implemented as an Open vSwitch extension
*/
#[repr(u16)]
pub
enum
OxmClass
{
Nxm0
=
0x0000
,
Nxm1
=
0x0001
,
OpenflowBasic
=
0x8000
,
Experimenter
=
0xffff
,
}
/* OXM Flow match field types for OpenFlow basic class. */
pub
struct
MatchFields
{
pub
struct
MatchFields
{
pub
in_port
:
Option
<
u32
>
,
pub
in_port
:
Option
<
u32
>
,
in_phy_port
:
Option
<
u32
>
,
in_phy_port
:
Option
<
u32
>
,
...
...
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