Lines Matching refs:ifp
59 struct interface *ifp, *ifp1, *ifp2; in receiving_interface() local
67 if (findremote && ((ifp = findremoteif(from->sin_addr.s_addr)) != NULL)) in receiving_interface()
68 return (ifp); in receiving_interface()
80 if ((ifp = ifwithindex(ifindex, _B_TRUE)) != NULL) { in receiving_interface()
83 for (ifp1 = ifp; ifp1 != NULL; in receiving_interface()
95 ifp = ifp2; in receiving_interface()
96 return (ifp); in receiving_interface()
115 struct interface *ifp; in read_rip() local
145 ifp = receiving_interface(&msg, _B_TRUE); in read_rip()
147 input(&from, ifp, &inbuf.rip, cc); in read_rip()
155 struct interface *ifp, /* interface of incoming socket */ in input() argument
178 if (ifp != NULL && (ifp->int_state & IS_REMOTE)) in input()
179 ifp->int_act_time = now.tv_sec; in input()
181 trace_rip("Recv", "from", from, ifp, rip, cc); in input()
183 if (ifp != NULL && (ifp->int_if_flags & IFF_NORTEXCH)) { in input()
185 ifp->int_name); in input()
254 ifp = ifp1; in input()
255 if (check_remote(ifp)) { in input()
256 ifp->int_act_time = now.tv_sec; in input()
257 if_ok(ifp, "remote ", _B_FALSE); in input()
272 (ifp != NULL && (IS_RIP_OUT_OFF(ifp->int_state) || in input()
273 !IS_IFF_ROUTING(ifp->int_if_flags)))) { in input()
303 if (rip->rip_vers == RIPv2 && (ifp == NULL || in input()
304 (ifp->int_state & IS_NO_RIPV1_OUT))) { in input()
311 ap = find_auth(ifp); in input()
326 !ck_passwd(ifp, rip, (uint8_t *)lim, FROM_NADDR, in input()
353 supply(from, ifp, OUT_QUERY, 0, in input()
367 if (ifp == NULL) { in input()
371 if (IS_RIP_OFF(ifp->int_state) || in input()
372 !should_supply(ifp)) { in input()
382 if ((ifp->int_state & IS_NO_RIPV1_OUT) && in input()
384 if (!(ifp->int_state & IS_PM_RDISC)) { in input()
392 metric = ifp->int_d_metric; in input()
409 supply(from, ifp, OUT_UNICAST, 0, in input()
410 (ifp->int_state & IS_NO_RIPV1_OUT) in input()
446 mask = ripv1_mask_host(dst, ifp); in input()
474 if (ifp != NULL && in input()
475 on_net(rt->rt_gate, ifp->int_net, in input()
476 ifp->int_mask) && in input()
477 rt->rt_gate != ifp->int_addr) in input()
509 (void) output(OUT_QUERY, from, ifp, v12buf.buf, in input()
512 (void) output(OUT_UNICAST, from, ifp, in input()
534 if (ifp == NULL || !remote_address_ok(ifp, FROM_NADDR)) { in input()
544 if (ifp->int_state & IS_DISTRUST) { in input()
556 if (ifp->int_auth[0].type != RIP_AUTH_NONE) { in input()
582 if (ifp != NULL && (ifp->int_if_flags & IFF_NOXMIT)) { in input()
584 "(IFF_NOXMIT)", ifp->int_name); in input()
621 ifp = ifp1; in input()
622 if (check_remote(ifp)) { in input()
623 ifp->int_act_time = now.tv_sec; in input()
624 if_ok(ifp, "remote ", _B_FALSE); in input()
636 if (ifp != NULL && in input()
637 !remote_address_ok(ifp, FROM_NADDR)) { in input()
641 ifp->int_name); in input()
651 if (ifp == NULL) { in input()
659 if (IS_RIP_IN_OFF(ifp->int_state)) { in input()
662 rip->rip_vers, ifp->int_name); in input()
672 if (((ifp->int_state & IS_NO_RIPV1_IN) && in input()
674 ((ifp->int_state & IS_NO_RIPV2_IN) && in input()
687 if (ifp->int_state & IS_BROKE) { in input()
689 ifp->int_name); in input()
697 if (ifp->int_state & IS_DISTRUST) { in input()
715 if (ifp->int_auth[0].type != RIP_AUTH_NONE && in input()
717 !ck_passwd(ifp, rip, (uint8_t *)lim, FROM_NADDR, &use_auth)) in input()
742 new.rts_ifp = ifp; in input()
754 if (!IS_IFF_ROUTING(ifp->int_if_flags)) { in input()
804 ifp->int_net, ifp->int_mask) && in input()
822 mask = ripv1_mask_host(dst, ifp); in input()
833 (ifp->int_state & IS_NO_HOST)) { in input()
850 n->n_metric += ifp->int_metric; in input()
877 if (ifp->int_d_metric != 0 && dst == RIP_DEFAULT && in input()
878 n->n_metric >= ifp->int_d_metric) in input()
943 new.rts_ifp = ifp; in input()
973 if (rip->rip_vers == RIPv2 && (ifp == NULL || in input()
974 (ifp->int_state & IS_NO_RIPV1_OUT))) { in input()
1011 mask = ripv1_mask_host(dst, ifp); in input()
1036 if (ifp != NULL && in input()
1037 on_net(rt->rt_gate, ifp->int_net, ifp->int_mask) && in input()
1038 rt->rt_gate != ifp->int_addr) in input()
1047 (void) output(OUT_QUERY, from, ifp, v12buf.buf, in input()