• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/zebra/ripd/

Lines Matching defs:rte

491 rip_rte_process (struct rte *rte, struct sockaddr_in *from,
507 p.prefix = rte->prefix;
508 p.prefixlen = ip_masklen (rte->mask);
526 ret = rip_offset_list_apply_in (&p, ifp, &rte->metric);
531 rte->metric += ifp->metric;
533 if (rte->metric > RIP_METRIC_INFINITY)
534 rte->metric = RIP_METRIC_INFINITY;
537 if (rte->nexthop.s_addr == 0)
540 nexthop = &rte->nexthop;
579 if (rte->metric != RIP_METRIC_INFINITY)
589 rinfo->metric = rte->metric;
590 rinfo->tag = ntohs (rte->tag);
642 if ((same && rinfo->metric != rte->metric) ||
643 rte->metric < rinfo->metric)
649 rinfo->metric = rte->metric;
650 rinfo->tag = ntohs (rte->tag);
741 struct rte *rte;
760 rte = packet->rte;
762 for (lim = (caddr_t) packet + size; (caddr_t) rte < lim; rte++)
766 netmask = ip_masklen (rte->mask);
768 if (ntohs (rte->family) == 0xffff)
770 if (ntohs (rte->tag) == RIP_AUTH_SIMPLE_PASSWORD)
772 p = (u_char *)&rte->prefix;
775 ntohs (rte->family), ntohs (rte->tag), p);
778 else if (ntohs (rte->tag) == RIP_AUTH_MD5)
782 md5 = (struct rip_md5_info *) &packet->rte;
793 else if (ntohs (rte->tag) == RIP_AUTH_DATA)
795 p = (u_char *)&rte->prefix;
799 ntohs (rte->family), ntohs (rte->tag));
810 ntohs (rte->family), ntohs (rte->tag));
817 inet_ntop (AF_INET, &rte->prefix, pbuf, BUFSIZ),netmask,
818 inet_ntop (AF_INET, &rte->nexthop, nbuf, BUFSIZ),
819 ntohs (rte->family), ntohs (rte->tag),
820 (u_long)ntohl (rte->metric));
828 inet_ntop (AF_INET, &rte->prefix, pbuf, BUFSIZ),
829 ntohs (rte->family), ntohs (rte->tag),
830 (u_long)ntohl (rte->metric));
869 rip_auth_simple_password (struct rte *rte, struct sockaddr_in *from,
883 || ntohs (rte->tag) != RIP_AUTH_SIMPLE_PASSWORD)
889 auth_str = (char *) &rte->prefix;
903 key = key_match_for_accept (keychain, (char *) &rte->prefix);
932 md5 = (struct rip_md5_info *) &packet->rte;
1096 struct rte *rte;
1134 rte = packet->rte;
1136 for (lim = (caddr_t) packet + size; (caddr_t) rte < lim; rte++)
1145 rte == packet->rte &&
1146 rte->family == 0xffff)
1149 if (ntohs (rte->family) != AF_INET)
1154 ntohs (rte->family), inet_ntoa (from->sin_addr));
1161 if (! rip_destination_check (rte->prefix))
1171 rte->metric = ntohl (rte->metric);
1174 if (! (rte->metric >= 1 && rte->metric <= 16))
1184 if (packet->version == RIPv1 && rte->nexthop.s_addr != 0)
1188 inet_ntoa (rte->nexthop));
1198 if (packet->version == RIPv2 && rte->nexthop.s_addr != 0)
1203 addrval = ntohl (rte->nexthop.s_addr);
1207 zlog_info ("Nexthop %s is multicast address, skip this rte",
1208 inet_ntoa (rte->nexthop));
1213 if (! if_lookup_address (rte->nexthop))
1218 rn = route_node_match_ipv4 (rip->table, &rte->nexthop);
1229 zlog_info ("Next hop %s is on RIP network. Set nexthop to the packet's originator", inet_ntoa (rte->nexthop));
1231 rte->nexthop = rinfo->from;
1237 zlog_info ("Next hop %s is not directly reachable. Treat it as 0.0.0.0", inet_ntoa (rte->nexthop));
1239 rte->nexthop.s_addr = 0;
1248 zlog_info ("Next hop %s is not directly reachable. Treat it as 0.0.0.0", inet_ntoa (rte->nexthop));
1250 rte->nexthop.s_addr = 0;
1266 if ((packet->version == RIPv1 && rte->prefix.s_addr != 0)
1268 && (rte->prefix.s_addr != 0 && rte->mask.s_addr == 0)))
1272 destination = ntohl (rte->prefix.s_addr);
1276 masklen2ip (32, &rte->mask);
1280 masklen2ip (24, &rte->mask);
1284 masklen2ip (16, &rte->mask);
1288 masklen2ip (8, &rte->mask);
1295 && (rte->mask.s_addr != 0)
1296 && ((rte->prefix.s_addr & rte->mask.s_addr) != rte->prefix.s_addr))
1300 inet_ntoa (rte->prefix), ip_masklen (rte->mask));
1308 && (rte->prefix.s_addr == 0)
1309 && (rte->mask.s_addr != 0))
1315 rte->mask.s_addr = 0;
1319 rip_rte_process (rte, from, ifp);
1501 struct rte *rte;
1519 rte = packet->rte;
1523 if (lim == (caddr_t) rte)
1530 if (lim == ((caddr_t) (rte + 1)) &&
1531 ntohs (rte->family) == 0 &&
1532 ntohl (rte->metric) == RIP_METRIC_INFINITY)
1549 for (; ((caddr_t) rte) < lim; rte++)
1551 p.prefix = rte->prefix;
1552 p.prefixlen = ip_masklen (rte->mask);
1559 rte->metric = htonl (rinfo->metric);
1563 rte->metric = htonl (RIP_METRIC_INFINITY);
1838 && (packet->version == RIPv2) && (packet->rte->family == 0xffff))
1864 if (packet->version == RIPv1 && packet->rte->family == 0xffff)
1877 if (packet->rte->family == 0xffff)
1879 if (ntohs (packet->rte->tag) == RIP_AUTH_SIMPLE_PASSWORD)
1881 ret = rip_auth_simple_password (packet->rte, &from, ifp);
1899 else if (ntohs (packet->rte->tag) == RIP_AUTH_MD5)
1926 ntohs (packet->rte->tag));
2688 struct rte *rte;
2695 rte = rip_packet.rte;
2696 rte->metric = htonl (RIP_METRIC_INFINITY);