Luke Huang | caebcbb | 2018-09-27 20:37:14 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2018 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 | |
| 17 | package android.net; |
| 18 | |
| 19 | /** |
| 20 | * The statistics of tethering interface |
| 21 | * |
| 22 | * {@hide} |
| 23 | */ |
| 24 | parcelable TetherStatsParcel { |
Hungming Chen | 41b0ed9 | 2020-06-02 00:13:20 +0000 | [diff] [blame] | 25 | /** |
| 26 | * Parcel representing tethering interface statistics. |
| 27 | * |
| 28 | * This parcel is used by tetherGetStats, tetherOffloadGetStats and |
| 29 | * tetherOffloadGetAndClearStats in INetd.aidl. tetherGetStats uses this parcel to return the |
| 30 | * tethering statistics since netd startup and presents the interface via its interface name. |
| 31 | * Both tetherOffloadGetStats and tetherOffloadGetAndClearStats use this parcel to return |
| 32 | * the tethering statistics since tethering was first started. They present the interface via |
| 33 | * its interface index. Note that the interface must be presented by either interface name |
| 34 | * |iface| or interface index |ifIndex| in this parcel. The unused interface name is set to |
| 35 | * an empty string "" by default and the unused interface index is set to 0 by default. |
| 36 | */ |
| 37 | |
| 38 | /** The interface name. */ |
Luke Huang | caebcbb | 2018-09-27 20:37:14 +0800 | [diff] [blame] | 39 | @utf8InCpp String iface; |
Hungming Chen | 41b0ed9 | 2020-06-02 00:13:20 +0000 | [diff] [blame] | 40 | |
| 41 | /** Total number of received bytes. */ |
Luke Huang | caebcbb | 2018-09-27 20:37:14 +0800 | [diff] [blame] | 42 | long rxBytes; |
Hungming Chen | 41b0ed9 | 2020-06-02 00:13:20 +0000 | [diff] [blame] | 43 | |
| 44 | /** Total number of received packets. */ |
Luke Huang | caebcbb | 2018-09-27 20:37:14 +0800 | [diff] [blame] | 45 | long rxPackets; |
Hungming Chen | 41b0ed9 | 2020-06-02 00:13:20 +0000 | [diff] [blame] | 46 | |
| 47 | /** Total number of transmitted bytes. */ |
Luke Huang | caebcbb | 2018-09-27 20:37:14 +0800 | [diff] [blame] | 48 | long txBytes; |
Hungming Chen | 41b0ed9 | 2020-06-02 00:13:20 +0000 | [diff] [blame] | 49 | |
| 50 | /** Total number of transmitted packets. */ |
Luke Huang | caebcbb | 2018-09-27 20:37:14 +0800 | [diff] [blame] | 51 | long txPackets; |
Hungming Chen | 41b0ed9 | 2020-06-02 00:13:20 +0000 | [diff] [blame] | 52 | |
| 53 | /** The interface index. */ |
| 54 | int ifIndex = 0; |
Luke Huang | caebcbb | 2018-09-27 20:37:14 +0800 | [diff] [blame] | 55 | } |