Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Software for White Rabbit PTP Core
Manage
Activity
Members
Labels
Plan
Issues
39
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
Software for White Rabbit PTP Core
Commits
75d7aa72
Commit
75d7aa72
authored
9 years ago
by
Alessandro Rubini
Browse files
Options
Downloads
Patches
Plain Diff
net_verbose: print the socket on tx/rx of frame
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
625b21ef
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/net.c
+9
-2
9 additions, 2 deletions
lib/net.c
with
9 additions
and
2 deletions
lib/net.c
+
9
−
2
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
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment