1/* 2 * Copyright (C) 2023 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17syntax = "proto2"; 18 19package android.os.statsd.corenetworking.networkstack; 20 21import "frameworks/proto_logging/stats/atoms.proto"; 22import "frameworks/proto_logging/stats/atom_field_options.proto"; 23import "frameworks/proto_logging/stats/enums/stats/connectivity/network_stack.proto"; 24 25option java_package = "com.android.os.corenetworking.networkstack"; 26option java_multiple_files = true; 27 28extend Atom { 29 optional ApfSessionInfoReported apf_session_info_reported = 777 [(module) = "network_stack"]; 30} 31 32/** 33 * Logs value of the APF counter. 34 */ 35message ApfCounter { 36 // The name of APF counter. 37 optional android.stats.connectivity.CounterName counter_name = 1; 38 39 // The value of APF counter. 40 optional int64 counter_value = 2; 41} 42 43 44message ApfCounterList { 45 repeated ApfCounter apf_counter = 1; 46} 47 48/** 49 * Logs APF session information event. 50 * Logged from: 51 * packages/modules/NetworkStack/src/android/net/apf/ApfFilter.java or 52 * packages/modules/NetworkStack/src/android/net/apf/LegacyApfFilter.java 53 */ 54message ApfSessionInfoReported { 55 // The version of APF, where version = -1 equals APF disable. 56 optional int32 version = 1; 57 58 // The memory size of APF module. 59 optional int32 memory_size = 2; 60 61 // The values of all APF counters. 62 optional ApfCounterList apf_counter_list = 3 [(log_mode) = MODE_BYTES]; 63 64 // The duration of APF session in seconds. 65 optional int32 apf_session_duration_seconds = 4; 66 67 // Number of times APF program updated. 68 optional int32 num_of_times_apf_program_updated = 5; 69 70 // Record the maximum of program size. 71 optional int32 max_program_size = 6; 72} 73