Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add handling of large unsigned Integers for ETSILI #9

Open
li-guy opened this issue Jun 26, 2019 · 1 comment
Open

Add handling of large unsigned Integers for ETSILI #9

li-guy opened this issue Jun 26, 2019 · 1 comment

Comments

@li-guy
Copy link
Contributor

li-guy commented Jun 26, 2019

Two special cases in 102 232-3 and 102 232-4 which call for large unsigned Integers

octetsReceived [13] INTEGER (0..18446744073709551615) OPTIONAL,
-- The number of octets the target received
octetsTransmitted [14] INTEGER (0..18446744073709551615) OPTIONAL,
-- The number of octets the target transmitted

@salcock
Copy link
Contributor

salcock commented Aug 16, 2019

Those upper limits are dumb.

A signed 64 bit integer would get you 9223372036854775807 as a max value, which is 9 exabytes and should be more than enough for any one target's LI session. This is also a lot easier to encode and decode, because you have to interpret an INTEGER as though it is a signed value -- this means you need a 72 bit (or larger) integer type to be able to work with the largest supported values nicely if 2^64 -1 is the max value.

If the spec designers had instead picked 2^63 - 1 as the maximum, this problem would go away and be a lot easier to deal with.

</rant>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants