diff options
| author | Treehugger Robot <treehugger-gerrit@google.com> | 2022-02-04 23:57:06 +0000 |
|---|---|---|
| committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-02-04 23:57:06 +0000 |
| commit | 10c372e521bc6c1e9e5aa383d0c01edadb8ca64c (patch) | |
| tree | 1b5a5eba472b82522993914489b57f511d6c93fa /service-t/src/com/android/server/net/StatsMapValue.java | |
| parent | 010a360741217111e3e7e251ea416f055074517b (diff) | |
| parent | 4a53677d10c32529e4a0639fbd0bc9d96b6a89ae (diff) | |
Merge "Add key / value data structures for IBpfMaps" am: 4a53677d10
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1969201
Change-Id: Id2e9069959402216b52d1d64603eeb9f27cc21ca
Diffstat (limited to 'service-t/src/com/android/server/net/StatsMapValue.java')
| -rw-r--r-- | service-t/src/com/android/server/net/StatsMapValue.java | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/service-t/src/com/android/server/net/StatsMapValue.java b/service-t/src/com/android/server/net/StatsMapValue.java new file mode 100644 index 0000000000..48f26ce686 --- /dev/null +++ b/service-t/src/com/android/server/net/StatsMapValue.java @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2022 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.server.net; + +import com.android.net.module.util.Struct; +import com.android.net.module.util.Struct.Field; +import com.android.net.module.util.Struct.Type; + +/** + * Value used for both stats maps and uid stats map. + */ +public class StatsMapValue extends Struct { + @Field(order = 0, type = Type.U63) + public final long rxPackets; + + @Field(order = 1, type = Type.U63) + public final long rxBytes; + + @Field(order = 2, type = Type.U63) + public final long txPackets; + + @Field(order = 3, type = Type.U63) + public final long txBytes; + + public StatsMapValue(final long rxPackets, final long rxBytes, final long txPackets, + final long txBytes) { + this.rxPackets = rxPackets; + this.rxBytes = rxBytes; + this.txPackets = txPackets; + this.txBytes = txBytes; + } +} |
