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 GetTcpStatistics and GetUdpStatistics #1178

Merged
merged 2 commits into from Apr 20, 2020

Conversation

dbwiddis
Copy link
Contributor

No description provided.

@dbwiddis
Copy link
Contributor Author

(Hold off on merging this. I realized I need to also map the -Ex version to get v4 and v6 stats separately.)

@dbwiddis
Copy link
Contributor Author

Good to go.

@matthiasblaesing
Copy link
Member

Looks good to me. Thank you.

@matthiasblaesing matthiasblaesing merged commit fa9dfdb into java-native-access:master Apr 20, 2020
@matthiasblaesing
Copy link
Member

@dbwiddis could you please revisit the new unittests? They fail on appveyor. Here is a trace with added verbose info:

https://ci.appveyor.com/project/matthiasblaesing/jna/builds/32772146#L1580

My gut feeling: It is EstabResets, but _Curr_Estab. I.e. the former deals with a summed total, while the latter deals with the current (at this time) number. If that is so, the assert would indeed be invalid.

@dbwiddis
Copy link
Contributor Author

@matthiasblaesing Yes, you are correct. I did the Windows implementation first and made that assumption based on reading the docs -- and it didn't fail on my AppVeyor tests. Later on when implementing cross-platform code using similar fields on different OS's (sysctl on mac, netstat command on *nix) I removed that test.

I remember thinking, "I guess Windows interprets it differently." I suppose I was wrong and just got lucky with Appveyor. Do you want me to submit the fix?

@dbwiddis dbwiddis deleted the tcpudp branch May 10, 2020 17:06
@matthiasblaesing
Copy link
Member

@dbwiddis a fix would be great - the appveyor unittest runs are not perfect, but should be kept runnable none the less.

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

Successfully merging this pull request may close these issues.

None yet

2 participants