Move to uint64 for procnet, deal with MaxConn #75
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So, in order to deal with the fact that
TCP.MaxConn
can be a-1
, we originally storedProcNet
values inmap[string]int64
.However, after talking with @urso and looking it over, chances are there's some
uint64
sized values floating around in here. Looking at the kernel source, it appears thatMaxConn
is the only signed value in here, and it's stored in a unsigned long before being cast to an int in order to print.I'm not entirely happy with this, but we're in a situation where we have one oddball value that we want to handle differently. This PR just requires the user that there's a value they need to print as an
int
or hex value in order to make it usable.There's a few other solutions here:
Make a struct like this:
Or like this: