std::string name_;
uint8_t ttl_;
- Configuration() {
- interestLifetime_ = 500; //ms
- pingInterval_ = 1000000; //us
- maxPing_ = std::numeric_limits<uint64_t>::max(); //number of interests
- name_ = "ccnx:/pingserver"; //string
- ttl_ = 64;
+ Configuration()
+ : interestLifetime_(500), //ms
+ pingInterval_(1000000), //us
+ maxPing_(std::numeric_limits<uint64_t>::max()), //number of interests
+ name_("ccnx:/pingserver"), //string
+ ttl_(64) {
}
};
<< "/";
std::cout << std::fixed << std::setprecision(3) << rtt_mdev / 1000
<< " ms";
+ std::cout << std::endl;
}
portal_.stopEventsLoop();
void help(char * program_name) {
std::cout << "usage: " << program_name << " [options]" << " icn-name" << std::endl;
std::cout << "PING options" << std::endl;
- std::cout << "-i <val> ping interval in microseconds (default 1000 ms)" << std::endl;
+ std::cout << "-i <val> ping interval in microseconds (default 10^6 us)" << std::endl;
std::cout << "-m <val> maximum number of pings to send (default unlimited)" << std::endl;
std::cout << "-t <val> set packet ttl (default 64)" << std::endl;
//std::cout << "-j <val1> <val2> jump <val2> sequence numbers every <val1> interests (default disabled)" << std::endl;
install(TARGETS iping-server DESTINATION ${CMAKE_INSTALL_PREFIX}/bin COMPONENT library)
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
- install(FILES ${PRODUCER_PING_SERVER_SERVICE_FILE} DESTINATION /lib/systemd/system)
+ install(FILES ${PRODUCER_PING_SERVER_SERVICE_FILE} DESTINATION /lib/systemd/system COMPONENT library)
endif()
[Service]
Environment=SIZE=64
-Environment-NAME=ccnx:/$(hostname)-pingserver
+Environment-NAME=ccnx:/$(hostname)/pingserver
# This will overrride the default environment
EnvironmentFile=-/etc/default/ccnx/iping.conf
ExecStart=/bin/bash -c "/usr/bin/iping-server -s ${SIZE} ${NAME}"