Commit fb5006e6 authored by Carl Elkins's avatar Carl Elkins
Browse files

Internet module (RISC OS version 5.06)

C.Elkins - added a sysctl interface to control IGMPv2 'fast leave'
	optimisation, so that Internet can be forced to always send
	the leave message (default - implement fast leave as per rfc 2236)
	Note:
	should be used in conjunction with corresponding headers and binaries
	(sysctl and inetstat).
parent 55eba770
This diff is collapsed.
......@@ -20,8 +20,8 @@
title-string: Internet
; Keep in line with riscos/socket_swi.c
help-string: Internet 5.05
date-string: 12 Mar 1998
help-string: Internet 5.06
date-string: 27 Mar 1998
library-initialisation-code: _inet_initialisemodule
......
......@@ -73,6 +73,7 @@
static struct router_info *find_rti(struct ifnet *ifp);
struct igmpstat igmpstat;
int igmp_forceleave = 0;
static int igmp_timers_are_running;
static u_long igmp_all_hosts_group;
......@@ -356,10 +357,16 @@ void
igmp_leavegroup(inm)
struct in_multi *inm;
{
if (inm->inm_state == IGMP_IREPORTEDLAST &&
inm->inm_addr.s_addr != igmp_all_hosts_group &&
/* The second line of the following logic added 27/3/98 RCE
* with a view to a partial solution to SourceNet's issue of
* IGMP leaves not always being sent; this could be useful for
* other cases using multicast for video distribution.
*/
if (((inm->inm_state == IGMP_IREPORTEDLAST) ||
((inm->inm_state == IGMP_OTHERMEMBER) && (igmp_forceleave != 0))) &&
(inm->inm_addr.s_addr != igmp_all_hosts_group) &&
!(inm->inm_ifp->if_flags & IFF_LOOPBACK) &&
inm->inm_rti->rti_type != IGMP_V1_ROUTER)
(inm->inm_rti->rti_type != IGMP_V1_ROUTER))
igmp_sendpkt(inm, IGMP_V2_LEAVE_GROUP, igmp_all_rtrs_group);
}
......@@ -483,6 +490,8 @@ igmp_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp,
case IGMPCTL_STATS:
return sysctl_rdstruct(oldp, oldlenp, newp, &igmpstat,
sizeof igmpstat);
case IGMPCTL_FORCELEAVE:
return (sysctl_int(oldp, oldlenp, newp, newlen, &igmp_forceleave));
default:
return ENOPROTOOPT;
}
......
......@@ -42,7 +42,7 @@
#include "module.h"
/* KEEP IN LINE WITH CMHG FILE */
#define MODVERSION 505
#define MODVERSION 506
struct socket *socktab[SOCKTABSIZE];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment