Nmap Development mailing list archives

Re: Proposal for a small change in the packet.Packet:raw() function


From: Patrick Donnelly <batrick () batbytes com>
Date: Tue, 12 Jul 2011 17:12:09 -0400

On Tue, Jul 12, 2011 at 11:59 AM, Gorjan Petrovski <mogi57 () gmail com> wrote:
Hi,

At a first glance of the packet library, it seems that Packet:raw() is
the main function for getting the contents of the Packet object. And
since not all users look at the code they wouldn't know to look for
Packet.buf to get the entire length of the packet. This is why I
propose that we make the index and length arguments optional. If a
user does not specify the index argument, it is supposed that index =
0. If the user doesn't supply the length argument, the default would
be the entire length of the packet.

Do I have permission to make these changes? Diff file included.

Does the packet library used 0-based indexing throughout? If so, then
please commit. Otherwise, I'd like this to be 1-based indexing as it
is in 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: