aboutsummaryrefslogtreecommitdiffstats
path: root/utils/src
diff options
context:
space:
mode:
authorMichele Papalini <micpapal@cisco.com>2019-10-22 10:00:39 +0000
committerGerrit Code Review <gerrit@fd.io>2019-10-22 10:00:39 +0000
commitc37f17534d4f7eaab692a5ffb252858d48358679 (patch)
treefb128fe2d59ef551016a4d063fee13762856000b /utils/src
parent49b9891dc32ea1fbd0af4711a200b425c7482da0 (diff)
parent755c6833ae2d2eee87e80ed3b84c75e968f48c46 (diff)
Merge "[HICN-328] Reworking setSocketOption and getSocketOption to be thread-safe"
Diffstat (limited to 'utils/src')
-rw-r--r--utils/src/hiperf.cc17
1 files changed, 8 insertions, 9 deletions
diff --git a/utils/src/hiperf.cc b/utils/src/hiperf.cc
index ccb22779b..94e5d998d 100644
--- a/utils/src/hiperf.cc
+++ b/utils/src/hiperf.cc
@@ -47,7 +47,6 @@ namespace interface {
#define MIN_PROBE_SEQ 0xefffffff
-
using CryptoSuite = utils::CryptoSuite;
using Identity = utils::Identity;
@@ -217,8 +216,8 @@ class HIperfClient {
expected_seg_ = productionSeg;
} else if (receivedSeg > productionSeg && receivedSeg < MIN_PROBE_SEQ) {
std::cout << "[WINDOW TO LARGE] received NACK for " << receivedSeg
- << ". Next expected packet " << productionSeg << std::endl;
- } else if (receivedSeg >= MIN_PROBE_SEQ){
+ << ". Next expected packet " << productionSeg << std::endl;
+ } else if (receivedSeg >= MIN_PROBE_SEQ) {
std::cout << "[PROBE] probe number = " << receivedSeg << std::endl;
}
return;
@@ -259,9 +258,7 @@ class HIperfClient {
void handleTimerExpiration(ConsumerSocket &c,
const protocol::TransportStatistics &stats) {
-
- if (configuration_.rtc_)
- return;
+ if (configuration_.rtc_) return;
const char separator = ' ';
const int width = 20;
@@ -327,7 +324,9 @@ class HIperfClient {
}
consumer_socket_ = std::make_unique<ConsumerSocket>(transport_protocol);
- consumer_socket_->setSocketOption(GeneralTransportOptions::INTEREST_LIFETIME, configuration_.interest_lifetime_);
+ consumer_socket_->setSocketOption(
+ GeneralTransportOptions::INTEREST_LIFETIME,
+ configuration_.interest_lifetime_);
#if defined(DEBUG) && defined(__linux__)
std::shared_ptr<transport::BasePortal> portal;
@@ -944,8 +943,8 @@ int main(int argc, char *argv[]) {
int opt;
#ifndef _WIN32
- while ((opt = getopt(argc, argv, "DSCf:b:d:W:RMc:vA:s:rmlk:y:p:hi:xB:ItL:")) !=
- -1) {
+ while ((opt = getopt(argc, argv,
+ "DSCf:b:d:W:RMc:vA:s:rmlk:y:p:hi:xB:ItL:")) != -1) {
switch (opt) {
// Common
case 'D': {