Re: Problem with Vendor ID greater then 32767
----- "Alan DeKok" <aland@deployingradius.com> wrote: | Arran Cudbard-Bell wrote: | > Did you not think they'd get past 32K? Int is dead, long live long :) | | I thought it would take longer than that... | | But the limitation in FreeRADIUS has been there for about 10 years... | I guess it's OK for IANA to take 10 years to allocate 32K vendor ID's. | Anyway, why would you guys use long if int in 32bit arch can go from −2,147,483,648 to 2,147,483,647 ? Rafael Ugolini
On 8/12/09 15:15 , Rafael Ugolini wrote:
----- "Alan DeKok" <aland@deployingradius.com> wrote: | Arran Cudbard-Bell wrote: | > Did you not think they'd get past 32K? Int is dead, long live long :) | | I thought it would take longer than that... | | But the limitation in FreeRADIUS has been there for about 10 years... | I guess it's OK for IANA to take 10 years to allocate 32K vendor ID's. |
Anyway, why would you guys use long if int in 32bit arch can go from −2,147,483,648 to 2,147,483,647 ?
Perhaps the field in a radius attribute is limited to 16 bits? Wichert.
On 12/08/2009 14:15, Rafael Ugolini wrote:
----- "Alan DeKok" <aland@deployingradius.com> wrote: | Arran Cudbard-Bell wrote: | > Did you not think they'd get past 32K? Int is dead, long live long :) | | I thought it would take longer than that... | | But the limitation in FreeRADIUS has been there for about 10 years... | I guess it's OK for IANA to take 10 years to allocate 32K vendor ID's. |
Anyway, why would you guys use long if int in 32bit arch can go from −2,147,483,648 to 2,147,483,647 ?
Because int is ambiguous, it's not standardised across all compilers, and is only required to have a minimum signed value of -32767 and a maximum of 32767. It's safer to use long, as it should always be at least 32bits. Arran -- Arran Cudbard-Bell <A.Cudbard-Bell@sussex.ac.uk>, Systems Administrator (AAA), Infrastructure Services (IT Services), E1-1-08, Engineering 1, University Of Sussex, Brighton, BN1 9QT DDI+FAX: +44 1273 873900 | INT: 3900 GPG: 86FF A285 1AA1 EE40 D228 7C2E 71A9 25BB 1E68 54A2
participants (4)
-
Alan DeKok -
Arran Cudbard-Bell -
Rafael Ugolini -
Wichert Akkerman