Lines Matching refs:rt
280 #define MFCFIND(mfcbp, o, g, rt) { \
282 rt = NULL; \
289 rt = _mb_rt; \
439 struct mfc *rt;
444 MFCFIND(mfcbp, req->src.s_addr, req->grp.s_addr, rt);
446 if (rt != NULL) {
447 mutex_enter(&rt->mfc_mutex);
448 req->pktcnt = rt->mfc_pkt_cnt;
449 req->bytecnt = rt->mfc_byte_cnt;
450 req->wrong_if = rt->mfc_wrong_if;
451 mutex_exit(&rt->mfc_mutex);
752 struct mfc *rt;
758 while ((rt = mfcbp->mfcb_mfc) != NULL) {
762 mfcbp->mfcb_mfc = rt->mfc_next;
763 free_queue(rt);
764 mi_free(rt);
1162 struct mfc *rt;
1172 * We want this pkt without rt installed in the mfctable to prevent
1199 mfccp->mfcc_mcastgrp.s_addr, rt);
1202 if (rt) {
1210 mutex_enter(&rt->mfc_mutex);
1211 rt->mfc_parent = mfccp->mfcc_parent;
1215 rt->mfc_ttls[i] = mfccp->mfcc_ttls[i];
1217 mutex_exit(&rt->mfc_mutex);
1226 for (rt = mfcbp->mfcb_mfc, nstl = 0; rt; rt = rt->mfc_next) {
1227 mutex_enter(&rt->mfc_mutex);
1228 if ((rt->mfc_origin.s_addr == mfccp->mfcc_origin.s_addr) &&
1229 (rt->mfc_mcastgrp.s_addr == mfccp->mfcc_mcastgrp.s_addr) &&
1230 (rt->mfc_rte != NULL) &&
1231 !(rt->mfc_marks & MFCB_MARK_CONDEMNED)) {
1248 fill_route(rt, mfccp, ipst);
1254 if (rt->mfc_timeout_id != 0) {
1256 id = rt->mfc_timeout_id;
1262 rt->mfc_timeout_id = 0;
1270 mutex_exit(&rt->mfc_mutex);
1272 mutex_enter(&rt->mfc_mutex);
1281 while (rt->mfc_rte != NULL) {
1282 rte = rt->mfc_rte;
1283 rt->mfc_rte = rte->rte_next;
1284 mutex_exit(&rt->mfc_mutex);
1286 rte->mp->b_rptr, rte->ill, 0, rt);
1289 mutex_enter(&rt->mfc_mutex);
1292 mutex_exit(&rt->mfc_mutex);
1314 for (rt = mfcbp->mfcb_mfc; rt; rt = rt->mfc_next) {
1316 mutex_enter(&rt->mfc_mutex);
1317 if ((rt->mfc_origin.s_addr ==
1319 (rt->mfc_mcastgrp.s_addr ==
1321 (!(rt->mfc_marks & MFCB_MARK_CONDEMNED))) {
1322 fill_route(rt, mfccp, ipst);
1323 mutex_exit(&rt->mfc_mutex);
1326 mutex_exit(&rt->mfc_mutex);
1330 if (rt == NULL) {
1331 rt = (struct mfc *)mi_zalloc(sizeof (struct mfc));
1332 if (rt == NULL) {
1340 mutex_enter(&rt->mfc_mutex);
1341 fill_route(rt, mfccp, ipst);
1344 rt->mfc_next = mfcbp->mfcb_mfc;
1345 mfcbp->mfcb_mfc = rt;
1346 mutex_exit(&rt->mfc_mutex);
1359 fill_route(struct mfc *rt, struct mfcctl *mfccp, ip_stack_t *ipst)
1363 rt->mfc_origin = mfccp->mfcc_origin;
1364 rt->mfc_mcastgrp = mfccp->mfcc_mcastgrp;
1365 rt->mfc_parent = mfccp->mfcc_parent;
1368 rt->mfc_ttls[i] = mfccp->mfcc_ttls[i];
1372 rt->mfc_pkt_cnt = 0;
1373 rt->mfc_byte_cnt = 0;
1374 rt->mfc_wrong_if = 0;
1375 rt->mfc_last_assert.tv_sec = rt->mfc_last_assert.tv_nsec = 0;
1438 struct mfc *rt;
1456 for (rt = ipst->ips_mfcs[hash].mfcb_mfc; rt; rt = rt->mfc_next) {
1457 mutex_enter(&rt->mfc_mutex);
1458 if (origin.s_addr == rt->mfc_origin.s_addr &&
1459 mcastgrp.s_addr == rt->mfc_mcastgrp.s_addr &&
1460 rt->mfc_rte == NULL &&
1461 !(rt->mfc_marks & MFCB_MARK_CONDEMNED))
1463 mutex_exit(&rt->mfc_mutex);
1468 * or rt not in mfctable.
1470 if (rt == NULL) {
1481 if (rt->mfc_timeout_id != 0) {
1487 rt->mfc_timeout_id = 0;
1488 mutex_exit(&rt->mfc_mutex);
1489 (void) untimeout(rt->mfc_timeout_id);
1490 mutex_enter(&rt->mfc_mutex);
1493 ASSERT(rt->mfc_rte == NULL);
1499 rt->mfc_marks |= MFCB_MARK_CONDEMNED;
1500 mutex_exit(&rt->mfc_mutex);
1532 struct mfc *rt;
1627 * guard against the rt being deleted, so release lock after reading.
1635 MFCFIND(mfcbp, src, dst, rt);
1638 if (rt != NULL) {
1646 0, rt);
1648 ret = ip_mdq(mp, ipha, ill, tunnel_src, rt);
1976 struct mfc *rt)
2004 vifi = rt->mfc_parent;
2061 rt->mfc_wrong_if++;
2071 if (ipst->ips_pim_assert && rt->mfc_ttls[vifi] > 0 &&
2117 mutex_enter(&rt->mfc_mutex);
2118 rt->mfc_pkt_cnt++;
2119 rt->mfc_byte_cnt += plen;
2120 mutex_exit(&rt->mfc_mutex);
2138 if ((rt->mfc_ttls[vifi] > 0) &&
2139 (ipha->ipha_ttl > rt->mfc_ttls[vifi])) {
2771 struct mfc *rt;
2780 if ((rt = ipst->ips_mfcs[i].mfcb_mfc) != NULL) {
2786 while (rt != NULL) {
2787 mutex_enter(&rt->mfc_mutex);
2788 while ((rte = rt->mfc_rte) != NULL) {
2790 (id = rt->mfc_timeout_id) != 0) {
2797 mutex_exit(&rt->mfc_mutex);
2799 mutex_enter(&rt->mfc_mutex);
2809 rt->mfc_rte = rte->rte_next;
2814 mutex_exit(&rt->mfc_mutex);
2815 rt = rt->mfc_next;
3355 struct mfc *rt;
3367 for (rt = ipst->ips_mfcs[i].mfcb_mfc; rt; rt = rt->mfc_next) {
3368 mutex_enter(&rt->mfc_mutex);
3369 if (rt->mfc_rte != NULL ||
3370 (rt->mfc_marks & MFCB_MARK_CONDEMNED)) {
3371 mutex_exit(&rt->mfc_mutex);
3374 mfcc.mfcc_origin = rt->mfc_origin;
3375 mfcc.mfcc_mcastgrp = rt->mfc_mcastgrp;
3376 mfcc.mfcc_parent = rt->mfc_parent;
3377 mfcc.mfcc_pkt_cnt = rt->mfc_pkt_cnt;
3380 mfcc.mfcc_ttls[j] = rt->mfc_ttls[j];
3385 mutex_exit(&rt->mfc_mutex);