Lines Matching refs:rc
257 decompose_change_notification(struct rib_cmd_info *rc, route_notification_t *cb,
266 struct rib_cmd_info rc_del = { .rc_cmd = RTM_DELETE, .rc_rt = rc->rc_rt };
267 struct rib_cmd_info rc_add = { .rc_cmd = RTM_ADD, .rc_rt = rc->rc_rt };
269 if (NH_IS_NHGRP(rc->rc_nh_old)) {
270 wn_old = nhgrp_get_nhops((struct nhgrp_object *)rc->rc_nh_old, &num_old);
272 tmp.nh = rc->rc_nh_old;
273 tmp.weight = rc->rc_nh_weight;
277 if (NH_IS_NHGRP(rc->rc_nh_new)) {
278 wn_new = nhgrp_get_nhops((struct nhgrp_object *)rc->rc_nh_new, &num_new);
280 tmp.nh = rc->rc_nh_new;
281 tmp.weight = rc->rc_nh_weight;
374 * Decompose multipath cmd info @rc into a list of add/del/change
376 * Assumes at least one of the nexthops in @rc is multipath.
379 rib_decompose_notification(struct rib_cmd_info *rc, route_notification_t *cb,
386 rc_new = *rc;
388 cb, rc->cmd, rc->nh_old, rc->nh_new);
389 switch (rc->rc_cmd) {
391 if (!NH_IS_NHGRP(rc->rc_nh_new))
393 wn = nhgrp_get_nhops((struct nhgrp_object *)rc->rc_nh_new, &num_nhops);
401 if (!NH_IS_NHGRP(rc->rc_nh_old))
403 wn = nhgrp_get_nhops((struct nhgrp_object *)rc->rc_nh_old, &num_nhops);
411 if (!NH_IS_NHGRP(rc->rc_nh_old) && !NH_IS_NHGRP(rc->rc_nh_new))
413 decompose_change_notification(rc, cb, cbdata);