I'm working with IPv6 addresses in the form:
FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
Internally, I store them in an array:
TIp6Bytes = array [0..15] of Byte;
I need to manipulate the IPv6 addresses in a number of ways including adding, dividing, multiplying etc. Can anyone suggest a good way to do this?
I guess I should have mentioned that I'm working with Delphi 2009
Jes Klinke wrote a bignum unit for Pascal here.
Disclaimer : I have not used this library personally.
After trying many of the suggestions I could not find a library that fulfilled all my needs and were bug free. I searched a little harder and found a relatively new library by Alex Ciobanu which does BigIntegers (and Big Cardinals) seamlessly allowing you to manipulate them in much the same way as you manipulate normal Integers, Cardinals etc.
As well as BigIntegers, the library also provides a number of very useful features. From the readme:
The library is being actively developed. In fact, the author fixed a small bug I found within a day.
You can read more about the library on Alex's blog and download DeHL from Google code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With