Update data type and comments on tagSocket/untagSocket APIs
- Fix comment in version script to say LL-NDK, not NDK
- Use uint32_t for tag
Bug: 223423155
Test: CtsNetTestCases:android.net.TrafficStatsTest
Test: CtsNativeNetPlatformTestCases
Change-Id: Ifb819ed0adeb8f173b98c3f131a4bf2e0715dd4e
diff --git a/native/android/libandroid_net.map.txt b/native/android/libandroid_net.map.txt
index 32fd734..e9acdae 100644
--- a/native/android/libandroid_net.map.txt
+++ b/native/android/libandroid_net.map.txt
@@ -5,20 +5,20 @@
# which might be a few years old.
LIBANDROID_NET {
global:
- # These functions have been part of the NDK since API 24.
+ # These functions have been part of the LL-NDK since API 24.
android_getaddrinfofornetwork; # llndk
android_setsocknetwork; # llndk
android_setprocnetwork; # llndk
- # These functions have been part of the NDK since API 29.
+ # These functions have been part of the LL-NDK since API 29.
android_res_cancel; # llndk
android_res_nquery; # llndk
android_res_nresult; # llndk
android_res_nsend; # llndk
- # These functions have been part of the NDK since API 31.
+ # These functions have been part of the LL-NDK since API 31.
android_getprocnetwork; # llndk
android_setprocdns; # llndk
android_getprocdns; # llndk
- # These functions have been part of the NDK since API 33.
+ # These functions have been part of the LL-NDK since API 33.
android_tag_socket_with_uid; # llndk
android_tag_socket; # llndk
android_untag_socket; # llndk
diff --git a/native/android/net.c b/native/android/net.c
index d7c22e1..74db184 100644
--- a/native/android/net.c
+++ b/native/android/net.c
@@ -162,11 +162,11 @@
resNetworkCancel(nsend_fd);
}
-int android_tag_socket_with_uid(int sockfd, int tag, uid_t uid) {
+int android_tag_socket_with_uid(int sockfd, uint32_t tag, uid_t uid) {
return tagSocket(sockfd, tag, uid);
}
-int android_tag_socket(int sockfd, int tag) {
+int android_tag_socket(int sockfd, uint32_t tag) {
return tagSocket(sockfd, tag, -1);
}