On 2011-11-23 04:24, Arvind wrote:
[...] I want to convert an IP address of the form A.B.C.D into a
number that will serve as an index of the array. I want to do it in a
way that there is very low probability of the number created from
A.B.C.D being the same as that created from E.F.G.H.
Try
On 11-11-27 04:46 AM, Dr.Ruud wrote:
On 2011-11-23 04:24, Arvind wrote:
[...] I want to convert an IP address of the form A.B.C.D into a
number that will serve as an index of the array. I want to do it in a
way that there is very low probability of the number created from
A.B.C.D being the
I have to write a perl script that keeps track of tcp connections. I
plan to keep track of this in an array of the form
tcp_connection[source address][dest address]
To do this I want to convert an IP address of the form A.B.C.D into a
number that will serve as an index of the array. I want to
On Nov 23, 2011, at 4:24 AM, Arvind wrote:
To do this I want to convert an IP address of the form A.B.C.D into a
number that will serve as an index of the array.
Well, IP4 addresses can simply be represented as a decimal.
So, 127.0.0.1 is 2130706433.
Example on how to calculate it:
On 11/22/2011 10:24 PM, Arvind wrote:
I have to write a perl script that keeps track of tcp connections. I
plan to keep track of this in an array of the form
tcp_connection[source address][dest address]
To do this I want to convert an IP address of the form A.B.C.D into a
number that will
Petite Abeille wrote:
On Nov 23, 2011, at 4:24 AM, Arvind wrote:
To do this I want to convert an IP address of the form A.B.C.D into a
number that will serve as an index of the array.
Well, IP4 addresses can simply be represented as a decimal.
So, 127.0.0.1 is 2130706433.
Or as a four
On Nov 23, 2011 4:50 AM, Arvind arvind@gmail.com wrote:
I have to write a perl script that keeps track of tcp connections. I
plan to keep track of this in an array of the form
tcp_connection[source address][dest address]
I would just use a db for this if not only for the audit trail. I