Lines Matching refs:ifp

212 			 * either has the same (gateway, ifp), or if its state
317 struct interface *ifp,
346 nc_ag.ag_ifp = ifp;
425 if (ag->ag_nhop == nhop && ag->ag_ifp == ifp) {
442 ag->ag_ifp = ifp;
468 * differing gate nexthop/or ifp. Flush
494 (ag->ag_nhop == nhop && ag->ag_ifp == ifp &&
541 ag->ag_ifp = ifp;
542 ifp = xifp;
649 nag->ag_ifp = ifp;
798 struct interface *ifp,
846 if (ifp == NULL)
847 ifp = iflookup(gate);
849 if (ifp == NULL || (ifp->int_phys == NULL)) {
850 trace_misc("no ifp for" PAT, ARGS);
852 if (ifp->int_phys->phyi_index > UINT16_MAX) {
854 ifp->int_phys->phyi_index);
858 w_ifp.sdl_index = ifp->int_phys->phyi_index;
905 struct interface *ifp, struct khash ***ppk)
912 (ifp == NULL || k->k_ifp == ifp)) {
928 struct interface *ifp, struct khash ***ppk)
935 (k->k_ifp == ifp)) {
945 kern_add(in_addr_t dst, uint32_t mask, in_addr_t gate, struct interface *ifp)
949 k = kern_find(dst, mask, gate, ifp, &pk);
961 k->k_ifp = ifp;
967 /* delete all khash entries that are wired through the interface ifp */
969 kern_flush_ifp(struct interface *ifp)
978 if (k->k_ifp == ifp) {
1019 kern_check_static(struct khash *k, struct interface *ifp)
1026 new.rts_ifp = ifp;
1028 new.rts_router = (ifp != NULL) ? ifp->int_addr : loopaddr;
1034 if ((ifp != NULL && !IS_IFF_ROUTING(ifp->int_if_flags)) ||
1120 struct interface *ifp = ifptr;
1140 if (ifp == NULL) {
1142 ifp = iflookup(gate);
1143 if (ifp == NULL) {
1151 k = kern_add(S_ADDR(INFO_DST(info)), mask, gate, ifp);
1193 ifp = iflookup(S_ADDR(INFO_AUTHOR(info)));
1195 ifp = NULL;
1196 if (should_supply(ifp) && (ifp == NULL ||
1197 !(ifp->int_state & IS_REDIRECT_OK))) {
1210 ifp ? ifp->int_name : "unknown interface");
1217 ifp ? ifp->int_name : "unknown interface");
1238 kern_check_static(k, ifp);
1302 struct interface *ifp;
1311 ifp = ifwithindex(sdl->sdl_index, _B_TRUE);
1312 if (ifp == NULL)
1315 sin->sin_addr.s_addr = ifp->int_addr;
1352 struct interface *ifp;
1487 * before trying to match ifp by name/nexthop.
1489 if ((ifp = gwkludge_iflookup(rp->ipRouteDest,
1492 ifp = lifp_iflookup(rp->ipRouteNextHop, ifname);
1496 if (ifp != NULL) {
1498 " %-4s #%-3d ", ifp->int_name,
1499 (ifp->int_phys != NULL) ?
1500 ifp->int_phys->phyi_index : 0);
1502 naddr_ntoa(ifp->int_addr),
1503 addrname(((ifp->int_if_flags &
1505 ifp->int_dstaddr : htonl(ifp->int_net)),
1506 ifp->int_mask, 1));
1529 (IRE_INTERFACE|IRE_LOOPBACK)) != 0), ifp);
1571 struct interface *ifp;
1607 ifp = NULL;
1617 ifp = ifwithindex(m.ifm.ifm_index,
1619 if (ifp == NULL) {
1638 strp, ifp->int_name);
1651 CHECK_BAD_INTERVAL || ifp == NULL ||
1652 ((ifp->int_if_flags ^ m.ifm.ifm_flags) &
1661 ifp = ifwithindex(m.r.rtm.rtm_index, 1);
1729 m.r.rtm.rtm_type != RTM_REDIRECT, ifp);
1742 gate, ifp, 1);
1883 struct interface *ifp;
1885 ifp = ag->ag_ifp;
1899 ifp);
1914 k->k_ifp = ifp;
2178 struct interface *ifp, int gone)
2191 k = kern_find(dst, mask, gate, ifp, NULL);
2545 * Dont mark the rtentry bad unless the ifp for the primary
2546 * route is the bad ifp
2572 struct interface *ifp, *ifp1;
2586 for (ifp = ifnet; ifp != NULL; ifp = ifp->int_next) {
2588 if (ifp->int_addr == rt->rt_ifp->int_addr) {
2590 ifp1 = ifp;
2603 for (ifp = ifnet; ifp != NULL; ifp = ifp->int_next) {
2604 if ((ifp->int_state & IS_NEED_NET_SYN) &&
2605 rt->rt_mask == ifp->int_std_mask &&
2606 rt->rt_dst == ifp->int_std_addr) {
2608 ifp1 = ifp;
2726 struct interface *ifp;
2739 ifp = rts->rts_ifp;
2741 if (!AGE_RT(RT->rt_state, rts->rts_origin, ifp)) {
2801 struct interface *ifp;
2815 for (ifp = ifnet; ifp; ifp = ifp->int_next) {
2816 if (!(ifp->int_state & IS_REMOTE))
2820 if (!check_remote(ifp))
2824 if (ifp->int_state & IS_BROKE)
2825 if_ok(ifp, "remote ", _B_FALSE);
2827 if (ifp->int_act_time != NEVER &&
2828 now.tv_sec - ifp->int_act_time > EXPIRE_TIME) {
2832 ifp->int_name,
2833 naddr_ntoa(ifp->int_dstaddr),
2834 (now.tv_sec - ifp->int_act_time)/60,
2835 (now.tv_sec - ifp->int_act_time)%60);
2836 if_sick(ifp, _B_FALSE);
2843 if (now.tv_sec >= ifp->int_query_time) {
2844 ifp->int_query_time = NEVER;
2883 struct interface *ifp;
2885 for (ifp = ifnet; ifp != NULL; ifp = ifp->int_next) {
2886 int_state = ifp->int_state;
2891 if (ifp->int_dstaddr == dstaddr && ifp->int_addr == addr &&
2892 ifp->int_mask == mask)
2893 return (ifp);
2906 struct interface *ifp;
2912 for (ifp = phyi->phyi_interface; ifp != NULL;
2913 ifp = ifp->int_ilist.hl_next) {
2918 phyi->phyi_name, ifp->int_name,
2919 naddr_ntoa(ifp->int_addr),
2920 addrname(((ifp->int_if_flags & IFF_POINTOPOINT) ?
2921 ifp->int_dstaddr : htonl(ifp->int_net)),
2922 ifp->int_mask, 1));
2925 if (addr_on_ifp(addr, ifp, &best))
2926 return (ifp);