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

Consistency with integer/value ... #173

Closed
fxlb opened this issue Jan 6, 2025 · 8 comments
Closed

Consistency with integer/value ... #173

fxlb opened this issue Jan 6, 2025 · 8 comments

Comments

@fxlb
Copy link
Contributor

fxlb commented Jan 6, 2025

We should do some changes for consistency:

git grep 'integer value' *.md | wc -l
6
git grep 'unsigned value' *.md | wc -l
30
git grep 'unsigned integer' *.md | wc -l
16
git grep 'unsigned integer value' *.md | wc -l
2
git grep '\<signed value' *.md | wc -l
1
git grep '\<signed integer' *.md | wc -l
1
git grep '\<signed integer value' *.md | wc -l
1
@fxlb
Copy link
Contributor Author

fxlb commented Jan 11, 2025

Proposal:

s/unsigned value/unsigned integer/g
s/signed value/signed integer/g
s/unsigned integer value/unsigned integer/g
s/signed integer value/signed integer/g

@guyharris
Copy link
Collaborator

+1

and, as per #174, s/value/{appropriate signedness qualifier} integer/.

@fxlb
Copy link
Contributor Author

fxlb commented Jan 11, 2025

+1

Is #175.

and, as per #174, s/value/{appropriate signedness qualifier} integer/.

Will be another PR.

@fxlb
Copy link
Contributor Author

fxlb commented Jan 11, 2025

And also:

git grep 'integer value' '*.md'
draft-ietf-opsawg-pcaplinktype.md:518:* LINKTYPE Value: Indicates the integer value assigned for this LinkType.
draft-ietf-opsawg-pcapng.md:1233:* it stores the Interface Identifier as a 32-bit integer value.
draft-ietf-opsawg-pcapng.md:2465:Every Block is uniquely identified by a 32-bit integer value, stored

@fxlb
Copy link
Contributor Author

fxlb commented Jan 11, 2025

draft-ietf-opsawg-pcapng.md:1233 * it stores the Interface Identifier as a 32-bit integer value.
Unsigned?
Yes (line 1282: * Interface ID (32 bits): an unsigned integer)

draft-ietf-opsawg-pcapng.md:2465 Every Block is uniquely identified by a 32-bit integer value, stored
Unsigned?

@guyharris
Copy link
Collaborator

draft-ietf-opsawg-pcapng.md:2465 Every Block is uniquely identified by a 32-bit integer value, stored Unsigned?

They're really enum values, just as link-layer types are, so in a sense it's irrelevant, and, unlike link-layer types, where the value is given in decimal, and anything 16-bit that goes beyond 32767 is clearly unsigned, the block type values are given in hex, and those are less often given as signed (-0x7fffffff), so that's less of a clear case.

But, by analogy to link-layer types, and to avoid people inadvertently sign-extending and causing problems, I'd vote for unsigned.

@fxlb
Copy link
Contributor Author

fxlb commented Jan 12, 2025

Ok, this (and some others) are updated in PR #178.

@fxlb
Copy link
Contributor Author

fxlb commented Jan 13, 2025

Done.

@fxlb fxlb closed this as completed Jan 13, 2025
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