aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/igmp_var.h
diff options
context:
space:
mode:
authorGarrett Wollman <wollman@FreeBSD.org>1994-09-06 22:42:31 +0000
committerGarrett Wollman <wollman@FreeBSD.org>1994-09-06 22:42:31 +0000
commitf0068c4a701b5465bf29ebd9913a457d3bc5f2a1 (patch)
treeda36f83faafbd2141b041ae182b2406dfee02756 /sys/netinet/igmp_var.h
parent9c1cc29eec215e31f71b9abfc3a43ebb520505cb (diff)
downloadsrc-f0068c4a701b5465bf29ebd9913a457d3bc5f2a1.tar.gz
src-f0068c4a701b5465bf29ebd9913a457d3bc5f2a1.zip
Initial get-the-easy-case-working upgrade of the multicast code
to something more recent than the ancient 1.2 release contained in 4.4. This code has the following advantages as compared to previous versions (culled from the README file for the SunOS release): - True multicast delivery - Configurable rate-limiting of forwarded multicast traffic on each physical interface or tunnel, using a token-bucket limiter. - Simplistic classification of packets for prioritized dropping. - Administrative scoping of multicast address ranges. - Faster detection of hosts leaving groups. - Support for multicast traceroute (code not yet available). - Support for RSVP, the Resource Reservation Protocol. What still needs to be done: - The multicast forwarder needs testing. - The multicast routing daemon needs to be ported. - Network interface drivers need to have the `#ifdef MULTICAST' goop ripped out of them. - The IGMP code should probably be bogon-tested. Some notes about the porting process: In some cases, the Berkeley people decided to incorporate functionality from later releases of the multicast code, but then had to do things differently. As a result, if you look at Deering's patches, and then look at our code, it is not always obvious whether the patch even applies. Let the reader beware. I ran ip_mroute.c through several passes of `unifdef' to get rid of useless grot, and to permanently enable the RSVP support, which we will include as standard. Ported by: Garrett Wollman Submitted by: Steve Deering and Ajit Thyagarajan (among others)
Notes
Notes: svn path=/head/; revision=2531
Diffstat (limited to 'sys/netinet/igmp_var.h')
-rw-r--r--sys/netinet/igmp_var.h25
1 files changed, 6 insertions, 19 deletions
diff --git a/sys/netinet/igmp_var.h b/sys/netinet/igmp_var.h
index 0018cd22f3ea..403a9115b4c1 100644
--- a/sys/netinet/igmp_var.h
+++ b/sys/netinet/igmp_var.h
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)igmp_var.h 8.1 (Berkeley) 7/19/93
- * $Id: igmp_var.h,v 1.2 1994/08/02 07:48:09 davidg Exp $
+ * $Id: igmp_var.h,v 1.3 1994/08/21 05:27:26 paul Exp $
*/
#ifndef _NETINET_IGMP_VAR_H_
@@ -63,29 +63,16 @@ struct igmpstat {
};
#ifdef KERNEL
-struct igmpstat igmpstat;
+extern struct igmpstat igmpstat;
-/*
- * Macro to compute a random timer value between 1 and (IGMP_MAX_REPORTING_
- * DELAY * countdown frequency). We generate a "random" number by adding
- * the total number of IP packets received, our primary IP address, and the
- * multicast address being timed-out. The 4.3 random() routine really
- * ought to be available in the kernel!
- */
-#define IGMP_RANDOM_DELAY(multiaddr) \
- /* struct in_addr multiaddr; */ \
- ( (ipstat.ips_total + \
- ntohl(IA_SIN(in_ifaddr)->sin_addr.s_addr) + \
- ntohl((multiaddr).s_addr) \
- ) \
- % (IGMP_MAX_HOST_REPORT_DELAY * PR_FASTHZ) + 1 \
- )
+#define IGMP_RANDOM_DELAY(X) (random() % (X) + 1)
-void igmp_init __P(());
+void igmp_init __P((void));
void igmp_input __P((struct mbuf *, int));
void igmp_joingroup __P((struct in_multi *));
void igmp_leavegroup __P((struct in_multi *));
-void igmp_fasttimo __P(());
+void igmp_fasttimo __P((void));
+void igmp_slowtimo __P((void));
#endif
#endif