Lines Matching refs:igmp
749 struct igmp_ip_t igmp;
750 igmp.router_alert[0] = 0x94;
751 igmp.router_alert[1] = 0x04;
752 igmp.router_alert[2] = 0;
753 igmp.router_alert[3] = 0;
755 1, IP_IGMP, sizeof(igmp.router_alert), sizeof(igmp), &igmp);
756 igmp.igmp.type = IGMPv2_REPORT;
759 igmp.igmp.type = IGMPv1_REPORT;
761 igmp.igmp.response_time = 0;
762 igmp.igmp.chksum = 0;
763 igmp.igmp.group.s_addr = igmptable[i].group.s_addr;
764 igmp.igmp.chksum = ipchksum(&igmp.igmp, sizeof(igmp.igmp));
765 ip_transmit(sizeof(igmp), &igmp);
767 printf("Sent IGMP report to: %@\n", igmp.igmp.group.s_addr);
769 /* Don't send another igmp report until asked */
777 struct igmp *igmp;
781 (nic.packetlen < sizeof(struct iphdr) + sizeof(struct igmp))) {
785 igmp = (struct igmp *)&nic.packet[sizeof(struct iphdr)];
786 if (ipchksum(igmp, ntohs(ip->len) - iplen) != 0)
788 if ((igmp->type == IGMP_QUERY) &&
791 if (igmp->response_time == 0) {
794 interval = (igmp->response_time * TICKS_PER_SEC)/10;
798 printf("Received IGMP query for: %@\n", igmp->group.s_addr);
802 if ((group == 0) || (group == igmp->group.s_addr)) {
811 if (((igmp->type == IGMPv1_REPORT) || (igmp->type == IGMPv2_REPORT)) &&
812 (ip->dest.s_addr == igmp->group.s_addr)) {
814 printf("Received IGMP report for: %@\n", igmp->group.s_addr);
817 if ((igmptable[i].group.s_addr == igmp->group.s_addr) &&
836 struct igmp_ip_t igmp;
837 igmp.router_alert[0] = 0x94;
838 igmp.router_alert[1] = 0x04;
839 igmp.router_alert[2] = 0;
840 igmp.router_alert[3] = 0;
842 1, IP_IGMP, sizeof(igmp.router_alert), sizeof(igmp), &igmp);
843 igmp.igmp.type = IGMP_LEAVE;
844 igmp.igmp.response_time = 0;
845 igmp.igmp.chksum = 0;
846 igmp.igmp.group.s_addr = igmptable[slot].group.s_addr;
847 igmp.igmp.chksum = ipchksum(&igmp.igmp, sizeof(igmp));
848 ip_transmit(sizeof(igmp), &igmp);
850 printf("Sent IGMP leave for: %@\n", igmp.igmp.group.s_addr);
975 * action. This allows us reply to arp and igmp queryies.