Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
31
Issues
31
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Software for White Rabbit PTP Core
Commits
6040e771
Commit
6040e771
authored
Apr 05, 2016
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
host: obey vlan in tx path
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
4cb4375c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
socket.c
host/socket.c
+11
-4
No files found.
host/socket.c
View file @
6040e771
...
@@ -165,14 +165,21 @@ int minic_tx_frame(struct wr_ethhdr_vlan *hdr, uint8_t * payload, uint32_t size,
...
@@ -165,14 +165,21 @@ int minic_tx_frame(struct wr_ethhdr_vlan *hdr, uint8_t * payload, uint32_t size,
struct
hw_timestamp
*
hwts
)
struct
hw_timestamp
*
hwts
)
{
{
unsigned
char
frame
[
1500
];
unsigned
char
frame
[
1500
];
int
hsize
;
if
(
hdr
->
ethtype
==
htons
(
0x8100
))
hsize
=
sizeof
(
struct
wr_ethhdr_vlan
);
else
hsize
=
sizeof
(
struct
wr_ethhdr
);
printf
(
"%s
\n
"
,
__func__
);
printf
(
"%s
\n
"
,
__func__
);
dumpstruct
(
stdout
,
"tx header"
,
hdr
,
14
);
dumpstruct
(
stdout
,
"tx header"
,
hdr
,
hsize
);
dumpstruct
(
stdout
,
"tx payload"
,
payload
,
size
);
dumpstruct
(
stdout
,
"tx payload"
,
payload
,
size
);
memcpy
(
frame
,
hdr
,
14
);
memcpy
(
frame
+
14
,
payload
,
size
);
memcpy
(
frame
,
hdr
,
hsize
);
return
send
(
sock
,
frame
,
size
+
14
,
0
);
memcpy
(
frame
+
hsize
,
payload
,
size
);
return
send
(
sock
,
frame
,
size
+
hsize
,
0
);
}
}
...
...
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