Nmap Development mailing list archives

Re: Request for updated bit manipulation library


From: Patrick Donnelly <batrick () batbytes com>
Date: Tue, 14 Dec 2010 14:20:17 -0500

Hi Mak,

On Tue, Dec 14, 2010 at 1:43 PM, Mak Kolybabi <mak () kolybabi com> wrote:
I have a need for the ability to perform bitwise operations on 64-bit integers.

You can't do 64-bit integer bitwise manipulations in Lua using its
regular number type (double precision floating point). You can at best
do 52 bits.

I have been struggling with strange behaviour with the current bit library when
the numbers get too large. The website Nmap's bit library originally came from
has a new version, and its changes mention that there were issues with shifting
previously. Any chance someone would be kind enough to integrate the newer
version of the library into Nmap?

I've recently thought about upgrading Nmap's bit library to Mike
Pall's BitOp library [1] that is generally considered the successor to
Reuben Thomas's bitlib (even the author recommends BitOp). Problem is,
Lua 5.2 (probably released in a couple weeks) will be adding a bit
library and I'm not sure if we want to bother upgrading to BitOp when
we'll probably end up switching to the one that comes with Lua.

-- 
- Patrick Donnelly
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: