示例#1
0
文件: igmp.c 项目: GNUHurdTR/hurd
static void igmp_timer_expire(unsigned long data)
{
	struct ip_mc_list *im=(struct ip_mc_list *)data;
	struct in_device *in_dev = im->interface;
	int err;

	im->tm_running=0;

	if (IGMP_V1_SEEN(in_dev))
		err = igmp_send_report(in_dev->dev, im->multiaddr, IGMP_HOST_MEMBERSHIP_REPORT);
	else
		err = igmp_send_report(in_dev->dev, im->multiaddr, IGMP_HOST_NEW_MEMBERSHIP_REPORT);

	/* Failed. Retry later. */
	if (err) {
		igmp_start_timer(im, IGMP_Unsolicited_Report_Interval);
		return;
	}

	if (im->unsolicit_count) {
		im->unsolicit_count--;
		igmp_start_timer(im, IGMP_Unsolicited_Report_Interval);
	}
	im->reporter = 1;
}
示例#2
0
extern __inline__ void igmp_group_added(struct ip_mc_list *im)
{
	struct ip_router_info *r;
	igmp_init_timer(im);
	ip_mc_filter_add(im->interface, im->multiaddr);
	r=igmp_get_mrouter_info(im->interface);
	if(r==NULL)
		return;
	if(r->type==IGMP_NEW_ROUTER)
		igmp_send_report(im->interface, im->multiaddr, IGMP_HOST_NEW_MEMBERSHIP_REPORT);
	else
		igmp_send_report(im->interface, im->multiaddr, IGMP_HOST_MEMBERSHIP_REPORT);
}
示例#3
0
static void igmp_timer_expire(unsigned long data)
{
	struct ip_mc_list *im=(struct ip_mc_list *)data;
	struct ip_router_info *r;

	im->tm_running=0;
	r=igmp_get_mrouter_info(im->interface);
	if(r==NULL)
		return;
	if(r->type==IGMP_NEW_ROUTER)
		igmp_send_report(im->interface, im->multiaddr, IGMP_HOST_NEW_MEMBERSHIP_REPORT);
	else
		igmp_send_report(im->interface, im->multiaddr, IGMP_HOST_MEMBERSHIP_REPORT);
	im->reporter=1;
}
示例#4
0
static void igmp_group_added(struct ip_mc_list *im)
{
	igmp_init_timer(im);
	igmp_send_report(im->interface, im->multiaddr, IGMP_HOST_MEMBERSHIP_REPORT);
	ip_mc_filter_add(im->interface, im->multiaddr);
/*	printk("Joined group %lX\n",im->multiaddr);*/
}
示例#5
0
static void igmp_group_dropped(struct ip_mc_list *im)
{
	del_timer(&im->timer);
	igmp_send_report(im->interface, im->multiaddr, IGMP_HOST_LEAVE_MESSAGE);
	ip_mc_filter_del(im->interface, im->multiaddr);
/*	printk("Left group %lX\n",im->multiaddr);*/
}
示例#6
0
extern __inline__ void igmp_group_dropped(struct ip_mc_list *im)
{
	del_timer(&im->timer);
        /* It seems we have to send Leave Messages to 224.0.0.2 and not to
           the group itself, to remain RFC 2236 compliant... (jmel) */
        igmp_send_report(im->interface, IGMP_ALL_ROUTER, IGMP_HOST_LEAVE_MESSAGE);
	ip_mc_filter_del(im->interface, im->multiaddr);
}
static void igmp_timer_expire(unsigned long data)
{
    struct ip_mc_list *im=(struct ip_mc_list *)data;
    struct in_device *in_dev = im->interface;

    spin_lock(&im->lock);
    im->tm_running=0;

    if (im->unsolicit_count) {
        im->unsolicit_count--;
        igmp_start_timer(im, IGMP_Unsolicited_Report_Interval);
    }
    im->reporter = 1;
    spin_unlock(&im->lock);

    if (IGMP_V1_SEEN(in_dev))
        igmp_send_report(in_dev->dev, im->multiaddr, IGMP_HOST_MEMBERSHIP_REPORT);
    else
        igmp_send_report(in_dev->dev, im->multiaddr, IGMP_HOST_NEW_MEMBERSHIP_REPORT);

    ip_ma_put(im);
}
示例#8
0
文件: igmp.c 项目: GNUHurdTR/hurd
static void igmp_group_dropped(struct ip_mc_list *im)
{
	if (im->loaded) {
		im->loaded = 0;
		ip_mc_filter_del(im->interface, im->multiaddr);
	}

#ifdef CONFIG_IP_MULTICAST
	if (im->multiaddr == IGMP_ALL_HOSTS)
		return;

	start_bh_atomic();
	igmp_stop_timer(im);
	end_bh_atomic();

	if (im->reporter && !IGMP_V1_SEEN(im->interface))
		igmp_send_report(im->interface->dev, im->multiaddr, IGMP_HOST_LEAVE_MESSAGE);
#endif
}
示例#9
0
static void igmp_timer_expire(unsigned long data)
{
	struct ip_mc_list *im=(struct ip_mc_list *)data;
	igmp_stop_timer(im);
	igmp_send_report(im->interface, im->multiaddr, IGMP_HOST_MEMBERSHIP_REPORT);
}