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
ed07d9d6
Commit
ed07d9d6
authored
Feb 24, 2017
by
Alessandro Rubini
Committed by
Adam Wujek
Mar 03, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools/dump-funcs: show cField better
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
b4766dac
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
dump-funcs.c
tools/dump-funcs.c
+6
-2
No files found.
tools/dump-funcs.c
View file @
ed07d9d6
...
@@ -173,6 +173,7 @@ static void dump_payload(char *prefix, void *pl, int len)
...
@@ -173,6 +173,7 @@ static void dump_payload(char *prefix, void *pl, int len)
int
donelen
=
34
;
/* packet length before tlv */
int
donelen
=
34
;
/* packet length before tlv */
int
version
=
h
->
versionPTP_and_reserved
&
0xf
;
int
version
=
h
->
versionPTP_and_reserved
&
0xf
;
int
messageType
=
h
->
type_and_transport_specific
&
0xf
;
int
messageType
=
h
->
type_and_transport_specific
&
0xf
;
char
*
cfptr
=
(
void
*
)
&
h
->
correctionField
;
if
(
version
!=
2
)
{
if
(
version
!=
2
)
{
printf
(
"%sVERSION: unsupported (%i)
\n
"
,
prefix
,
version
);
printf
(
"%sVERSION: unsupported (%i)
\n
"
,
prefix
,
version
);
...
@@ -181,8 +182,11 @@ static void dump_payload(char *prefix, void *pl, int len)
...
@@ -181,8 +182,11 @@ static void dump_payload(char *prefix, void *pl, int len)
printf
(
"%sVERSION: %i (type %i, len %i, domain %i)
\n
"
,
prefix
,
printf
(
"%sVERSION: %i (type %i, len %i, domain %i)
\n
"
,
prefix
,
version
,
messageType
,
version
,
messageType
,
ntohs
(
h
->
messageLength
),
h
->
domainNumber
);
ntohs
(
h
->
messageLength
),
h
->
domainNumber
);
printf
(
"%sFLAGS: 0x%04x (correction %08lu)
\n
"
,
prefix
,
h
->
flagField
,
printf
(
"%sFLAGS: 0x%04x (correction 0x%08x:%08x %08u)
\n
"
,
(
unsigned
long
)
h
->
correctionField
);
prefix
,
h
->
flagField
,
ntohl
(
*
(
int
*
)
cfptr
),
ntohl
(
*
(
int
*
)(
cfptr
+
4
)),
ntohl
(
*
(
int
*
)(
cfptr
+
4
)));
dump_1port
(
prefix
,
"PORT: "
,
h
->
sourcePortIdentity
);
dump_1port
(
prefix
,
"PORT: "
,
h
->
sourcePortIdentity
);
printf
(
"%sREST: seq %i, ctrl %i, log-interval %i
\n
"
,
prefix
,
printf
(
"%sREST: seq %i, ctrl %i, log-interval %i
\n
"
,
prefix
,
ntohs
(
h
->
sequenceId
),
h
->
controlField
,
h
->
logMessageInterval
);
ntohs
(
h
->
sequenceId
),
h
->
controlField
,
h
->
logMessageInterval
);
...
...
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