Home | History | Annotate | Download | only in server

Lines Matching defs:bytes

491         ALOGE("Invalid bytes value. 1..max_int64.");
602 ALOGE("Invalid bytes value. 1..max_int64.");
660 int BandwidthController::getInterfaceSharedQuota(int64_t *bytes) {
661 return getInterfaceQuota("shared", bytes);
664 int BandwidthController::getInterfaceQuota(const char *costName, int64_t *bytes) {
679 scanRes = fscanf(fp, "%" SCNd64, bytes);
680 ALOGV("Read quota res=%d bytes=%" PRId64, scanRes, *bytes);
718 int BandwidthController::updateQuota(const char *quotaName, int64_t bytes) {
734 fprintf(fp, "%" PRId64"\n", bytes);
739 int BandwidthController::runIptablesAlertCmd(IptOp op, const char *alertName, int64_t bytes) {
745 StringAppendF(&alertQuotaCmd, ALERT_IPT_TEMPLATE, opFlag, "bw_INPUT", bytes, alertName);
746 StringAppendF(&alertQuotaCmd, ALERT_IPT_TEMPLATE, opFlag, "bw_OUTPUT", bytes, alertName);
752 int BandwidthController::runIptablesAlertFwdCmd(IptOp op, const char *alertName, int64_t bytes) {
755 StringAppendF(&alertQuotaCmd, ALERT_IPT_TEMPLATE, opFlag, "bw_FORWARD", bytes, alertName);
761 int BandwidthController::setGlobalAlert(int64_t bytes) {
765 if (!bytes) {
766 ALOGE("Invalid bytes value. 1..max_int64.");
770 res = updateQuota(alertName, bytes);
772 res = runIptablesAlertCmd(IptOpInsert, alertName, bytes);
775 res |= runIptablesAlertFwdCmd(IptOpInsert, alertName, bytes);
778 globalAlertBytes = bytes;
844 int BandwidthController::setSharedAlert(int64_t bytes) {
849 if (!bytes) {
850 ALOGE("Invalid bytes value. 1..max_int64.");
853 return setCostlyAlert("shared", bytes, &sharedAlertBytes);
860 int BandwidthController::setInterfaceAlert(const char *iface, int64_t bytes) {
868 if (!bytes) {
869 ALOGE("Invalid bytes value. 1..max_int64.");
882 return setCostlyAlert(iface, bytes, &it->alert);
906 int BandwidthController::setCostlyAlert(const char *costName, int64_t bytes, int64_t *alertBytes) {
917 if (!bytes) {
918 ALOGE("Invalid bytes value. 1..max_int64.");
926 asprintf(&alertQuotaCmd, ALERT_IPT_TEMPLATE, "-A", chainName, bytes, alertName);
931 *alertBytes = bytes;
975 * Parse the ptks and bytes out of:
977 * pkts bytes target prot opt in out source destination
984 * pkts bytes target prot opt in out source destination
1003 int64_t packets, bytes;
1019 iface0[0] = iface1[0] = rest[0] = packets = bytes = 0;
1024 &packets, &bytes, iface0, iface1, rest);
1029 &packets, &bytes, iface0, iface1, rest);
1031 ALOGV("parse res=%d iface0=<%s> iface1=<%s> pkts=%" PRId64" bytes=%" PRId64" rest=<%s> orig line=<%s>", res,
1032 iface0, iface1, packets, bytes, rest, buffPtr);
1046 ALOGV("2Filter RX iface_in=%s iface_out=%s rx_bytes=%" PRId64" rx_packets=%" PRId64" ", iface0, iface1, bytes, packets);
1048 stats.rxBytes = bytes;
1050 ALOGV("2Filter TX iface_in=%s iface_out=%s rx_bytes=%" PRId64" rx_packets=%" PRId64" ", iface0, iface1, bytes, packets);
1052 stats.txBytes = bytes;
1056 ALOGV("1Filter RX iface_in=%s iface_out=%s rx_bytes=%" PRId64" rx_packets=%" PRId64" ", iface0, iface1, bytes, packets);
1060 stats.rxBytes = bytes;
1062 ALOGV("1Filter TX iface_in=%s iface_out=%s rx_bytes=%" PRId64" rx_packets=%" PRId64" ", iface0, iface1, bytes, packets);
1066 stats.txBytes = bytes;
1070 ALOGV("0Filter RX iface_in=%s iface_out=%s rx_bytes=%" PRId64" rx_packets=%" PRId64" ", iface0, iface1, bytes, packets);
1074 stats.rxBytes = bytes;
1076 ALOGV("0Filter TX iface_in=%s iface_out=%s rx_bytes=%" PRId64" rx_packets=%" PRId64" ", iface0, iface1, bytes, packets);
1078 stats.txBytes = bytes;