Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LARN
PRRT
Commits
df8c6443
Commit
df8c6443
authored
Sep 04, 2018
by
Andreas Schmidt
Browse files
Debug format.
parent
0edece32
Pipeline
#2968
passed with stages
in 1 minute and 41 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
docker/entrypoint.sh
View file @
df8c6443
...
...
@@ -73,7 +73,7 @@ echo "Running PRRT with command: \"$command $PRRT_PARAMS\" and link parameters:
tc qdisc add dev
$dev
root netem
$NETEM_PARAMS
LOG
=
`
/prrt/
$command
$PRRT_PARAMS
2>&1
`
printf
"
$LOG
"
printf
"
$LOG
\n
"
echo
"Exit status:
$?
"
dur
=
$(
echo
"
$(
date
+%s.%N
)
-
$start
"
| bc
)
;
printf
"Done after %.6f seconds
\n
"
$dur
...
...
prrt/time-protocol.h
View file @
df8c6443
...
...
@@ -133,7 +133,7 @@ static inline ssize_t _send(socket_t conn, const char *buf, size_t size)
n
=
send
(
conn
,
buf
,
size
-
written
,
0
);
if
(
n
<
0
)
{
_time
();
printf
(
"
RECEIVE
FAILED: %ld, errno: %d
\n
, written %ld / %l
d
"
,
n
,
errno
,
written
,
size
);
printf
(
"
SEND
FAILED: %ld, errno: %d, written
:
%ld / %l
u
\n
"
,
n
,
errno
,
written
,
size
);
printf
(
"%s
\n
"
,
buf
-
written
);
return
written
;
}
...
...
@@ -179,7 +179,7 @@ static inline ssize_t _recv(socket_t conn, char *buf, size_t size)
n
=
recv
(
conn
,
buf
,
size
-
received
,
0
);
if
(
n
<
0
)
{
_time
();
printf
(
"
recv failed
: %ld, errno: %d, received: %ld
, size:
%lu
\n
"
,
n
,
errno
,
received
,
size
);
printf
(
"
RECV FAILED
: %ld, errno: %d, received: %ld
/
%lu
\n
"
,
n
,
errno
,
received
,
size
);
return
-
1
;
}
if
(
n
==
0
)
{
...
...
prrt/time-sender.c
View file @
df8c6443
...
...
@@ -184,7 +184,6 @@ int main(int argc, char **argv) {
memcpy
(
buf
+
20
,
&
now
,
sizeof
(
struct
timespec
));
ssize_t
written
=
_send
(
s
,
buf
,
payload_length
);
if
(
written
!=
payload_length
)
{
printf
(
"Could not write the full packet: %ld / %ld.
\n
"
,
written
,
payload_length
);
break
;
}
...
...
Write
Preview
Supports
Markdown
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