Home | History | Annotate | Download | only in netinet

Lines Matching refs:rt

366 	struct mfc *rt;
368 LIST_FOREACH(rt, &mfchashtbl[MFCHASH(*o, *g)], mfc_hash) {
369 if (in_hosteq(rt->mfc_origin, *o) &&
370 in_hosteq(rt->mfc_mcastgrp, *g) &&
371 (rt->mfc_stall == NULL))
375 return rt;
545 struct mfc *rt;
548 rt = mfc_find(&req->src, &req->grp);
549 if (rt == NULL) {
554 req->pktcnt = rt->mfc_pkt_cnt;
555 req->bytecnt = rt->mfc_byte_cnt;
556 req->wrong_if = rt->mfc_wrong_if;
659 struct mfc *rt, *nrt;
661 for (rt = LIST_FIRST(&mfchashtbl[i]); rt; rt = nrt) {
662 nrt = LIST_NEXT(rt, mfc_hash);
664 expire_mfc(rt);
692 struct mfc *rt;
704 LIST_FOREACH(rt, &mfchashtbl[i], mfc_hash) {
705 for (rte = rt->mfc_stall; rte; rte = rte->next) {
977 update_mfc_params(struct mfc *rt, struct mfcctl2 *mfccp)
981 rt->mfc_parent = mfccp->mfcc_parent;
983 rt->mfc_ttls[i] = mfccp->mfcc_ttls[i];
984 rt->mfc_flags[i] = mfccp->mfcc_flags[i] & mrt_api_config &
989 rt->mfc_rp = mfccp->mfcc_rp;
991 rt->mfc_rp = zeroin_addr;
998 init_mfc_params(struct mfc *rt, struct mfcctl2 *mfccp)
1000 rt->mfc_origin = mfccp->mfcc_origin;
1001 rt->mfc_mcastgrp = mfccp->mfcc_mcastgrp;
1003 update_mfc_params(rt, mfccp);
1006 rt->mfc_pkt_cnt = 0;
1007 rt->mfc_byte_cnt = 0;
1008 rt->mfc_wrong_if = 0;
1009 timerclear(&rt->mfc_last_assert);
1013 expire_mfc(struct mfc *rt)
1017 free_bw_list(rt->mfc_bw_meter);
1019 for (rte = rt->mfc_stall; rte != NULL; rte = nrte) {
1025 LIST_REMOVE(rt, mfc_hash);
1026 free(rt, M_MRTABLE);
1037 struct mfc *rt;
1059 rt = mfc_find(&mfccp->mfcc_origin, &mfccp->mfcc_mcastgrp);
1062 if (rt) {
1069 update_mfc_params(rt, mfccp);
1080 LIST_FOREACH(rt, &mfchashtbl[hash], mfc_hash) {
1081 if (in_hosteq(rt->mfc_origin, mfccp->mfcc_origin) &&
1082 in_hosteq(rt->mfc_mcastgrp, mfccp->mfcc_mcastgrp) &&
1083 rt->mfc_stall != NULL) {
1089 mfccp->mfcc_parent, rt->mfc_stall);
1095 mfccp->mfcc_parent, rt->mfc_stall);
1097 rte = rt->mfc_stall;
1098 init_mfc_params(rt, mfccp);
1099 rt->mfc_stall = NULL;
1101 rt->mfc_expire = 0; /* Don't clean this guy up */
1108 ip_mdq(rte->m, rte->ifp, rt);
1132 LIST_FOREACH(rt, &mfchashtbl[hash], mfc_hash) {
1133 if (in_hosteq(rt->mfc_origin, mfccp->mfcc_origin) &&
1134 in_hosteq(rt->mfc_mcastgrp, mfccp->mfcc_mcastgrp)) {
1135 init_mfc_params(rt, mfccp);
1136 if (rt->mfc_expire)
1138 rt->mfc_expire = 0;
1142 if (rt == NULL) { /* no upcall, so make a new entry */
1143 rt = malloc(sizeof(*rt), M_MRTABLE, M_NOWAIT);
1144 if (rt == NULL) {
1149 init_mfc_params(rt, mfccp);
1150 rt->mfc_expire = 0;
1151 rt->mfc_stall = NULL;
1152 rt->mfc_bw_meter = NULL;
1155 LIST_INSERT_HEAD(&mfchashtbl[hash], rt, mfc_hash);
1196 struct mfc *rt;
1223 rt = mfc_find(&mfccp->mfcc_origin, &mfccp->mfcc_mcastgrp);
1224 if (rt == NULL) {
1232 free_bw_list(rt->mfc_bw_meter);
1233 rt->mfc_bw_meter = NULL;
1235 LIST_REMOVE(rt, mfc_hash);
1236 free(rt, M_MRTABLE);
1302 struct mfc *rt;
1349 rt = mfc_find(&ip->ip_src, &ip->ip_dst);
1352 if (rt != NULL) {
1354 return ip_mdq(m, ifp, rt);
1398 LIST_FOREACH(rt, &mfchashtbl[hash], mfc_hash) {
1399 if (in_hosteq(ip->ip_src, rt->mfc_origin) &&
1400 in_hosteq(ip->ip_dst, rt->mfc_mcastgrp) &&
1401 rt->mfc_stall != NULL)
1405 if (rt == NULL) {
1421 rt = malloc(sizeof(*rt), M_MRTABLE, M_NOWAIT);
1422 if (rt == NULL)
1452 free(rt, M_MRTABLE);
1461 rt->mfc_origin = ip->ip_src;
1462 rt->mfc_mcastgrp = ip->ip_dst;
1463 rt->mfc_pkt_cnt = 0;
1464 rt->mfc_byte_cnt = 0;
1465 rt->mfc_wrong_if = 0;
1466 rt->mfc_expire = UPCALL_EXPIRE;
1469 rt->mfc_ttls[i] = 0;
1470 rt->mfc_flags[i] = 0;
1472 rt->mfc_parent = -1;
1475 rt->mfc_rp = zeroin_addr;
1477 rt->mfc_bw_meter = NULL;
1480 LIST_INSERT_HEAD(&mfchashtbl[hash], rt, mfc_hash);
1482 rt->mfc_stall = rte;
1493 for (p = &rt->mfc_stall; *p != NULL; p = &(*p)->next)
1531 struct mfc *rt, *nrt;
1536 for (rt = LIST_FIRST(&mfchashtbl[i]); rt; rt = nrt) {
1537 nrt = LIST_NEXT(rt, mfc_hash);
1539 if (rt->mfc_expire == 0 || --rt->mfc_expire > 0)
1546 while (rt->mfc_bw_meter != NULL) {
1547 struct bw_meter *x = rt->mfc_bw_meter;
1549 rt->mfc_bw_meter = x->bm_mfc_next;
1557 ntohl(rt->mfc_origin.s_addr),
1558 ntohl(rt->mfc_mcastgrp.s_addr));
1560 expire_mfc(rt);
1585 ip_mdq(struct mbuf *m, struct ifnet *ifp, struct mfc *rt)
1596 vifi = rt->mfc_parent;
1604 ++rt->mfc_wrong_if;
1633 if (rt->mfc_flags[vifi] &
1641 TV_DELTA(rt->mfc_last_assert, now, delta);
1653 rt->mfc_last_assert = now;
1682 rt->mfc_pkt_cnt++;
1683 rt->mfc_byte_cnt += plen;
1692 if ((rt->mfc_ttls[vifi] > 0) &&
1693 (ip->ip_ttl > rt->mfc_ttls[vifi])) {
1698 pim_register_send(ip, vifp, m, rt);
1708 if (rt->mfc_bw_meter != NULL) {
1713 for (x = rt->mfc_bw_meter; x != NULL; x = x->bm_mfc_next)
2726 struct mfc *rt)
2748 !in_nullhost(rt->mfc_rp)) {
2749 pim_register_send_rp(ip, vifp, mm, rt);
2751 pim_register_send_upcall(ip, vifp, mm, rt);
2813 struct mbuf *mb_copy, struct mfc *rt)
2868 struct mbuf *mb_copy, struct mfc *rt)
2874 vifi_t vifi = rt->mfc_parent;
2907 ip_outer->ip_dst = rt->mfc_rp;
2919 if (rt->mfc_flags[vifi] & MRT_MFC_FLAGS_BORDER_VIF & mrt_api_config)