tag | line | file | source code |
rth | 194 | include/net/route.h | struct rtable * rth; |
rth | 198 | include/net/route.h | for (rth=ip_rt_hash_table[ip_rt_hash_code(daddr)^local]; rth; rth=rth->rt_next) |
rth | 200 | include/net/route.h | if (rth->rt_dst == daddr) |
rth | 202 | include/net/route.h | rth->rt_lastuse = jiffies; |
rth | 203 | include/net/route.h | ATOMIC_INCR(&rth->rt_use); |
rth | 204 | include/net/route.h | ATOMIC_INCR(&rth->rt_refcnt); |
rth | 206 | include/net/route.h | return rth; |
rth | 154 | net/ipv4/route.c | static void rt_cache_add(unsigned hash, struct rtable * rth); |
rth | 1048 | net/ipv4/route.c | struct rtable *rth, **rthp; |
rth | 1057 | net/ipv4/route.c | while ((rth = *rthp) != NULL) |
rth | 1059 | net/ipv4/route.c | struct rtable * rth_next = rth->rt_next; |
rth | 1066 | net/ipv4/route.c | if (!rth->rt_refcnt && rth->rt_lastuse + RT_CACHE_TIMEOUT < now) |
rth | 1072 | net/ipv4/route.c | printk("rt_check_expire clean %02x@%08x\n", i, rth->rt_dst); |
rth | 1074 | net/ipv4/route.c | rt_free(rth); |
rth | 1086 | net/ipv4/route.c | if (rth->rt_lastuse + RT_CACHE_BUBBLE_THRESHOULD < rth_next->rt_lastuse || |
rth | 1087 | net/ipv4/route.c | (rth->rt_lastuse < rth_next->rt_lastuse && |
rth | 1088 | net/ipv4/route.c | rth->rt_use < rth_next->rt_use)) |
rth | 1091 | net/ipv4/route.c | printk("rt_check_expire bubbled %02x@%08x<->%08x\n", i, rth->rt_dst, rth_next->rt_dst); |
rth | 1095 | net/ipv4/route.c | rth->rt_next = rth_next->rt_next; |
rth | 1096 | net/ipv4/route.c | rth_next->rt_next = rth; |
rth | 1101 | net/ipv4/route.c | rthp = &rth->rt_next; |
rth | 1143 | net/ipv4/route.c | struct rtable * rth, * next; |
rth | 1150 | net/ipv4/route.c | if (!(rth = ip_rt_hash_table[i])) |
rth | 1159 | net/ipv4/route.c | for (; rth; rth=next) |
rth | 1161 | net/ipv4/route.c | next = rth->rt_next; |
rth | 1164 | net/ipv4/route.c | rth->rt_next = NULL; |
rth | 1165 | net/ipv4/route.c | rt_free(rth); |
rth | 1185 | net/ipv4/route.c | struct rtable * rth, **rthp; |
rth | 1194 | net/ipv4/route.c | for (rthp=&ip_rt_hash_table[i]; (rth=*rthp); rthp=&rth->rt_next) |
rth | 1196 | net/ipv4/route.c | if (rth->rt_lastuse + expire*(rth->rt_refcnt+1) > now) |
rth | 1200 | net/ipv4/route.c | *rthp=rth->rt_next; |
rth | 1201 | net/ipv4/route.c | rth->rt_next = NULL; |
rth | 1203 | net/ipv4/route.c | rt_free(rth); |
rth | 1373 | net/ipv4/route.c | static void rt_cache_add(unsigned hash, struct rtable * rth) |
rth | 1377 | net/ipv4/route.c | __u32 daddr = rth->rt_dst; |
rth | 1390 | net/ipv4/route.c | if (rth->rt_dev->header_cache_bind) |
rth | 1392 | net/ipv4/route.c | struct rtable * rtg = rth; |
rth | 1394 | net/ipv4/route.c | if (rth->rt_gateway != daddr) |
rth | 1397 | net/ipv4/route.c | rtg = ip_rt_route(rth->rt_gateway, 0); |
rth | 1403 | net/ipv4/route.c | if (rtg == rth) |
rth | 1409 | net/ipv4/route.c | rth->rt_hh = rtg->rt_hh; |
rth | 1419 | net/ipv4/route.c | rth->rt_next = ip_rt_hash_table[hash]; |
rth | 1421 | net/ipv4/route.c | if (rth->rt_next) |
rth | 1425 | net/ipv4/route.c | for (trth=rth->rt_next; trth; trth=trth->rt_next) |
rth | 1430 | net/ipv4/route.c | ip_rt_hash_table[hash] = rth; |
rth | 1431 | net/ipv4/route.c | rthp = &rth->rt_next; |
rth | 1439 | net/ipv4/route.c | while ((rth = *rthp) != NULL) |
rth | 1443 | net/ipv4/route.c | if ((!rth->rt_refcnt && rth->rt_lastuse + RT_CACHE_TIMEOUT < now) |
rth | 1444 | net/ipv4/route.c | || rth->rt_dst == daddr) |
rth | 1446 | net/ipv4/route.c | *rthp = rth->rt_next; |
rth | 1450 | net/ipv4/route.c | printk("rt_cache clean %02x@%08x\n", hash, rth->rt_dst); |
rth | 1452 | net/ipv4/route.c | rt_free(rth); |
rth | 1456 | net/ipv4/route.c | rthp = &rth->rt_next; |
rth | 1472 | net/ipv4/route.c | struct rtable * rth; |
rth | 1481 | net/ipv4/route.c | rth = kmalloc(sizeof(struct rtable), GFP_ATOMIC); |
rth | 1482 | net/ipv4/route.c | if (!rth) |
rth | 1505 | net/ipv4/route.c | kfree_s(rth, sizeof(struct rtable)); |
rth | 1524 | net/ipv4/route.c | kfree_s(rth, sizeof(struct rtable)); |
rth | 1528 | net/ipv4/route.c | rth->rt_dst = daddr; |
rth | 1529 | net/ipv4/route.c | rth->rt_src = saddr; |
rth | 1530 | net/ipv4/route.c | rth->rt_lastuse = jiffies; |
rth | 1531 | net/ipv4/route.c | rth->rt_refcnt = 1; |
rth | 1532 | net/ipv4/route.c | rth->rt_use = 1; |
rth | 1533 | net/ipv4/route.c | rth->rt_next = NULL; |
rth | 1534 | net/ipv4/route.c | rth->rt_hh = NULL; |
rth | 1535 | net/ipv4/route.c | rth->rt_gateway = fi->fib_gateway; |
rth | 1536 | net/ipv4/route.c | rth->rt_dev = fi->fib_dev; |
rth | 1537 | net/ipv4/route.c | rth->rt_mtu = fi->fib_mtu; |
rth | 1538 | net/ipv4/route.c | rth->rt_window = fi->fib_window; |
rth | 1539 | net/ipv4/route.c | rth->rt_irtt = fi->fib_irtt; |
rth | 1540 | net/ipv4/route.c | rth->rt_tos = f->fib_tos; |
rth | 1541 | net/ipv4/route.c | rth->rt_flags = fi->fib_flags | RTF_HOST; |
rth | 1543 | net/ipv4/route.c | rth->rt_flags |= RTF_LOCAL; |
rth | 1545 | net/ipv4/route.c | if (!(rth->rt_flags & RTF_GATEWAY)) |
rth | 1546 | net/ipv4/route.c | rth->rt_gateway = rth->rt_dst; |
rth | 1549 | net/ipv4/route.c | rt_cache_add(hash, rth); |
rth | 1552 | net/ipv4/route.c | rt_free(rth); |
rth | 1559 | net/ipv4/route.c | return rth; |
rth | 1575 | net/ipv4/route.c | struct rtable * rth; |
rth | 1579 | net/ipv4/route.c | for (rth=ip_rt_hash_table[ip_rt_hash_code(daddr)^local]; rth; rth=rth->rt_next) |
rth | 1581 | net/ipv4/route.c | if (rth->rt_dst == daddr) |
rth | 1583 | net/ipv4/route.c | rth->rt_lastuse = jiffies; |
rth | 1584 | net/ipv4/route.c | ATOMIC_INCR(&rth->rt_use); |
rth | 1585 | net/ipv4/route.c | ATOMIC_INCR(&rth->rt_refcnt); |
rth | 1587 | net/ipv4/route.c | return rth; |