void mroute_helper_add_iroute (struct mroute_helper *mh, const struct iroute *ir) { if (ir->netbits >= 0) { ASSERT (ir->netbits < MR_HELPER_NET_LEN); ++mh->cache_generation; ++mh->net_len_refcount[ir->netbits]; if (mh->net_len_refcount[ir->netbits] == 1) mroute_helper_regenerate (mh); } }
void mroute_helper_del_iroute6 (struct mroute_helper *mh, const struct iroute_ipv6 *ir6) { if (ir6->netbits >= 0) { ASSERT (ir6->netbits < MR_HELPER_NET_LEN); ++mh->cache_generation; --mh->net_len_refcount[ir6->netbits]; ASSERT (mh->net_len_refcount[ir6->netbits] >= 0); if (!mh->net_len_refcount[ir6->netbits]) mroute_helper_regenerate (mh); } }
void mroute_helper_add_iroute46(struct mroute_helper *mh, int netbits) { if (netbits >= 0) { ASSERT(netbits < MR_HELPER_NET_LEN); ++mh->cache_generation; ++mh->net_len_refcount[netbits]; if (mh->net_len_refcount[netbits] == 1) { mroute_helper_regenerate(mh); } } }