Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
RiscOS
S
Sources
SystemRes
InetRes
Commits
a10e99af
Commit
a10e99af
authored
Jul 19, 1999
by
Kevin Bracey
Browse files
Required TTL now calculated correctly.
parent
ebf6f6f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
4 deletions
+20
-4
Sources/mtrace/c/MTrace
Sources/mtrace/c/MTrace
+20
-4
No files found.
Sources/mtrace/c/MTrace
View file @
a10e99af
...
...
@@ -369,6 +369,9 @@ void k_hdr_include __P((int bool));
void
k_set_ttl
__P
((
int
t
));
void
k_set_loop
__P
((
int
l
));
void
k_set_if
__P
((
u_int32
ifa
));
#ifdef __riscos
void
k_set_sleep
__P
((
int
s
));
#endif
void
k_join
__P
((
u_int32
grp
,
u_int32
ifa
));
void
k_leave
__P
((
u_int32
grp
,
u_int32
ifa
));
char
*
inet_fmt
__P
((
u_int32
addr
,
char
*
s
));
...
...
@@ -439,6 +442,9 @@ init_igmp()
if
((
igmp_socket
=
socket
(
AF_INET
,
SOCK_RAW
,
IPPROTO_IGMP
))
<
0
)
log
(
LOG_ERR
,
errno
,
"IGMP socket"
);
#ifdef __riscos
k_set_sleep
(
TRUE
);
/* sleep taskwindows */
#endif
k_hdr_include
(
TRUE
);
/* include IP header when sending */
k_set_rcvbuf
(
48
*
1024
);
/* lots of input buffering */
k_set_ttl
(
1
);
/* restrict multicasts to one hop */
...
...
@@ -716,6 +722,16 @@ k_set_loop(l)
log
(
LOG_ERR
,
errno
,
"setsockopt IP_MULTICAST_LOOP %u"
,
loop
);
}
#ifdef __riscos
void
k_set_sleep
(
s
)
int
s
;
{
if
(
ioctl
(
igmp_socket
,
FIOSLEEPTW
,
&
s
)
<
0
)
log
(
LOG_ERR
,
errno
,
"ioctl FIOSLEEPTW %u"
,
s
);
}
#endif
void
k_set_if
(
ifa
)
u_int32
ifa
;
...
...
@@ -3052,11 +3068,11 @@ or multicast at ttl %d doesn't reach its last-hop router for that source\n",
printf
(
"Round trip time %d ms; "
,
t_diff
(
base
.
rtime
,
base
.
qtime
));
{
struct
tr_resp
*
n
=
base
.
resps
+
base
.
len
-
1
;
u_int
ttl
=
n
->
tr_fttl
+
1
;
struct
tr_resp
*
n
=
base
.
resps
+
base
.
len
;
u_int
ttl
=
0
;
rno
=
base
.
len
-
1
;
while
(
--
rno
>
0
)
{
rno
=
base
.
len
;
while
(
--
rno
>
=
0
)
{
--
n
;
ttl
=
MaX
(
ttl
,
MaX
(
1
,
n
->
tr_fttl
)
+
base
.
len
-
rno
);
}
...
...
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