tag | line | file | source code |
rth | 191 | include/net/route.h | struct rtable * rth; |
rth | 195 | include/net/route.h | for (rth=ip_rt_hash_table[ip_rt_hash_code(daddr)^local]; rth; rth=rth->rt_next) |
rth | 197 | include/net/route.h | if (rth->rt_dst == daddr) |
rth | 199 | include/net/route.h | rth->rt_lastuse = jiffies; |
rth | 200 | include/net/route.h | ATOMIC_INCR(&rth->rt_use); |
rth | 201 | include/net/route.h | ATOMIC_INCR(&rth->rt_refcnt); |
rth | 203 | include/net/route.h | return rth; |
rth | 148 | net/ipv4/route.c | static void rt_cache_add(unsigned hash, struct rtable * rth); |
rth | 1041 | net/ipv4/route.c | struct rtable *rth, **rthp; |
rth | 1050 | net/ipv4/route.c | while ((rth = *rthp) != NULL) |
rth | 1052 | net/ipv4/route.c | struct rtable * rth_next = rth->rt_next; |
rth | 1059 | net/ipv4/route.c | if (!rth->rt_refcnt && rth->rt_lastuse + RT_CACHE_TIMEOUT < now) |
rth | 1065 | net/ipv4/route.c | printk("rt_check_expire clean %02x@%08x\n", i, rth->rt_dst); |
rth | 1067 | net/ipv4/route.c | rt_free(rth); |
rth | 1079 | net/ipv4/route.c | if (rth->rt_lastuse + RT_CACHE_BUBBLE_THRESHOULD < rth_next->rt_lastuse || |
rth | 1080 | net/ipv4/route.c | (rth->rt_lastuse < rth_next->rt_lastuse && |
rth | 1081 | net/ipv4/route.c | rth->rt_use < rth_next->rt_use)) |
rth | 1084 | net/ipv4/route.c | printk("rt_check_expire bubbled %02x@%08x<->%08x\n", i, rth->rt_dst, rth_next->rt_dst); |
rth | 1088 | net/ipv4/route.c | rth->rt_next = rth_next->rt_next; |
rth | 1089 | net/ipv4/route.c | rth_next->rt_next = rth; |
rth | 1094 | net/ipv4/route.c | rthp = &rth->rt_next; |
rth | 1136 | net/ipv4/route.c | struct rtable * rth, * next; |
rth | 1143 | net/ipv4/route.c | if (!(rth = ip_rt_hash_table[i])) |
rth | 1152 | net/ipv4/route.c | for (; rth; rth=next) |
rth | 1154 | net/ipv4/route.c | next = rth->rt_next; |
rth | 1157 | net/ipv4/route.c | rth->rt_next = NULL; |
rth | 1158 | net/ipv4/route.c | rt_free(rth); |
rth | 1178 | net/ipv4/route.c | struct rtable * rth, **rthp; |
rth | 1187 | net/ipv4/route.c | for (rthp=&ip_rt_hash_table[i]; (rth=*rthp); rthp=&rth->rt_next) |
rth | 1189 | net/ipv4/route.c | if (rth->rt_lastuse + expire*(rth->rt_refcnt+1) > now) |
rth | 1193 | net/ipv4/route.c | *rthp=rth->rt_next; |
rth | 1194 | net/ipv4/route.c | rth->rt_next = NULL; |
rth | 1196 | net/ipv4/route.c | rt_free(rth); |
rth | 1366 | net/ipv4/route.c | static void rt_cache_add(unsigned hash, struct rtable * rth) |
rth | 1370 | net/ipv4/route.c | __u32 daddr = rth->rt_dst; |
rth | 1383 | net/ipv4/route.c | if (rth->rt_dev->header_cache_bind) |
rth | 1385 | net/ipv4/route.c | struct rtable * rtg = rth; |
rth | 1387 | net/ipv4/route.c | if (rth->rt_gateway != daddr) |
rth | 1390 | net/ipv4/route.c | rtg = ip_rt_route(rth->rt_gateway, 0); |
rth | 1396 | net/ipv4/route.c | if (rtg == rth) |
rth | 1402 | net/ipv4/route.c | rth->rt_hh = rtg->rt_hh; |
rth | 1412 | net/ipv4/route.c | rth->rt_next = ip_rt_hash_table[hash]; |
rth | 1414 | net/ipv4/route.c | if (rth->rt_next) |
rth | 1418 | net/ipv4/route.c | for (trth=rth->rt_next; trth; trth=trth->rt_next) |
rth | 1423 | net/ipv4/route.c | ip_rt_hash_table[hash] = rth; |
rth | 1424 | net/ipv4/route.c | rthp = &rth->rt_next; |
rth | 1432 | net/ipv4/route.c | while ((rth = *rthp) != NULL) |
rth | 1436 | net/ipv4/route.c | if ((!rth->rt_refcnt && rth->rt_lastuse + RT_CACHE_TIMEOUT < now) |
rth | 1437 | net/ipv4/route.c | || rth->rt_dst == daddr) |
rth | 1439 | net/ipv4/route.c | *rthp = rth->rt_next; |
rth | 1443 | net/ipv4/route.c | printk("rt_cache clean %02x@%08x\n", hash, rth->rt_dst); |
rth | 1445 | net/ipv4/route.c | rt_free(rth); |
rth | 1449 | net/ipv4/route.c | rthp = &rth->rt_next; |
rth | 1465 | net/ipv4/route.c | struct rtable * rth; |
rth | 1474 | net/ipv4/route.c | rth = kmalloc(sizeof(struct rtable), GFP_ATOMIC); |
rth | 1475 | net/ipv4/route.c | if (!rth) |
rth | 1498 | net/ipv4/route.c | kfree_s(rth, sizeof(struct rtable)); |
rth | 1517 | net/ipv4/route.c | kfree_s(rth, sizeof(struct rtable)); |
rth | 1521 | net/ipv4/route.c | rth->rt_dst = daddr; |
rth | 1522 | net/ipv4/route.c | rth->rt_src = saddr; |
rth | 1523 | net/ipv4/route.c | rth->rt_lastuse = jiffies; |
rth | 1524 | net/ipv4/route.c | rth->rt_refcnt = 1; |
rth | 1525 | net/ipv4/route.c | rth->rt_use = 1; |
rth | 1526 | net/ipv4/route.c | rth->rt_next = NULL; |
rth | 1527 | net/ipv4/route.c | rth->rt_hh = NULL; |
rth | 1528 | net/ipv4/route.c | rth->rt_gateway = fi->fib_gateway; |
rth | 1529 | net/ipv4/route.c | rth->rt_dev = fi->fib_dev; |
rth | 1530 | net/ipv4/route.c | rth->rt_mtu = fi->fib_mtu; |
rth | 1531 | net/ipv4/route.c | rth->rt_window = fi->fib_window; |
rth | 1532 | net/ipv4/route.c | rth->rt_irtt = fi->fib_irtt; |
rth | 1533 | net/ipv4/route.c | rth->rt_tos = f->fib_tos; |
rth | 1534 | net/ipv4/route.c | rth->rt_flags = fi->fib_flags | RTF_HOST; |
rth | 1536 | net/ipv4/route.c | rth->rt_flags |= RTF_LOCAL; |
rth | 1538 | net/ipv4/route.c | if (!(rth->rt_flags & RTF_GATEWAY)) |
rth | 1539 | net/ipv4/route.c | rth->rt_gateway = rth->rt_dst; |
rth | 1542 | net/ipv4/route.c | rt_cache_add(hash, rth); |
rth | 1545 | net/ipv4/route.c | rt_free(rth); |
rth | 1552 | net/ipv4/route.c | return rth; |
rth | 1563 | net/ipv4/route.c | struct rtable * rth; |
rth | 1567 | net/ipv4/route.c | for (rth=ip_rt_hash_table[ip_rt_hash_code(daddr)^local]; rth; rth=rth->rt_next) |
rth | 1569 | net/ipv4/route.c | if (rth->rt_dst == daddr) |
rth | 1571 | net/ipv4/route.c | rth->rt_lastuse = jiffies; |
rth | 1572 | net/ipv4/route.c | ATOMIC_INCR(&rth->rt_use); |
rth | 1573 | net/ipv4/route.c | ATOMIC_INCR(&rth->rt_refcnt); |
rth | 1575 | net/ipv4/route.c | return rth; |