Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
PPSi
Commits
b5fb56a3
Commit
b5fb56a3
authored
Apr 07, 2016
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
time-wrpc: fix endianness in ethtype
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
08bc1684
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
wrpc-socket.c
time-wrpc/wrpc-socket.c
+2
-2
No files found.
time-wrpc/wrpc-socket.c
View file @
b5fb56a3
...
@@ -31,7 +31,7 @@ static int wrpc_open_ch(struct pp_instance *ppi)
...
@@ -31,7 +31,7 @@ static int wrpc_open_ch(struct pp_instance *ppi)
if
(
ppi
->
mech
==
PP_P2P_MECH
)
if
(
ppi
->
mech
==
PP_P2P_MECH
)
macaddr
=
PP_PDELAY_MACADDRESS
;
macaddr
=
PP_PDELAY_MACADDRESS
;
addr
.
ethertype
=
ETH_P_1588
;
addr
.
ethertype
=
htons
(
ETH_P_1588
)
;
memcpy
(
addr
.
mac
,
macaddr
,
sizeof
(
mac_addr_t
));
memcpy
(
addr
.
mac
,
macaddr
,
sizeof
(
mac_addr_t
));
sock
=
ptpd_netif_create_socket
(
&
__static_ptp_socket
,
&
addr
,
sock
=
ptpd_netif_create_socket
(
&
__static_ptp_socket
,
&
addr
,
PTPD_SOCK_RAW_ETHERNET
,
0
);
PTPD_SOCK_RAW_ETHERNET
,
0
);
...
@@ -96,7 +96,7 @@ static int wrpc_net_send(struct pp_instance *ppi, void *pkt, int len,
...
@@ -96,7 +96,7 @@ static int wrpc_net_send(struct pp_instance *ppi, void *pkt, int len,
sock
=
ppi
->
ch
[
PP_NP_EVT
].
custom
;
sock
=
ppi
->
ch
[
PP_NP_EVT
].
custom
;
addr
.
ethertype
=
ETH_P_1588
;
addr
.
ethertype
=
htons
(
ETH_P_1588
)
;
memcpy
(
&
addr
.
mac
,
macaddr
[
is_pdelay
],
sizeof
(
mac_addr_t
));
memcpy
(
&
addr
.
mac
,
macaddr
[
is_pdelay
],
sizeof
(
mac_addr_t
));
snt
=
ptpd_netif_sendto
(
sock
,
&
addr
,
pkt
,
len
,
&
wr_ts
);
snt
=
ptpd_netif_sendto
(
sock
,
&
addr
,
pkt
,
len
,
&
wr_ts
);
...
...
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