Merge "Add tagSocket/untagSocket NDK APIs" am: d992ee2925

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1938795

Change-Id: I58aa4e27e1ac39641d1afaec4ef7ac527557c886
This commit is contained in:
Treehugger Robot
2022-01-13 05:57:06 +00:00
committed by Automerger Merge Worker
2 changed files with 16 additions and 0 deletions

View File

@@ -18,6 +18,10 @@ LIBANDROID_NET {
android_getprocnetwork; # llndk android_getprocnetwork; # llndk
android_setprocdns; # llndk android_setprocdns; # llndk
android_getprocdns; # llndk android_getprocdns; # llndk
# These functions have been part of the NDK since API 33.
android_tag_socket_with_uid; # llndk
android_tag_socket; # llndk
android_untag_socket; # llndk
local: local:
*; *;
}; };

View File

@@ -161,3 +161,15 @@ int android_res_nsend(net_handle_t network, const uint8_t *msg, size_t msglen,
void android_res_cancel(int nsend_fd) { void android_res_cancel(int nsend_fd) {
resNetworkCancel(nsend_fd); resNetworkCancel(nsend_fd);
} }
int android_tag_socket_with_uid(int sockfd, int tag, uid_t uid) {
return tagSocket(sockfd, tag, uid);
}
int android_tag_socket(int sockfd, int tag) {
return tagSocket(sockfd, tag, -1);
}
int android_untag_socket(int sockfd) {
return untagSocket(sockfd);
}