Lines Matching defs:ws

68 } ws;
315 naddr_ntoa(ws.to.sin_addr.s_addr));
320 if (ws.a != NULL && ws.a->type == RIP_AUTH_MD5)
321 end_md5_auth(wb,ws.a);
322 if (output(wb->type, &ws.to, ws.ifp, wb->buf,
324 && ws.ifp != NULL)
325 if_sick(ws.ifp);
326 ws.npackets++;
330 clr_ws_buf(wb,ws.a);
348 && (ws.state & WS_ST_FLASH))
354 (ws.state & WS_ST_TO_ON_NET) ? ws.ifp : 0);
364 if ((ws.state & WS_ST_RIP2_ALL)
382 if (i > ws.gen_limit) {
391 naddr_ntoa(ws.to.sin_addr
398 ws.gen_limit -= i;
418 if (ws.state & WS_ST_RIP2_ALL) {
420 && ((ws.state & WS_ST_QUERY)
421 || (ag->ag_nhop != ws.ifp->int_addr
423 ws.ifp->int_net,
424 ws.ifp->int_mask))))
464 if (!supplier && !(ws.state & WS_ST_QUERY)
472 && (ws.state & WS_ST_DEFAULT))
480 if (on_net(ws.to.sin_addr.s_addr,
489 if (ws.state & WS_ST_RIP2_ALL)
495 if (on_net(ws.to.sin_addr.s_addr,
532 || on_net(dst, ws.to_net, ws.to_mask))
540 if ((ws.state & WS_ST_AG) && (ws.state & WS_ST_RIP2_ALL))
554 if ((ws.state & WS_ST_AG)
556 || (ws.state & WS_ST_SUPER_AG)))
564 && !(ws.state & WS_ST_RIP2_ALL)
565 && !on_net(dst, ws.to_std_net, ws.to_std_mask))
590 if (ws.ifp != NULL
591 && !(ws.state & WS_ST_QUERY)
592 && (ws.state & WS_ST_TO_ON_NET)
594 || ws.ifp->int_if_flags & IFF_POINTOPOINT)) {
597 || rts->rts_ifp != ws.ifp)
637 pref = RT->rt_poison_metric + ws.metric;
638 metric += ws.metric;
647 if (!(ws.state & WS_ST_QUERY)
676 ws.state = 0;
677 ws.gen_limit = 1024;
679 ws.to = *dst;
680 ws.to_std_mask = std_mask(ws.to.sin_addr.s_addr);
681 ws.to_std_net = ntohl(ws.to.sin_addr.s_addr) & ws.to_std_mask;
684 ws.to_mask = ifp->int_mask;
685 ws.to_net = ifp->int_net;
686 if (on_net(ws.to.sin_addr.s_addr, ws.to_net, ws.to_mask))
687 ws.state |= WS_ST_TO_ON_NET;
690 ws.to_mask = ripv1_mask_net(ws.to.sin_addr.s_addr, 0);
691 ws.to_net = ntohl(ws.to.sin_addr.s_addr) & ws.to_mask;
697 ws.npackets = 0;
699 ws.state |= WS_ST_FLASH;
701 if ((ws.ifp = ifp) == NULL) {
702 ws.metric = 1;
707 ws.metric = ifp->int_metric + 1 + ifp->int_adj_outmetric;
722 ws.state |= WS_ST_QUERY;
738 ws.state |= WS_ST_RIP2_ALL;
739 if ((ws.state & WS_ST_QUERY)
740 || !(ws.state & WS_ST_TO_ON_NET)) {
741 ws.state |= (WS_ST_AG | WS_ST_SUPER_AG);
743 ws.state |= WS_ST_AG;
747 ws.state |= WS_ST_SUPER_AG;
751 ws.a = (vers == RIPv2) ? find_auth(ifp) : 0;
752 if (!passwd_ok && ws.a != NULL && ws.a->type == RIP_AUTH_PW)
753 ws.a = NULL;
754 clr_ws_buf(&v12buf,ws.a);
755 clr_ws_buf(&v2buf,ws.a);
762 || rt->rt_metric+ws.metric >= def_metric) {
763 ws.state |= WS_ST_DEFAULT;
767 def_metric = rt->rt_metric+ws.metric;
774 if ((ws.state & WS_ST_RIP2_ALL)
802 if (ws.npackets == 0
803 && (ws.state & WS_ST_QUERY))