taglinefilesource code
rth191include/net/route.hstruct rtable * rth;
rth195include/net/route.hfor (rth=ip_rt_hash_table[ip_rt_hash_code(daddr)^local]; rth; rth=rth->rt_next)
rth197include/net/route.hif (rth->rt_dst == daddr)
rth199include/net/route.hrth->rt_lastuse = jiffies;
rth200include/net/route.hATOMIC_INCR(&rth->rt_use);
rth201include/net/route.hATOMIC_INCR(&rth->rt_refcnt);
rth203include/net/route.hreturn rth;
rth148net/ipv4/route.cstatic void rt_cache_add(unsigned hash, struct rtable * rth);
rth1041net/ipv4/route.cstruct rtable *rth, **rthp;
rth1050net/ipv4/route.cwhile ((rth = *rthp) != NULL)
rth1052net/ipv4/route.cstruct rtable * rth_next = rth->rt_next;
rth1059net/ipv4/route.cif (!rth->rt_refcnt && rth->rt_lastuse + RT_CACHE_TIMEOUT < now)
rth1065net/ipv4/route.cprintk("rt_check_expire clean %02x@%08x\n", i, rth->rt_dst);
rth1067net/ipv4/route.crt_free(rth);
rth1079net/ipv4/route.cif (rth->rt_lastuse + RT_CACHE_BUBBLE_THRESHOULD < rth_next->rt_lastuse ||
rth1080net/ipv4/route.c(rth->rt_lastuse < rth_next->rt_lastuse &&
rth1081net/ipv4/route.crth->rt_use < rth_next->rt_use))
rth1084net/ipv4/route.cprintk("rt_check_expire bubbled %02x@%08x<->%08x\n", i, rth->rt_dst, rth_next->rt_dst);
rth1088net/ipv4/route.crth->rt_next = rth_next->rt_next;
rth1089net/ipv4/route.crth_next->rt_next = rth;
rth1094net/ipv4/route.crthp = &rth->rt_next;
rth1136net/ipv4/route.cstruct rtable * rth, * next;
rth1143net/ipv4/route.cif (!(rth = ip_rt_hash_table[i]))
rth1152net/ipv4/route.cfor (; rth; rth=next)
rth1154net/ipv4/route.cnext = rth->rt_next;
rth1157net/ipv4/route.crth->rt_next = NULL;
rth1158net/ipv4/route.crt_free(rth);
rth1178net/ipv4/route.cstruct rtable * rth, **rthp;
rth1187net/ipv4/route.cfor (rthp=&ip_rt_hash_table[i]; (rth=*rthp); rthp=&rth->rt_next)
rth1189net/ipv4/route.cif (rth->rt_lastuse + expire*(rth->rt_refcnt+1) > now)
rth1193net/ipv4/route.c*rthp=rth->rt_next;
rth1194net/ipv4/route.crth->rt_next = NULL;
rth1196net/ipv4/route.crt_free(rth);
rth1366net/ipv4/route.cstatic void rt_cache_add(unsigned hash, struct rtable * rth)
rth1370net/ipv4/route.c__u32    daddr = rth->rt_dst;
rth1383net/ipv4/route.cif (rth->rt_dev->header_cache_bind)
rth1385net/ipv4/route.cstruct rtable * rtg = rth;
rth1387net/ipv4/route.cif (rth->rt_gateway != daddr)
rth1390net/ipv4/route.crtg = ip_rt_route(rth->rt_gateway, 0);
rth1396net/ipv4/route.cif (rtg == rth)
rth1402net/ipv4/route.crth->rt_hh = rtg->rt_hh;
rth1412net/ipv4/route.crth->rt_next = ip_rt_hash_table[hash];
rth1414net/ipv4/route.cif (rth->rt_next)
rth1418net/ipv4/route.cfor (trth=rth->rt_next; trth; trth=trth->rt_next)
rth1423net/ipv4/route.cip_rt_hash_table[hash] = rth;
rth1424net/ipv4/route.crthp = &rth->rt_next;
rth1432net/ipv4/route.cwhile ((rth = *rthp) != NULL)
rth1436net/ipv4/route.cif ((!rth->rt_refcnt && rth->rt_lastuse + RT_CACHE_TIMEOUT < now)
rth1437net/ipv4/route.c|| rth->rt_dst == daddr)
rth1439net/ipv4/route.c*rthp = rth->rt_next;
rth1443net/ipv4/route.cprintk("rt_cache clean %02x@%08x\n", hash, rth->rt_dst);
rth1445net/ipv4/route.crt_free(rth);
rth1449net/ipv4/route.crthp = &rth->rt_next;
rth1465net/ipv4/route.cstruct rtable * rth;
rth1474net/ipv4/route.crth = kmalloc(sizeof(struct rtable), GFP_ATOMIC);
rth1475net/ipv4/route.cif (!rth)
rth1498net/ipv4/route.ckfree_s(rth, sizeof(struct rtable));
rth1517net/ipv4/route.ckfree_s(rth, sizeof(struct rtable));
rth1521net/ipv4/route.crth->rt_dst  = daddr;
rth1522net/ipv4/route.crth->rt_src  = saddr;
rth1523net/ipv4/route.crth->rt_lastuse  = jiffies;
rth1524net/ipv4/route.crth->rt_refcnt  = 1;
rth1525net/ipv4/route.crth->rt_use  = 1;
rth1526net/ipv4/route.crth->rt_next  = NULL;
rth1527net/ipv4/route.crth->rt_hh  = NULL;
rth1528net/ipv4/route.crth->rt_gateway  = fi->fib_gateway;
rth1529net/ipv4/route.crth->rt_dev  = fi->fib_dev;
rth1530net/ipv4/route.crth->rt_mtu  = fi->fib_mtu;
rth1531net/ipv4/route.crth->rt_window  = fi->fib_window;
rth1532net/ipv4/route.crth->rt_irtt  = fi->fib_irtt;
rth1533net/ipv4/route.crth->rt_tos  = f->fib_tos;
rth1534net/ipv4/route.crth->rt_flags   = fi->fib_flags | RTF_HOST;
rth1536net/ipv4/route.crth->rt_flags   |= RTF_LOCAL;
rth1538net/ipv4/route.cif (!(rth->rt_flags & RTF_GATEWAY))
rth1539net/ipv4/route.crth->rt_gateway = rth->rt_dst;
rth1542net/ipv4/route.crt_cache_add(hash, rth);
rth1545net/ipv4/route.crt_free(rth);
rth1552net/ipv4/route.creturn rth;
rth1563net/ipv4/route.cstruct rtable * rth;
rth1567net/ipv4/route.cfor (rth=ip_rt_hash_table[ip_rt_hash_code(daddr)^local]; rth; rth=rth->rt_next)
rth1569net/ipv4/route.cif (rth->rt_dst == daddr)
rth1571net/ipv4/route.crth->rt_lastuse = jiffies;
rth1572net/ipv4/route.cATOMIC_INCR(&rth->rt_use);
rth1573net/ipv4/route.cATOMIC_INCR(&rth->rt_refcnt);
rth1575net/ipv4/route.creturn rth;