Lines Matching defs:bytes
605 ALOGE("Invalid bytes value. 1..max_int64.");
709 ALOGE("Invalid bytes value. 1..max_int64.");
767 int BandwidthController::getInterfaceSharedQuota(int64_t *bytes) {
768 return getInterfaceQuota("shared", bytes);
771 int BandwidthController::getInterfaceQuota(const char *costName, int64_t *bytes) {
783 scanRes = fscanf(fp, "%lld", bytes);
784 ALOGV("Read quota res=%d bytes=%lld", scanRes, *bytes);
822 int BandwidthController::updateQuota(const char *quotaName, int64_t bytes) {
833 fprintf(fp, "%lld\n", bytes);
838 int BandwidthController::runIptablesAlertCmd(IptOp op, const char *alertName, int64_t bytes) {
860 bytes, alertName);
864 bytes, alertName);
870 int BandwidthController::runIptablesAlertFwdCmd(IptOp op, const char *alertName, int64_t bytes) {
892 bytes, alertName);
898 int BandwidthController::setGlobalAlert(int64_t bytes) {
902 if (!bytes) {
903 ALOGE("Invalid bytes value. 1..max_int64.");
907 res = updateQuota(alertName, bytes);
909 res = runIptablesAlertCmd(IptOpInsert, alertName, bytes);
912 res |= runIptablesAlertFwdCmd(IptOpInsert, alertName, bytes);
915 globalAlertBytes = bytes;
981 int BandwidthController::setSharedAlert(int64_t bytes) {
986 if (!bytes) {
987 ALOGE("Invalid bytes value. 1..max_int64.");
990 return setCostlyAlert("shared", bytes, &sharedAlertBytes);
997 int BandwidthController::setInterfaceAlert(const char *iface, int64_t bytes) {
1000 if (!bytes) {
1001 ALOGE("Invalid bytes value. 1..max_int64.");
1014 return setCostlyAlert(iface, bytes, &it->alert);
1033 int BandwidthController::setCostlyAlert(const char *costName, int64_t bytes, int64_t *alertBytes) {
1039 if (!bytes) {
1040 ALOGE("Invalid bytes value. 1..max_int64.");
1048 asprintf(&alertQuotaCmd, ALERT_IPT_TEMPLATE, "-A", chainName, bytes, alertName);
1053 *alertBytes = bytes;
1082 * Parse the ptks and bytes out of:
1084 * pkts bytes target prot opt in out source destination
1085 * 26 2373 RETURN all -- wlan0 rmnet0 0.0.0.0/0 0.0.0.0/0 counter wlan0_rmnet0: 0 bytes
1086 * 27 2002 RETURN all -- rmnet0 wlan0 0.0.0.0/0 0.0.0.0/0 counter rmnet0_wlan0: 0 bytes
1087 * 1040 107471 RETURN all -- bt-pan rmnet0 0.0.0.0/0 0.0.0.0/0 counter bt-pan_rmnet0: 0 bytes
1088 * 1450 1708806 RETURN all -- rmnet0 bt-pan 0.0.0.0/0 0.0.0.0/0 counter rmnet0_bt-pan: 0 bytes
1100 int64_t packets, bytes;
1112 iface0[0] = iface1[0] = rest[0] = packets = bytes = 0;
1114 &packets, &bytes, iface0, iface1, rest);
1115 ALOGV("parse res=%d iface0=<%s> iface1=<%s> pkts=%lld bytes=%lld rest=<%s> orig line=<%s>", res,
1116 iface0, iface1, packets, bytes, rest, buffPtr);
1129 ALOGV("2Filter RX iface_in=%s iface_out=%s rx_bytes=%lld rx_packets=%lld ", iface0, iface1, bytes, packets);
1131 stats.rxBytes = bytes;
1133 ALOGV("2Filter TX iface_in=%s iface_out=%s rx_bytes=%lld rx_packets=%lld ", iface0, iface1, bytes, packets);
1135 stats.txBytes = bytes;
1139 ALOGV("1Filter RX iface_in=%s iface_out=%s rx_bytes=%lld rx_packets=%lld ", iface0, iface1, bytes, packets);
1143 stats.rxBytes = bytes;
1145 ALOGV("1Filter TX iface_in=%s iface_out=%s rx_bytes=%lld rx_packets=%lld ", iface0, iface1, bytes, packets);
1149 stats.txBytes = bytes;
1153 ALOGV("0Filter RX iface_in=%s iface_out=%s rx_bytes=%lld rx_packets=%lld ", iface0, iface1, bytes, packets);
1157 stats.rxBytes = bytes;
1159 ALOGV("0Filter TX iface_in=%s iface_out=%s rx_bytes=%lld rx_packets=%lld ", iface0, iface1, bytes, packets);
1161 stats.txBytes = bytes;