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
2c52955e
Commit
2c52955e
authored
May 19, 2024
by
Nawasan Wisitsingkhon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
packet_out change port_id to in_port
parent
289482a9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
packet_out.rs
src/openflow/events/packet_out.rs
+5
-5
No files found.
src/openflow/events/packet_out.rs
View file @
2c52955e
...
@@ -14,7 +14,7 @@ use super::{flow_mod::SizeCheck, FlowAction, Payload};
...
@@ -14,7 +14,7 @@ use super::{flow_mod::SizeCheck, FlowAction, Payload};
pub
struct
PacketOutEvent
{
pub
struct
PacketOutEvent
{
pub
payload
:
Payload
,
pub
payload
:
Payload
,
pub
port_id
:
Option
<
u16
>
,
pub
in_port
:
Option
<
u16
>
,
pub
actions
:
Vec
<
FlowAction
>
,
pub
actions
:
Vec
<
FlowAction
>
,
}
}
...
@@ -24,7 +24,7 @@ impl MessageMarshal for PacketOutEvent {
...
@@ -24,7 +24,7 @@ impl MessageMarshal for PacketOutEvent {
Payload
::
Buffered
(
n
,
_
)
=>
n
as
i32
,
Payload
::
Buffered
(
n
,
_
)
=>
n
as
i32
,
Payload
::
NoBuffered
(
_
)
=>
-
1
,
Payload
::
NoBuffered
(
_
)
=>
-
1
,
});
});
match
self
.
port_id
{
match
self
.
in_port
{
Some
(
id
)
=>
{
Some
(
id
)
=>
{
PseudoPort
::
PhysicalPort
(
id
)
.marshal
(
bytes
);
PseudoPort
::
PhysicalPort
(
id
)
.marshal
(
bytes
);
}
}
...
@@ -53,9 +53,9 @@ impl MessageMarshal for PacketOutEvent {
...
@@ -53,9 +53,9 @@ impl MessageMarshal for PacketOutEvent {
}
}
impl
PacketOutEvent
{
impl
PacketOutEvent
{
pub
fn
new
(
port_id
:
Option
<
u16
>
,
payload
:
Payload
,
actions
:
Vec
<
FlowAction
>
)
->
Self
{
pub
fn
new
(
in_port
:
Option
<
u16
>
,
payload
:
Payload
,
actions
:
Vec
<
FlowAction
>
)
->
Self
{
Self
{
Self
{
port_id
,
in_port
,
payload
,
payload
,
actions
,
actions
,
}
}
...
@@ -82,7 +82,7 @@ impl PacketOutEvent {
...
@@ -82,7 +82,7 @@ impl PacketOutEvent {
Payload
::
Buffered
(
n
as
u32
,
bytes
.fill_buf
()
.unwrap
()
.to_ascii_lowercase
())
Payload
::
Buffered
(
n
as
u32
,
bytes
.fill_buf
()
.unwrap
()
.to_ascii_lowercase
())
}
}
},
},
port_id
:
{
in_port
:
{
if
in_port
==
OfpPort
::
None
as
u16
{
if
in_port
==
OfpPort
::
None
as
u16
{
None
None
}
else
{
}
else
{
...
...
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