[fpc-pascal] fpbind ipv6 version
Sven Barth
pascaldragon at googlemail.com
Mon Oct 28 07:40:17 CET 2019
Am 28.10.2019 um 00:24 schrieb wkitty42 at windstream.net:
> On 10/27/19 6:23 PM, Sven Barth via fpc-pascal wrote:
>> <wkitty42 at windstream.net> schrieb am So., 27. Okt. 2019, 19:32:
>>
>> On 10/27/19 11:56 AM, Alexander Grotewohl wrote:
>> > const
>> > IN6ADDR_ANY: array[0..3] of longint = (0, 0, 0, 0);
>>
>> well, that certainly can't work... the IPv6 format is max 8 four
>> character hex
>> numbers and 128 bits...
>>
>> https://en.wikipedia.org/wiki/IPv6_address#Representation
>>
>>
>> 4 * 32-bit = 128-bit?
>>
>> Also 8 four *character* hexnumbers are 4 eight character hexnumbers
>> aka four 32-bit integers.
>
>
> erk! i totally missed that was using longint... not sure if that would
> work, either, though, since longint can go negative... but i was
> mainly looking at the format and expecting to see 8 fields, not
> four... i guess i needed more c0ffee :(
For the storage itself it's completely irrelevant whether it's LongWord
or LongInt as 128-bit is 128-bit.
Regards,
Sven
More information about the fpc-pascal
mailing list