Lines Matching refs:permission
28 Permission permission, PhysicalNetwork::Delegate* delegate) {
29 if (int ret = RouteController::addInterfaceToDefaultNetwork(interface.c_str(), permission)) {
33 if (int ret = delegate->addFallthrough(interface, permission)) {
40 Permission permission,
43 permission)) {
47 if (int ret = delegate->removeFallthrough(interface, permission)) {
69 int PhysicalNetwork::destroySocketsLackingPermission(Permission permission) {
70 if (permission == PERMISSION_NONE) return 0;
74 ALOGE("Error closing sockets for netId %d permission change", mNetId);
77 if (int ret = sd.destroySocketsLackingPermission(mNetId, permission,
79 ALOGE("Failed to close sockets changing netId %d to permission %d: %s",
80 mNetId, permission, strerror(-ret));
86 int PhysicalNetwork::setPermission(Permission permission) {
87 if (permission == mPermission) {
91 mPermission = permission;
95 destroySocketsLackingPermission(permission);
98 mPermission, permission)) {
99 ALOGE("failed to change permission on interface %s of netId %u from %x to %x",
100 interface.c_str(), mNetId, mPermission, permission);
106 if (int ret = addToDefault(mNetId, interface, permission, mDelegate)) {
117 destroySocketsLackingPermission(permission);
118 mPermission = permission;