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
b8ceac6f
Commit
b8ceac6f
authored
May 06, 2024
by
Nawasan Wisitsingkhon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: change ofpheader to ofp_header
parent
f8cf0109
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
controller.rs
src/openflow/controller.rs
+3
-2
No files found.
src/openflow/controller.rs
View file @
b8ceac6f
...
@@ -26,11 +26,12 @@ impl<OME: OfpMsgEvent> Controller<OME> {
...
@@ -26,11 +26,12 @@ impl<OME: OfpMsgEvent> Controller<OME> {
pub
fn
send_msg
<
T
:
MessageMarshal
>
(
&
self
,
msg
:
T
,
xid
:
u32
,
stream
:
&
mut
TcpStream
)
{
pub
fn
send_msg
<
T
:
MessageMarshal
>
(
&
self
,
msg
:
T
,
xid
:
u32
,
stream
:
&
mut
TcpStream
)
{
let
mut
header_bytes
:
Vec
<
u8
>
=
Vec
::
new
();
let
mut
header_bytes
:
Vec
<
u8
>
=
Vec
::
new
();
let
mut
body_bytes
:
Vec
<
u8
>
=
Vec
::
new
();
let
mut
body_bytes
:
Vec
<
u8
>
=
Vec
::
new
();
msg
.marshal
(
&
mut
body_bytes
);
msg
.marshal
(
&
mut
body_bytes
);
let
ofpheader
=
let
ofp
_
header
=
self
.ofp
self
.ofp
.header
(
msg
.msg_usize
(
&
self
.ofp
)
as
u8
,
body_bytes
.len
()
as
u16
,
xid
);
.header
(
msg
.msg_usize
(
&
self
.ofp
)
as
u8
,
body_bytes
.len
()
as
u16
,
xid
);
ofpheader
.marshal
(
&
mut
header_bytes
);
ofp
_
header
.marshal
(
&
mut
header_bytes
);
header_bytes
.append
(
&
mut
body_bytes
);
header_bytes
.append
(
&
mut
body_bytes
);
let
_
=
stream
.write_all
(
&
header_bytes
);
let
_
=
stream
.write_all
(
&
header_bytes
);
}
}
...
...
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