Lines Matching refs:inm
201 struct in_multi *inm;
256 * In Delaying Member state, our timer is running (inm->inm_timer)
257 * In Idle Member state, our timer is not running (inm->inm_timer==0)
259 * The flag is inm->inm_state, it is set to IGMP_OTHERMEMBER if
313 IN_FIRST_MULTI(step, inm);
314 while (inm != NULL) {
315 if (inm->inm_ifp == ifp &&
316 inm->inm_addr.s_addr != igmp_all_hosts_group &&
318 igmp->igmp_group.s_addr == inm->inm_addr.s_addr)) {
319 if (inm->inm_timer == 0 ||
320 inm->inm_timer > timer) {
321 inm->inm_timer =
326 IN_NEXT_MULTI(step, inm);
372 IN_LOOKUP_MULTI(igmp->igmp_group, ifp, inm);
375 if (inm != NULL) {
376 inm->inm_timer = 0;
379 inm->inm_state = IGMP_OTHERMEMBER;
393 igmp_joingroup(struct in_multi *inm)
396 if (inm->inm_addr.s_addr == igmp_all_hosts_group
397 || inm->inm_ifp->if_flags & IFF_LOOPBACK) {
398 inm->inm_timer = 0;
399 inm->inm_state = IGMP_OTHERMEMBER;
401 inm->inm_rti = find_rti(inm->inm_ifp, M_WAITOK);
402 if (inm->inm_rti == NULL) return ENOMEM;
403 igmp_sendpkt(inm, inm->inm_rti->rti_type, 0);
404 inm->inm_timer = IGMP_RANDOM_DELAY(
406 inm->inm_state = IGMP_IREPORTEDLAST;
413 igmp_leavegroup(struct in_multi *inm)
415 if (inm->inm_state == IGMP_IREPORTEDLAST &&
416 inm->inm_addr.s_addr != igmp_all_hosts_group &&
417 !(inm->inm_ifp->if_flags & IFF_LOOPBACK) &&
418 inm->inm_rti->rti_type != IGMP_V1_ROUTER)
419 igmp_sendpkt(inm, IGMP_V2_LEAVE_GROUP, igmp_all_rtrs_group);
425 struct in_multi *inm;
437 IN_FIRST_MULTI(step, inm);
438 while (inm != NULL) {
439 if (inm->inm_timer == 0) {
441 } else if ((--inm->inm_timer == 0) && (inm->inm_rti != NULL)) {
442 igmp_sendpkt(inm, inm->inm_rti->rti_type, 0);
443 inm->inm_state = IGMP_IREPORTEDLAST;
447 IN_NEXT_MULTI(step, inm);
476 igmp_sendpkt(struct in_multi *inm, int type, unsigned long addr)
489 mac_mbuf_label_associate_linklayer(inm->inm_ifp, m);
500 igmp->igmp_group = inm->inm_addr;
514 imo.imo_multicast_ifp = inm->inm_ifp;