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
32
Issues
32
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
75d7aa72
Commit
75d7aa72
authored
Jan 14, 2016
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net_verbose: print the socket on tx/rx of frame
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
625b21ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
net.c
lib/net.c
+9
-2
No files found.
lib/net.c
View file @
75d7aa72
...
...
@@ -286,6 +286,10 @@ int ptpd_netif_sendto(struct wrpc_socket * sock, struct wr_sockaddr *to, void *d
memcpy
(
hdr
.
dstmac
,
to
->
mac
,
6
);
memcpy
(
hdr
.
srcmac
,
s
->
local_mac
,
6
);
hdr
.
ethtype
=
sock
->
bind_addr
.
ethertype
;
net_verbose
(
"TX: socket %04x:%04x, len %i
\n
"
,
ntohs
(
s
->
bind_addr
.
ethertype
),
s
->
bind_addr
.
udpport
,
data_length
);
rval
=
minic_tx_frame
((
uint8_t
*
)
&
hdr
,
(
uint8_t
*
)
data
,
...
...
@@ -372,6 +376,9 @@ void update_rx_queues()
q
->
head
,
hdr
.
srcmac
[
0
],
hdr
.
srcmac
[
1
],
hdr
.
srcmac
[
2
],
hdr
.
srcmac
[
3
],
hdr
.
srcmac
[
4
],
hdr
.
srcmac
[
5
]);
net_verbose
(
"%s: saved packet to queue [avail %d n %d size %d]
\n
"
,
__FUNCTION__
,
q
->
avail
,
q
->
n
,
q_required
);
net_verbose
(
"%s: saved packet to socket %04x:%04x "
"[avail %d n %d size %d]
\n
"
,
__FUNCTION__
,
ntohs
(
s
->
bind_addr
.
ethertype
),
s
->
bind_addr
.
udpport
,
q
->
avail
,
q
->
n
,
q_required
);
}
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