Click programming Q's
Eddie Kohler
kohler at aciri.org
Mon Sep 24 21:39:40 EDT 2001
> I just wanted to know what are "jiffies" and why are they used for mapping
> timeouts.
A 'jiffy' is, in a Linux kernel, the most efficient way of measuring how
much time has passed. The kernel's 'jiffies' counter increments once every
clock interrupt -- CLICK_HZ times per second. This is not precise, or
fine-grained, but it is often good enough for timeout values. The
'click_jiffies()' function or macro returns either this counter, or (at
userlevel) a calculated equivalent.
> Secondly, what are the "delta checksums" used for?
IPRewriter changes a packet's IP header fields, which changes the IP and
TCP/UDP checksum values. If we didn't change the checksum fields to match
the new values, the endpoints would mistakenly throw out the packets. Each
'delta checksum' incrementally updates a checksum field so it will match
the real checksum of the modified packet.
Hope this helps!
Eddie
More information about the click
mailing list