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
3baedfb4
Commit
3baedfb4
authored
Apr 17, 2024
by
Nawasan Wisitsingkhon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ethernet: make pub
parent
9132cd13
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
ethernet.rs
src/etherparser/ethernet.rs
+8
-8
No files found.
src/etherparser/ethernet.rs
View file @
3baedfb4
...
...
@@ -8,17 +8,17 @@ use super::{
tools
::
bits
::
mac_to_bytes
,
};
struct
EthernetFrame
{
mac_des
:
u64
,
mac_src
:
u64
,
vlan_pcp
:
u8
,
vlan_dei
:
bool
,
vlan_vid
:
Option
<
u16
>
,
ip_header
:
Network
,
pub
struct
EthernetFrame
{
pub
mac_des
:
u64
,
pub
mac_src
:
u64
,
pub
vlan_pcp
:
u8
,
pub
vlan_dei
:
bool
,
pub
vlan_vid
:
Option
<
u16
>
,
pub
ip_header
:
Network
,
}
impl
EthernetFrame
{
fn
parse
(
payload
:
&
Vec
<
u8
>
)
->
EthernetFrame
{
pub
fn
parse
(
payload
:
&
Vec
<
u8
>
)
->
EthernetFrame
{
let
mut
bytes
=
Cursor
::
new
(
payload
.to_vec
());
let
mut
mac_des
=
[
0u8
;
6
];
let
mut
mac_src
=
[
0u8
;
6
];
...
...
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