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
f719a486
Commit
f719a486
authored
Jul 13, 2024
by
Nawasan Wisitsingkhon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unused
parent
bee7b121
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
113 deletions
+2
-113
actions.rs
src/openflow/ofp13/events/actions.rs
+0
-110
mod.rs
src/openflow/ofp13/events/flow_mod/mod.rs
+2
-3
No files found.
src/openflow/ofp13/events/actions.rs
View file @
f719a486
...
@@ -7,23 +7,6 @@ use super::flow_mod::{
...
@@ -7,23 +7,6 @@ use super::flow_mod::{
match_fields
::{
OxmHeader
,
OxmMatchFields
},
match_fields
::{
OxmHeader
,
OxmMatchFields
},
};
};
struct
ActionHeader
{
typ
:
ActionType
,
// len: u16,
// pad: [u8; 4],
}
impl
ActionHeader
{
pub
fn
new
(
typ
:
ActionType
)
->
Self
{
Self
{
typ
}
}
pub
fn
marshal
(
&
self
,
bytes
:
&
mut
Vec
<
u8
>
)
{
bytes
.write_u16
::
<
BigEndian
>
(
self
.typ
.clone
()
.into
());
bytes
.write_u16
::
<
BigEndian
>
(
8
);
bytes
.write_u32
::
<
BigEndian
>
(
0
);
}
}
#[derive(Clone)]
#[derive(Clone)]
#[repr(u16)]
#[repr(u16)]
enum
ActionType
{
enum
ActionType
{
...
@@ -102,94 +85,6 @@ impl ActionOutput {
...
@@ -102,94 +85,6 @@ impl ActionOutput {
}
}
}
}
struct
ActionGroup
{
typ
:
ActionType
,
len
:
u16
,
group_id
:
u32
,
}
impl
ActionGroup
{
pub
const
LEN
:
usize
=
8
;
pub
fn
marshal
(
&
self
,
bytes
:
&
mut
Vec
<
u8
>
)
{
self
.typ
.marshal
(
bytes
);
bytes
.write_u16
::
<
BigEndian
>
(
self
.len
);
bytes
.write_u32
::
<
BigEndian
>
(
self
.group_id
);
}
pub
fn
new
(
group_id
:
u32
)
->
Self
{
Self
{
typ
:
ActionType
::
Group
,
len
:
Self
::
LEN
as
u16
,
group_id
,
}
}
}
struct
ActionSetQueue
{
typ
:
ActionType
,
len
:
u16
,
queue_id
:
u32
,
}
impl
ActionSetQueue
{
pub
const
LEN
:
usize
=
8
;
pub
fn
marshal
(
&
self
,
bytes
:
&
mut
Vec
<
u8
>
)
{
self
.typ
.marshal
(
bytes
);
bytes
.write_u16
::
<
BigEndian
>
(
self
.len
);
bytes
.write_u32
::
<
BigEndian
>
(
self
.queue_id
);
}
pub
fn
new
(
queue_id
:
u32
)
->
Self
{
Self
{
typ
:
ActionType
::
SetQueue
,
len
:
Self
::
LEN
as
u16
,
queue_id
,
}
}
}
struct
ActionMplsTtl
{
typ
:
ActionType
,
len
:
u16
,
mpls_ttl
:
u8
,
pad
:
[
u8
;
3
],
}
impl
ActionMplsTtl
{
pub
const
LEN
:
usize
=
8
;
}
struct
ActionNwTtl
{
typ
:
ActionType
,
// OFPAT_SET_NW_TTL
len
:
u16
,
// Length is 8.
nw_ttl
:
u8
,
// IP TTL
pad
:
[
u8
;
3
],
}
impl
ActionNwTtl
{
pub
const
LEN
:
usize
=
8
;
}
struct
ActionPush
{
typ
:
ActionType
,
len
:
u16
,
ethertype
:
u16
,
pad
:
[
u8
;
2
],
}
impl
ActionPush
{
pub
const
LEN
:
usize
=
8
;
}
struct
ActionPopMpls
{
typ
:
ActionType
,
len
:
u16
,
ethertype
:
u16
,
pad
:
[
u8
;
2
],
}
impl
ActionPopMpls
{
pub
const
LEN
:
usize
=
8
;
}
#[derive(Clone)]
#[derive(Clone)]
pub
enum
SetField
{
pub
enum
SetField
{
InPort
(
PseudoPort
),
// Ingress port. This may be a physical or switch-defined logical port.
InPort
(
PseudoPort
),
// Ingress port. This may be a physical or switch-defined logical port.
...
@@ -266,11 +161,6 @@ impl SetField {
...
@@ -266,11 +161,6 @@ impl SetField {
}
}
}
}
struct
ActionExperimenterHeader
{
typ
:
ActionType
,
len
:
u16
,
experimenter
:
u32
,
}
pub
type
Buffer
=
u16
;
pub
type
Buffer
=
u16
;
#[derive(Clone)]
#[derive(Clone)]
...
...
src/openflow/ofp13/events/flow_mod/mod.rs
View file @
f719a486
...
@@ -5,9 +5,9 @@ pub mod command;
...
@@ -5,9 +5,9 @@ pub mod command;
pub
use
command
::
FlowModCommand
;
pub
use
command
::
FlowModCommand
;
pub
mod
match_fields
;
pub
mod
match_fields
;
pub
use
match_fields
::{
Ma
sk
,
MatchFields
};
pub
use
match_fields
::{
Ma
tchFields
,
MatchType
,
OfpMatch
};
pub
mod
flow_mod_flags
;
pub
mod
flow_mod_flags
;
pub
use
flow_mod_flags
::
FlowModFlags
;
pub
use
flow_mod_flags
::
FlowModFlags
;
pub
mod
instructions
;
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