tag | line | file | source code |
rth | 242 | include/net/route.h | struct rtable * rth; |
rth | 246 | include/net/route.h | for (rth=ip_rt_hash_table[ip_rt_hash_code(daddr)^local]; rth; rth=rth->rt_next) |
rth | 248 | include/net/route.h | if (rth->rt_dst == daddr) |
rth | 250 | include/net/route.h | rth->rt_lastuse = jiffies; |
rth | 251 | include/net/route.h | ATOMIC_INCR(&rth->rt_use); |
rth | 252 | include/net/route.h | ATOMIC_INCR(&rth->rt_refcnt); |
rth | 254 | include/net/route.h | return rth; |
rth | 155 | net/ipv4/route.c | static void rt_cache_add(unsigned hash, struct rtable * rth); |
rth | 1050 | net/ipv4/route.c | struct rtable *rth, **rthp; |
rth | 1059 | net/ipv4/route.c | while ((rth = *rthp) != NULL) |
rth | 1061 | net/ipv4/route.c | struct rtable * rth_next = rth->rt_next; |
rth | 1068 | net/ipv4/route.c | if (!rth->rt_refcnt && rth->rt_lastuse + RT_CACHE_TIMEOUT < now) |
rth | 1074 | net/ipv4/route.c | printk("rt_check_expire clean %02x@%08x\n", i, rth->rt_dst); |
rth | 1076 | net/ipv4/route.c | rt_free(rth); |
rth | 1088 | net/ipv4/route.c | if (rth->rt_lastuse + RT_CACHE_BUBBLE_THRESHOULD < rth_next->rt_lastuse || |
rth | 1089 | net/ipv4/route.c | (rth->rt_lastuse < rth_next->rt_lastuse && |
rth | 1090 | net/ipv4/route.c | rth->rt_use < rth_next->rt_use)) |
rth | 1093 | net/ipv4/route.c | printk("rt_check_expire bubbled %02x@%08x<->%08x\n", i, rth->rt_dst, rth_next->rt_dst); |
rth | 1097 | net/ipv4/route.c | rth->rt_next = rth_next->rt_next; |
rth | 1098 | net/ipv4/route.c | rth_next->rt_next = rth; |
rth | 1103 | net/ipv4/route.c | rthp = &rth->rt_next; |
rth | 1145 | net/ipv4/route.c | struct rtable * rth, * next; |
rth | 1152 | net/ipv4/route.c | if (!(rth = ip_rt_hash_table[i])) |
rth | 1161 | net/ipv4/route.c | for (; rth; rth=next) |
rth | 1163 | net/ipv4/route.c | next = rth->rt_next; |
rth | 1166 | net/ipv4/route.c | rth->rt_next = NULL; |
rth | 1167 | net/ipv4/route.c | rt_free(rth); |
rth | 1187 | net/ipv4/route.c | struct rtable * rth, **rthp; |
rth | 1196 | net/ipv4/route.c | for (rthp=&ip_rt_hash_table[i]; (rth=*rthp); rthp=&rth->rt_next) |
rth | 1198 | net/ipv4/route.c | if (rth->rt_lastuse + expire*(rth->rt_refcnt+1) > now) |
rth | 1202 | net/ipv4/route.c | *rthp=rth->rt_next; |
rth | 1203 | net/ipv4/route.c | rth->rt_next = NULL; |
rth | 1205 | net/ipv4/route.c | rt_free(rth); |
rth | 1375 | net/ipv4/route.c | static void rt_cache_add(unsigned hash, struct rtable * rth) |
rth | 1379 | net/ipv4/route.c | __u32 daddr = rth->rt_dst; |
rth | 1392 | net/ipv4/route.c | if (rth->rt_dev->header_cache_bind) |
rth | 1394 | net/ipv4/route.c | struct rtable * rtg = rth; |
rth | 1396 | net/ipv4/route.c | if (rth->rt_gateway != daddr) |
rth | 1399 | net/ipv4/route.c | rtg = ip_rt_route(rth->rt_gateway, 0); |
rth | 1405 | net/ipv4/route.c | if (rtg == rth) |
rth | 1411 | net/ipv4/route.c | rth->rt_hh = rtg->rt_hh; |
rth | 1421 | net/ipv4/route.c | rth->rt_next = ip_rt_hash_table[hash]; |
rth | 1423 | net/ipv4/route.c | if (rth->rt_next) |
rth | 1427 | net/ipv4/route.c | for (trth=rth->rt_next; trth; trth=trth->rt_next) |
rth | 1432 | net/ipv4/route.c | ip_rt_hash_table[hash] = rth; |
rth | 1433 | net/ipv4/route.c | rthp = &rth->rt_next; |
rth | 1441 | net/ipv4/route.c | while ((rth = *rthp) != NULL) |
rth | 1445 | net/ipv4/route.c | if ((!rth->rt_refcnt && rth->rt_lastuse + RT_CACHE_TIMEOUT < now) |
rth | 1446 | net/ipv4/route.c | || rth->rt_dst == daddr) |
rth | 1448 | net/ipv4/route.c | *rthp = rth->rt_next; |
rth | 1452 | net/ipv4/route.c | printk("rt_cache clean %02x@%08x\n", hash, rth->rt_dst); |
rth | 1454 | net/ipv4/route.c | rt_free(rth); |
rth | 1458 | net/ipv4/route.c | rthp = &rth->rt_next; |
rth | 1474 | net/ipv4/route.c | struct rtable * rth; |
rth | 1483 | net/ipv4/route.c | rth = kmalloc(sizeof(struct rtable), GFP_ATOMIC); |
rth | 1484 | net/ipv4/route.c | if (!rth) |
rth | 1510 | net/ipv4/route.c | kfree_s(rth, sizeof(struct rtable)); |
rth | 1536 | net/ipv4/route.c | kfree_s(rth, sizeof(struct rtable)); |
rth | 1540 | net/ipv4/route.c | rth->rt_dst = daddr; |
rth | 1541 | net/ipv4/route.c | rth->rt_src = saddr; |
rth | 1542 | net/ipv4/route.c | rth->rt_lastuse = jiffies; |
rth | 1543 | net/ipv4/route.c | rth->rt_refcnt = 1; |
rth | 1544 | net/ipv4/route.c | rth->rt_use = 1; |
rth | 1545 | net/ipv4/route.c | rth->rt_next = NULL; |
rth | 1546 | net/ipv4/route.c | rth->rt_hh = NULL; |
rth | 1547 | net/ipv4/route.c | rth->rt_gateway = fi->fib_gateway; |
rth | 1548 | net/ipv4/route.c | rth->rt_dev = fi->fib_dev; |
rth | 1549 | net/ipv4/route.c | rth->rt_mtu = fi->fib_mtu; |
rth | 1550 | net/ipv4/route.c | rth->rt_window = fi->fib_window; |
rth | 1551 | net/ipv4/route.c | rth->rt_irtt = fi->fib_irtt; |
rth | 1552 | net/ipv4/route.c | rth->rt_tos = f->fib_tos; |
rth | 1553 | net/ipv4/route.c | rth->rt_flags = fi->fib_flags | RTF_HOST; |
rth | 1555 | net/ipv4/route.c | rth->rt_flags |= RTF_LOCAL; |
rth | 1557 | net/ipv4/route.c | if (!(rth->rt_flags & RTF_GATEWAY)) |
rth | 1558 | net/ipv4/route.c | rth->rt_gateway = rth->rt_dst; |
rth | 1561 | net/ipv4/route.c | rt_cache_add(hash, rth); |
rth | 1564 | net/ipv4/route.c | rt_free(rth); |
rth | 1571 | net/ipv4/route.c | return rth; |
rth | 1582 | net/ipv4/route.c | struct rtable * rth; |
rth | 1586 | net/ipv4/route.c | for (rth=ip_rt_hash_table[ip_rt_hash_code(daddr)^local]; rth; rth=rth->rt_next) |
rth | 1588 | net/ipv4/route.c | if (rth->rt_dst == daddr) |
rth | 1590 | net/ipv4/route.c | rth->rt_lastuse = jiffies; |
rth | 1591 | net/ipv4/route.c | ATOMIC_INCR(&rth->rt_use); |
rth | 1592 | net/ipv4/route.c | ATOMIC_INCR(&rth->rt_refcnt); |
rth | 1594 | net/ipv4/route.c | return rth; |