blob: 6bf60a86e33233279e8229304a94e032347974f4 [file] [log] [blame]
Luke Huangcaebcbb2018-09-27 20:37:14 +08001/*
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
17package android.net;
18
19/**
20 * The statistics of tethering interface
21 *
22 * {@hide}
23 */
24parcelable TetherStatsParcel {
Hungming Chen41b0ed92020-06-02 00:13:20 +000025 /**
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 Huangcaebcbb2018-09-27 20:37:14 +080039 @utf8InCpp String iface;
Hungming Chen41b0ed92020-06-02 00:13:20 +000040
41 /** Total number of received bytes. */
Luke Huangcaebcbb2018-09-27 20:37:14 +080042 long rxBytes;
Hungming Chen41b0ed92020-06-02 00:13:20 +000043
44 /** Total number of received packets. */
Luke Huangcaebcbb2018-09-27 20:37:14 +080045 long rxPackets;
Hungming Chen41b0ed92020-06-02 00:13:20 +000046
47 /** Total number of transmitted bytes. */
Luke Huangcaebcbb2018-09-27 20:37:14 +080048 long txBytes;
Hungming Chen41b0ed92020-06-02 00:13:20 +000049
50 /** Total number of transmitted packets. */
Luke Huangcaebcbb2018-09-27 20:37:14 +080051 long txPackets;
Hungming Chen41b0ed92020-06-02 00:13:20 +000052
53 /** The interface index. */
54 int ifIndex = 0;
Luke Huangcaebcbb2018-09-27 20:37:14 +080055}