Skip to content
Snippets Groups Projects
Commit 5c2b517d authored by Maciej Żenczykowski's avatar Maciej Żenczykowski Committed by Gerrit Code Review
Browse files

Merge "Support shell command to get bpf program id" into main

parents edcc9425 452e464e
No related branches found
No related tags found
No related merge requests found
......@@ -10807,6 +10807,17 @@ public class ConnectivityService extends IConnectivityManager.Stub
Log.d(TAG, "Reevaluating network " + nai.network);
reportNetworkConnectivity(nai.network, !nai.isValidated());
return 0;
case "bpf-get-cgroup-program-id": {
// Usage : adb shell cmd connectivity bpf-get-cgroup-program-id <type>
// Get cgroup bpf program Id for the given type. See BpfUtils#getProgramId
// for more detail.
// If type can't be parsed, this throws NumberFormatException, which
// is passed back to adb who prints it.
final int type = Integer.parseInt(getNextArg());
final int ret = BpfUtils.getProgramId(type, BpfUtils.CGROUP_PATH);
pw.println(ret);
return 0;
}
default:
return handleDefaultCommands(cmd);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment