You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# gradually set all bits right of MSB# this technique is called 'bit smearing'# if ipv6, max bit index we want to smear is 2^7=64, # otherwise it's 2^4=16max_power_of_2=7ifv6else5n=val|val>>1foriinrange(1, max_power_of_2+1):
n |= n>>2**i
The comment says the max index to smear is 2^4 for IPv4, but the next line says it's 2^5.
I don't know which is correct, though I'd guess it's the code.
The text was updated successfully, but these errors were encountered:
In the definition of
fls
:The comment says the max index to smear is 2^4 for IPv4, but the next line says it's 2^5.
I don't know which is correct, though I'd guess it's the code.
The text was updated successfully, but these errors were encountered: