-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
System.Net.NetworkInformation needs Android PAL #51303
Comments
Tagging subscribers to this area: @dotnet/ncl Issue DetailsCurrently, System.Net.NetworkInformation implementation on Android falls back to Linux PAL. This needs to change because starting from API 24 Android restricts access to many files in the /sys filesystem which makes the API unsupported. We should write Android-specific PAL layer which uses Java APIs via JNI to access the information. /cc @steveisok
|
For reference, the Xamarin.Android implementation of the code resides here. Mono used to call it through several indirections. |
It would be good to get list of failing methods & properties @marek-safar. I made changes in the past to linked GetAllNetworkInterfaces() do depend less on /proc & /sys. It certainly feels better to throw PNSP or have alternative implementation than getting access violation. I would be curious to see how big that difference is. |
That list does not give the list of files @marek-safar. But it seems to be mostly stats. |
@wfurt perhaps I misunderstood the ask, what are you looking for exactly? |
That is ok. I was primarily wondering how much code we will need to replace. Number of test is somewhat approximation. If there are only few functions we may simply add alternatives instead of doing whole new pal. there is already some precedent for that. |
Currently, System.Net.NetworkInformation implementation on Android falls back to Linux PAL. This needs to change because starting from API 24 Android restricts access to many files in the /sys filesystem which makes the API unsupported.
Right now the APIs fail with System.UnauthorizedAccessException. We need to write an Android-specific PAL layer that uses Java APIs via JNI to access the information to not break developers migrating from existing Mono based BCL.
/cc @steveisok
The text was updated successfully, but these errors were encountered: