Home | History | Annotate | Download | only in routed

Lines Matching defs:ws

72 } ws;
333 naddr_ntoa(ws.to.sin_addr.s_addr));
338 if (ws.a != 0 && ws.a->type == RIP_AUTH_MD5)
339 end_md5_auth(wb,ws.a);
340 if (output(wb->type, &ws.to, ws.ifp, wb->buf,
342 && ws.ifp != 0)
343 if_sick(ws.ifp);
344 ws.npackets++;
348 clr_ws_buf(wb,ws.a);
366 && (ws.state & WS_ST_FLASH))
372 (ws.state & WS_ST_TO_ON_NET) ? ws.ifp : 0);
382 if ((ws.state & WS_ST_RIP2_ALL)
400 if (i > ws.gen_limit) {
409 naddr_ntoa(ws.to.sin_addr
416 ws.gen_limit -= i;
436 if (ws.state & WS_ST_RIP2_ALL) {
438 && ((ws.state & WS_ST_QUERY)
439 || (ag->ag_nhop != ws.ifp->int_addr
441 ws.ifp->int_net,
442 ws.ifp->int_mask))))
482 if (!supplier && !(ws.state & WS_ST_QUERY)
490 && (ws.state & WS_ST_DEFAULT))
498 if (on_net(ws.to.sin_addr.s_addr,
507 if (ws.state & WS_ST_RIP2_ALL)
513 if (on_net(ws.to.sin_addr.s_addr,
550 || on_net(dst, ws.to_net, ws.to_mask))
558 if ((ws.state & WS_ST_AG) && (ws.state & WS_ST_RIP2_ALL))
572 if ((ws.state & WS_ST_AG)
574 || (ws.state & WS_ST_SUPER_AG)))
582 && !(ws.state & WS_ST_RIP2_ALL)
583 && !on_net(dst, ws.to_std_net, ws.to_std_mask))
608 if (ws.ifp != 0
609 && !(ws.state & WS_ST_QUERY)
610 && (ws.state & WS_ST_TO_ON_NET)
612 || ws.ifp->int_if_flags & IFF_POINTOPOINT)) {
615 || rts->rts_ifp != ws.ifp)
655 pref = RT->rt_poison_metric + ws.metric;
656 metric += ws.metric;
665 if (!(ws.state & WS_ST_QUERY)
695 ws.state = 0;
696 ws.gen_limit = 1024;
698 ws.to = *dst;
699 ws.to_std_mask = std_mask(ws.to.sin_addr.s_addr);
700 ws.to_std_net = ntohl(ws.to.sin_addr.s_addr) & ws.to_std_mask;
703 ws.to_mask = ifp->int_mask;
704 ws.to_net = ifp->int_net;
705 if (on_net(ws.to.sin_addr.s_addr, ws.to_net, ws.to_mask))
706 ws.state |= WS_ST_TO_ON_NET;
709 ws.to_mask = ripv1_mask_net(ws.to.sin_addr.s_addr, 0);
710 ws.to_net = ntohl(ws.to.sin_addr.s_addr) & ws.to_mask;
716 ws.npackets = 0;
718 ws.state |= WS_ST_FLASH;
720 if ((ws.ifp = ifp) == 0) {
721 ws.metric = 1;
726 ws.metric = ifp->int_metric + 1 + ifp->int_adj_outmetric;
741 ws.state |= WS_ST_QUERY;
757 ws.state |= WS_ST_RIP2_ALL;
758 if ((ws.state & WS_ST_QUERY)
759 || !(ws.state & WS_ST_TO_ON_NET)) {
760 ws.state |= (WS_ST_AG | WS_ST_SUPER_AG);
762 ws.state |= WS_ST_AG;
766 ws.state |= WS_ST_SUPER_AG;
770 ws.a = (vers == RIPv2) ? find_auth(ifp) : 0;
771 if (!passwd_ok && ws.a != 0 && ws.a->type == RIP_AUTH_PW)
772 ws.a = 0;
773 clr_ws_buf(&v12buf,ws.a);
774 clr_ws_buf(&v2buf,ws.a);
781 || rt->rt_metric+ws.metric >= def_metric) {
782 ws.state |= WS_ST_DEFAULT;
786 def_metric = rt->rt_metric+ws.metric;
793 if ((ws.state & WS_ST_RIP2_ALL)
821 if (ws.npackets == 0
822 && (ws.state & WS_ST_QUERY))