Lines Matching refs:ws

58 } ws;  variable
305 naddr_ntoa(ws.to.sin_addr.s_addr)); in supply_write()
310 if (ws.a != NULL && ws.a->type == RIP_AUTH_MD5) in supply_write()
311 end_md5_auth(wb,ws.a); in supply_write()
312 if (output(wb->type, &ws.to, ws.ifp, wb->buf, in supply_write()
314 && ws.ifp != NULL) in supply_write()
315 if_sick(ws.ifp); in supply_write()
316 ws.npackets++; in supply_write()
320 clr_ws_buf(wb,ws.a); in supply_write()
338 && (ws.state & WS_ST_FLASH)) in supply_out()
344 (ws.state & WS_ST_TO_ON_NET) ? ws.ifp : 0); in supply_out()
354 if ((ws.state & WS_ST_RIP2_ALL) in supply_out()
372 if (i > ws.gen_limit) { in supply_out()
381 naddr_ntoa(ws.to.sin_addr in supply_out()
388 ws.gen_limit -= i; in supply_out()
408 if (ws.state & WS_ST_RIP2_ALL) { in supply_out()
410 && ((ws.state & WS_ST_QUERY) in supply_out()
411 || (ag->ag_nhop != ws.ifp->int_addr in supply_out()
413 ws.ifp->int_net, in supply_out()
414 ws.ifp->int_mask)))) in supply_out()
454 if (!supplier && !(ws.state & WS_ST_QUERY) in walk_supply()
462 && (ws.state & WS_ST_DEFAULT)) in walk_supply()
470 if (on_net(ws.to.sin_addr.s_addr, in walk_supply()
479 if (ws.state & WS_ST_RIP2_ALL) in walk_supply()
485 if (on_net(ws.to.sin_addr.s_addr, in walk_supply()
522 || on_net(dst, ws.to_net, ws.to_mask)) in walk_supply()
530 if ((ws.state & WS_ST_AG) && (ws.state & WS_ST_RIP2_ALL)) in walk_supply()
544 if ((ws.state & WS_ST_AG) in walk_supply()
546 || (ws.state & WS_ST_SUPER_AG))) in walk_supply()
554 && !(ws.state & WS_ST_RIP2_ALL) in walk_supply()
555 && !on_net(dst, ws.to_std_net, ws.to_std_mask)) in walk_supply()
580 if (ws.ifp != NULL in walk_supply()
581 && !(ws.state & WS_ST_QUERY) in walk_supply()
582 && (ws.state & WS_ST_TO_ON_NET) in walk_supply()
584 || ws.ifp->int_if_flags & IFF_POINTOPOINT)) { in walk_supply()
587 || rts->rts_ifp != ws.ifp) in walk_supply()
627 pref = RT->rt_poison_metric + ws.metric; in walk_supply()
628 metric += ws.metric; in walk_supply()
637 if (!(ws.state & WS_ST_QUERY) in walk_supply()
666 ws.state = 0; in supply()
667 ws.gen_limit = 1024; in supply()
669 ws.to = *dst; in supply()
670 ws.to_std_mask = std_mask(ws.to.sin_addr.s_addr); in supply()
671 ws.to_std_net = ntohl(ws.to.sin_addr.s_addr) & ws.to_std_mask; in supply()
674 ws.to_mask = ifp->int_mask; in supply()
675 ws.to_net = ifp->int_net; in supply()
676 if (on_net(ws.to.sin_addr.s_addr, ws.to_net, ws.to_mask)) in supply()
677 ws.state |= WS_ST_TO_ON_NET; in supply()
680 ws.to_mask = ripv1_mask_net(ws.to.sin_addr.s_addr, 0); in supply()
681 ws.to_net = ntohl(ws.to.sin_addr.s_addr) & ws.to_mask; in supply()
687 ws.npackets = 0; in supply()
689 ws.state |= WS_ST_FLASH; in supply()
691 if ((ws.ifp = ifp) == NULL) { in supply()
692 ws.metric = 1; in supply()
697 ws.metric = ifp->int_metric + 1 + ifp->int_adj_outmetric; in supply()
712 ws.state |= WS_ST_QUERY; in supply()
728 ws.state |= WS_ST_RIP2_ALL; in supply()
729 if ((ws.state & WS_ST_QUERY) in supply()
730 || !(ws.state & WS_ST_TO_ON_NET)) { in supply()
731 ws.state |= (WS_ST_AG | WS_ST_SUPER_AG); in supply()
733 ws.state |= WS_ST_AG; in supply()
737 ws.state |= WS_ST_SUPER_AG; in supply()
741 ws.a = (vers == RIPv2) ? find_auth(ifp) : 0; in supply()
742 if (!passwd_ok && ws.a != NULL && ws.a->type == RIP_AUTH_PW) in supply()
743 ws.a = NULL; in supply()
744 clr_ws_buf(&v12buf,ws.a); in supply()
745 clr_ws_buf(&v2buf,ws.a); in supply()
752 || rt->rt_metric+ws.metric >= def_metric) { in supply()
753 ws.state |= WS_ST_DEFAULT; in supply()
757 def_metric = rt->rt_metric+ws.metric; in supply()
764 if ((ws.state & WS_ST_RIP2_ALL) in supply()
792 if (ws.npackets == 0 in supply()
793 && (ws.state & WS_ST_QUERY)) in supply()