Lines Matching refs:rt
302 #define MF6CFIND(o, g, rt) do { \ argument
304 rt = NULL; \
309 rt = _rt; \
314 if (rt == NULL) { \
488 struct mf6c *rt; in get_sg_cnt() local
495 MF6CFIND(req->src.sin6_addr, req->grp.sin6_addr, rt); in get_sg_cnt()
496 if (rt == NULL) { in get_sg_cnt()
499 req->pktcnt = rt->mf6c_pkt_cnt; in get_sg_cnt()
500 req->bytecnt = rt->mf6c_byte_cnt; in get_sg_cnt()
501 req->wrong_if = rt->mf6c_wrong_if; in get_sg_cnt()
594 struct mf6c *rt; in X_ip6_mrouter_done() local
624 rt = mf6ctable[i]; in X_ip6_mrouter_done()
625 while (rt) { in X_ip6_mrouter_done()
628 for (rte = rt->mf6c_stall; rte != NULL; ) { in X_ip6_mrouter_done()
635 frt = rt; in X_ip6_mrouter_done()
636 rt = rt->mf6c_next; in X_ip6_mrouter_done()
810 struct mf6c *rt; in add_m6fc() local
819 mfccp->mf6cc_mcastgrp.sin6_addr, rt); in add_m6fc()
822 if (rt) { in add_m6fc()
828 rt->mf6c_parent = mfccp->mf6cc_parent; in add_m6fc()
829 rt->mf6c_ifset = mfccp->mf6cc_ifset; in add_m6fc()
840 for (rt = mf6ctable[hash], nstl = 0; rt; rt = rt->mf6c_next) { in add_m6fc()
841 if (IN6_ARE_ADDR_EQUAL(&rt->mf6c_origin.sin6_addr, in add_m6fc()
843 IN6_ARE_ADDR_EQUAL(&rt->mf6c_mcastgrp.sin6_addr, in add_m6fc()
845 (rt->mf6c_stall != NULL)) { in add_m6fc()
854 mfccp->mf6cc_parent, rt->mf6c_stall); in add_m6fc()
861 mfccp->mf6cc_parent, rt->mf6c_stall); in add_m6fc()
863 rt->mf6c_origin = mfccp->mf6cc_origin; in add_m6fc()
864 rt->mf6c_mcastgrp = mfccp->mf6cc_mcastgrp; in add_m6fc()
865 rt->mf6c_parent = mfccp->mf6cc_parent; in add_m6fc()
866 rt->mf6c_ifset = mfccp->mf6cc_ifset; in add_m6fc()
868 rt->mf6c_pkt_cnt = 0; in add_m6fc()
869 rt->mf6c_byte_cnt = 0; in add_m6fc()
870 rt->mf6c_wrong_if = 0; in add_m6fc()
872 rt->mf6c_expire = 0; /* Don't clean this guy up */ in add_m6fc()
876 for (rte = rt->mf6c_stall; rte != NULL; ) { in add_m6fc()
878 ip6_mdq(rte->m, rte->ifp, rt); in add_m6fc()
886 rt->mf6c_stall = NULL; in add_m6fc()
899 for (rt = mf6ctable[hash]; rt; rt = rt->mf6c_next) { in add_m6fc()
900 if (IN6_ARE_ADDR_EQUAL(&rt->mf6c_origin.sin6_addr, in add_m6fc()
902 IN6_ARE_ADDR_EQUAL(&rt->mf6c_mcastgrp.sin6_addr, in add_m6fc()
904 rt->mf6c_origin = mfccp->mf6cc_origin; in add_m6fc()
905 rt->mf6c_mcastgrp = mfccp->mf6cc_mcastgrp; in add_m6fc()
906 rt->mf6c_parent = mfccp->mf6cc_parent; in add_m6fc()
907 rt->mf6c_ifset = mfccp->mf6cc_ifset; in add_m6fc()
909 rt->mf6c_pkt_cnt = 0; in add_m6fc()
910 rt->mf6c_byte_cnt = 0; in add_m6fc()
911 rt->mf6c_wrong_if = 0; in add_m6fc()
913 if (rt->mf6c_expire) in add_m6fc()
915 rt->mf6c_expire = 0; in add_m6fc()
918 if (rt == NULL) { in add_m6fc()
920 rt = (struct mf6c *)malloc(sizeof(*rt), M_MRTABLE6, in add_m6fc()
922 if (rt == NULL) { in add_m6fc()
928 rt->mf6c_origin = mfccp->mf6cc_origin; in add_m6fc()
929 rt->mf6c_mcastgrp = mfccp->mf6cc_mcastgrp; in add_m6fc()
930 rt->mf6c_parent = mfccp->mf6cc_parent; in add_m6fc()
931 rt->mf6c_ifset = mfccp->mf6cc_ifset; in add_m6fc()
933 rt->mf6c_pkt_cnt = 0; in add_m6fc()
934 rt->mf6c_byte_cnt = 0; in add_m6fc()
935 rt->mf6c_wrong_if = 0; in add_m6fc()
936 rt->mf6c_expire = 0; in add_m6fc()
937 rt->mf6c_stall = NULL; in add_m6fc()
940 rt->mf6c_next = mf6ctable[hash]; in add_m6fc()
941 mf6ctable[hash] = rt; in add_m6fc()
986 struct mf6c *rt; in del_m6fc() local
1001 while ((rt = *nptr) != NULL) { in del_m6fc()
1003 &rt->mf6c_origin.sin6_addr) && in del_m6fc()
1005 &rt->mf6c_mcastgrp.sin6_addr) && in del_m6fc()
1006 rt->mf6c_stall == NULL) in del_m6fc()
1009 nptr = &rt->mf6c_next; in del_m6fc()
1011 if (rt == NULL) { in del_m6fc()
1016 *nptr = rt->mf6c_next; in del_m6fc()
1017 free(rt, M_MRTABLE6); in del_m6fc()
1064 struct mf6c *rt; in X_ip6_mforward() local
1116 MF6CFIND(ip6->ip6_src, ip6->ip6_dst, rt); in X_ip6_mforward()
1120 if (rt) { in X_ip6_mforward()
1122 return (ip6_mdq(m, ifp, rt)); in X_ip6_mforward()
1158 for (rt = mf6ctable[hash]; rt; rt = rt->mf6c_next) { in X_ip6_mforward()
1160 &rt->mf6c_origin.sin6_addr) && in X_ip6_mforward()
1162 &rt->mf6c_mcastgrp.sin6_addr) && (rt->mf6c_stall != NULL)) in X_ip6_mforward()
1166 if (rt == NULL) { in X_ip6_mforward()
1172 rt = (struct mf6c *)malloc(sizeof(*rt), M_MRTABLE6, M_NOWAIT); in X_ip6_mforward()
1173 if (rt == NULL) { in X_ip6_mforward()
1187 free(rt, M_MRTABLE6); in X_ip6_mforward()
1216 free(rt, M_MRTABLE6); in X_ip6_mforward()
1243 free(rt, M_MRTABLE6); in X_ip6_mforward()
1251 bzero(rt, sizeof(*rt)); in X_ip6_mforward()
1252 rt->mf6c_origin.sin6_family = AF_INET6; in X_ip6_mforward()
1253 rt->mf6c_origin.sin6_len = sizeof(struct sockaddr_in6); in X_ip6_mforward()
1254 rt->mf6c_origin.sin6_addr = ip6->ip6_src; in X_ip6_mforward()
1255 rt->mf6c_mcastgrp.sin6_family = AF_INET6; in X_ip6_mforward()
1256 rt->mf6c_mcastgrp.sin6_len = sizeof(struct sockaddr_in6); in X_ip6_mforward()
1257 rt->mf6c_mcastgrp.sin6_addr = ip6->ip6_dst; in X_ip6_mforward()
1258 rt->mf6c_expire = UPCALL_EXPIRE; in X_ip6_mforward()
1260 rt->mf6c_parent = MF6C_INCOMPLETE_PARENT; in X_ip6_mforward()
1263 rt->mf6c_next = mf6ctable[hash]; in X_ip6_mforward()
1264 mf6ctable[hash] = rt; in X_ip6_mforward()
1266 rt->mf6c_stall = rte; in X_ip6_mforward()
1272 for (p = &rt->mf6c_stall; *p != NULL; p = &(*p)->next) in X_ip6_mforward()
1358 ip6_mdq(struct mbuf *m, struct ifnet *ifp, struct mf6c *rt) in ip6_mdq() argument
1374 mifi = rt->mf6c_parent; in ip6_mdq()
1381 rt->mf6c_wrong_if++; in ip6_mdq()
1475 rt->mf6c_pkt_cnt++; in ip6_mdq()
1476 rt->mf6c_byte_cnt += plen; in ip6_mdq()
1490 if (IF_ISSET(mifi, &rt->mf6c_ifset)) { in ip6_mdq()
1497 if (!(mif6table[rt->mf6c_parent].m6_flags & in ip6_mdq()