[NFCT.TETHER.3] Migrate tetherOffloadGetStats from netd to mainline
A preparation for updating BPF map in mainline module. Test: TetheringCoverageTests Change-Id: Ie73f7b4d9b191e62cfdfe2cfa3360cc7210f17e8
This commit is contained in:
@@ -21,6 +21,8 @@ import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.android.networkstack.tethering.TetherStatsValue;
|
||||
|
||||
import java.io.FileDescriptor;
|
||||
import java.net.Inet6Address;
|
||||
import java.net.SocketException;
|
||||
@@ -91,6 +93,13 @@ public class TetheringUtils {
|
||||
txPackets = tetherStats.txPackets;
|
||||
}
|
||||
|
||||
public ForwardedStats(@NonNull TetherStatsValue tetherStats) {
|
||||
rxBytes = tetherStats.rxBytes;
|
||||
rxPackets = tetherStats.rxPackets;
|
||||
txBytes = tetherStats.txBytes;
|
||||
txPackets = tetherStats.txPackets;
|
||||
}
|
||||
|
||||
public ForwardedStats(@NonNull ForwardedStats other) {
|
||||
rxBytes = other.rxBytes;
|
||||
rxPackets = other.rxPackets;
|
||||
|
||||
Reference in New Issue
Block a user