* Dennis Cote:

> This last function can be implemented using bit manipulation operators 
> in SQL or in a custom function in C.
>
>     containedIn(ip_addr, network_addr, network_size)
>
> can be replaced by
>
>     nework_addr == (ip_addr & (-1 << network_size))
>
> which will be true if the IP address is in the network.

Is this Java or C?  For C, this breaks if network_size == 32.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to