Hash functions working

rahul8143_at_gmail.com
Date: 04/17/05


Date: 17 Apr 2005 07:02:06 -0700


hello,
 I am studying hash functions in route.c kernel file
rt_hash_rnd = (int) ((num_physpages ^ (num_physpages>>8)) ^ (jiffies ^
(jiffies >> 7)));
 where rt_hash_rnd is unsigned long

rt_hash_rnd is used in
static unsigned int rt_hash_code(u32 daddr, u32 saddr, u8 tos)
{
        return (jhash_3words(daddr, saddr, (u32) tos, rt_hash_rnd)
                & rt_hash_mask);
}

 And what get_random_bytes does in route.c file?
get_random_bytes(&rt_hash_rnd, 4);
then how can
        I am newbie in kernel analysis please help to know uses of hash
functions in kernel.
regards,
rahul.