> Would it be better to do it as a kernel option?
> options IP_RANDOM_IP_ID for instance? I guess the question is, does the
> kernel have to do a comparison to the sysctl variable each time?
No. *IF* (big if!) something gets notified when a sysctl variable
gets changed (and I don't know of this is true) then if can test
the variable once and set a *function* variable to one of two
functions: one simple and fast, the other complicated and slow.
No test needed for every packet. Of course, the overhead of a
procedure call might (in the fast case) be more than the overhead
of an inline test. So perhaps write it as:
if (function variable) {
function_varuable(parameter)
} else {
/* inline code */
}
But there a *lots* of other tests per packet - is one more *that* bad?
--
David Pick
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message