taglinefilesource code
rth243include/net/route.hstruct rtable * rth;
rth247include/net/route.hfor (rth=ip_rt_hash_table[ip_rt_hash_code(daddr)^local]; rth; rth=rth->rt_next)
rth249include/net/route.hif (rth->rt_dst == daddr)
rth251include/net/route.hrth->rt_lastuse = jiffies;
rth252include/net/route.hATOMIC_INCR(&rth->rt_use);
rth253include/net/route.hATOMIC_INCR(&rth->rt_refcnt);
rth255include/net/route.hreturn rth;
rth157net/ipv4/route.cstatic void rt_cache_add(unsigned hash, struct rtable * rth);
rth1052net/ipv4/route.cstruct rtable *rth, **rthp;
rth1061net/ipv4/route.cwhile ((rth = *rthp) != NULL)
rth1063net/ipv4/route.cstruct rtable * rth_next = rth->rt_next;
rth1070net/ipv4/route.cif (!rth->rt_refcnt && rth->rt_lastuse + RT_CACHE_TIMEOUT < now)
rth1076net/ipv4/route.cprintk("rt_check_expire clean %02x@%08x\n", i, rth->rt_dst);
rth1078net/ipv4/route.crt_free(rth);
rth1090net/ipv4/route.cif (rth->rt_lastuse + RT_CACHE_BUBBLE_THRESHOLD < rth_next->rt_lastuse ||
rth1091net/ipv4/route.c(rth->rt_lastuse < rth_next->rt_lastuse &&
rth1092net/ipv4/route.crth->rt_use < rth_next->rt_use))
rth1095net/ipv4/route.cprintk("rt_check_expire bubbled %02x@%08x<->%08x\n", i, rth->rt_dst, rth_next->rt_dst);
rth1099net/ipv4/route.crth->rt_next = rth_next->rt_next;
rth1100net/ipv4/route.crth_next->rt_next = rth;
rth1105net/ipv4/route.crthp = &rth->rt_next;
rth1147net/ipv4/route.cstruct rtable * rth, * next;
rth1154net/ipv4/route.cif (!(rth = ip_rt_hash_table[i]))
rth1163net/ipv4/route.cfor (; rth; rth=next)
rth1165net/ipv4/route.cnext = rth->rt_next;
rth1168net/ipv4/route.crth->rt_next = NULL;
rth1169net/ipv4/route.crt_free(rth);
rth1189net/ipv4/route.cstruct rtable * rth, **rthp;
rth1198net/ipv4/route.cfor (rthp=&ip_rt_hash_table[i]; (rth=*rthp); rthp=&rth->rt_next)
rth1200net/ipv4/route.cif (rth->rt_lastuse + expire*(rth->rt_refcnt+1) > now)
rth1204net/ipv4/route.c*rthp=rth->rt_next;
rth1205net/ipv4/route.crth->rt_next = NULL;
rth1207net/ipv4/route.crt_free(rth);
rth1377net/ipv4/route.cstatic void rt_cache_add(unsigned hash, struct rtable * rth)
rth1381net/ipv4/route.c__u32    daddr = rth->rt_dst;
rth1394net/ipv4/route.cif (rth->rt_dev->header_cache_bind)
rth1396net/ipv4/route.cstruct rtable * rtg = rth;
rth1398net/ipv4/route.cif (rth->rt_gateway != daddr)
rth1401net/ipv4/route.crtg = ip_rt_route(rth->rt_gateway, 0);
rth1407net/ipv4/route.cif (rtg == rth)
rth1413net/ipv4/route.crth->rt_hh = rtg->rt_hh;
rth1423net/ipv4/route.crth->rt_next = ip_rt_hash_table[hash];
rth1425net/ipv4/route.cif (rth->rt_next)
rth1429net/ipv4/route.cfor (trth=rth->rt_next; trth; trth=trth->rt_next)
rth1434net/ipv4/route.cip_rt_hash_table[hash] = rth;
rth1435net/ipv4/route.crthp = &rth->rt_next;
rth1443net/ipv4/route.cwhile ((rth = *rthp) != NULL)
rth1447net/ipv4/route.cif ((!rth->rt_refcnt && rth->rt_lastuse + RT_CACHE_TIMEOUT < now)
rth1448net/ipv4/route.c|| rth->rt_dst == daddr)
rth1450net/ipv4/route.c*rthp = rth->rt_next;
rth1454net/ipv4/route.cprintk("rt_cache clean %02x@%08x\n", hash, rth->rt_dst);
rth1456net/ipv4/route.crt_free(rth);
rth1460net/ipv4/route.crthp = &rth->rt_next;
rth1476net/ipv4/route.cstruct rtable * rth;
rth1485net/ipv4/route.crth = kmalloc(sizeof(struct rtable), GFP_ATOMIC);
rth1486net/ipv4/route.cif (!rth)
rth1512net/ipv4/route.ckfree_s(rth, sizeof(struct rtable));
rth1538net/ipv4/route.ckfree_s(rth, sizeof(struct rtable));
rth1542net/ipv4/route.crth->rt_dst  = daddr;
rth1543net/ipv4/route.crth->rt_src  = saddr;
rth1544net/ipv4/route.crth->rt_lastuse  = jiffies;
rth1545net/ipv4/route.crth->rt_refcnt  = 1;
rth1546net/ipv4/route.crth->rt_use  = 1;
rth1547net/ipv4/route.crth->rt_next  = NULL;
rth1548net/ipv4/route.crth->rt_hh  = NULL;
rth1549net/ipv4/route.crth->rt_gateway  = fi->fib_gateway;
rth1550net/ipv4/route.crth->rt_dev  = fi->fib_dev;
rth1551net/ipv4/route.crth->rt_mtu  = fi->fib_mtu;
rth1552net/ipv4/route.crth->rt_window  = fi->fib_window;
rth1553net/ipv4/route.crth->rt_irtt  = fi->fib_irtt;
rth1554net/ipv4/route.crth->rt_tos  = f->fib_tos;
rth1555net/ipv4/route.crth->rt_flags   = fi->fib_flags | RTF_HOST;
rth1557net/ipv4/route.crth->rt_flags   |= RTF_LOCAL;
rth1559net/ipv4/route.cif (!(rth->rt_flags & RTF_GATEWAY))
rth1560net/ipv4/route.crth->rt_gateway = rth->rt_dst;
rth1565net/ipv4/route.crth->rt_gateway = rth->rt_dst;
rth1568net/ipv4/route.crt_cache_add(hash, rth);
rth1571net/ipv4/route.crt_free(rth);
rth1578net/ipv4/route.creturn rth;
rth1589net/ipv4/route.cstruct rtable * rth;
rth1593net/ipv4/route.cfor (rth=ip_rt_hash_table[ip_rt_hash_code(daddr)^local]; rth; rth=rth->rt_next)
rth1595net/ipv4/route.cif (rth->rt_dst == daddr)
rth1597net/ipv4/route.crth->rt_lastuse = jiffies;
rth1598net/ipv4/route.cATOMIC_INCR(&rth->rt_use);
rth1599net/ipv4/route.cATOMIC_INCR(&rth->rt_refcnt);
rth1601net/ipv4/route.creturn rth;