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
3f32e494
Commit
3f32e494
authored
May 02, 2013
by
Aurelio Colosimo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fsm.c: print human-readable msg name for recv packets
Signed-off-by:
Aurelio Colosimo
<
aurelio@aureliocolosimo.it
>
parent
da6489a0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
fsm.c
fsm.c
+2
-2
msg.c
proto-standard/msg.c
+1
-1
No files found.
fsm.c
View file @
3f32e494
...
...
@@ -75,10 +75,10 @@ int pp_state_machine(struct pp_instance *ppi, uint8_t *packet, int plen)
if
(
plen
)
pp_diag
(
ppi
,
frames
,
1
,
"RECV %02d bytes at %d.%09d (type %x)
\n
"
,
plen
,
"RECV %02d bytes at %d.%09d (type %x
, %s
)
\n
"
,
plen
,
(
int
)
ppi
->
last_rcv_time
.
seconds
,
(
int
)
ppi
->
last_rcv_time
.
nanoseconds
,
packet
[
0
]
&
0xf
);
packet
[
0
]
&
0xf
,
pp_msg_names
[
packet
[
0
]
&
0xf
]
);
/*
* Since all ptp frames have the same header, parse it now.
...
...
proto-standard/msg.c
View file @
3f32e494
...
...
@@ -326,7 +326,7 @@ void msg_unpack_delay_resp(void *buf, MsgDelayResp *resp)
htons
(
*
(
UInteger16
*
)
(
buf
+
52
));
}
const
char
const
*
pp_msg_names
[]
=
{
const
char
const
*
pp_msg_names
[
16
]
=
{
[
PPM_SYNC
]
=
"sync"
,
[
PPM_DELAY_REQ
]
=
"delay_req"
,
[
PPM_PDELAY_REQ
]
=
"pdelay_req"
,
...
...
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