Skip to content

Add GetTcpStatistics and GetUdpStatistics#1178

Merged
matthiasblaesing merged 2 commits intojava-native-access:masterfrom
dbwiddis:tcpudp
Apr 20, 2020
Merged

Add GetTcpStatistics and GetUdpStatistics#1178
matthiasblaesing merged 2 commits intojava-native-access:masterfrom
dbwiddis:tcpudp

Conversation

@dbwiddis
Copy link
Copy Markdown
Contributor

No description provided.

@dbwiddis
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

Good to go.

@matthiasblaesing
Copy link
Copy Markdown
Member

Looks good to me. Thank you.

@matthiasblaesing matthiasblaesing merged commit fa9dfdb into java-native-access:master Apr 20, 2020
@matthiasblaesing
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

2 participants