17 #include <sys/utsname.h> 37 destination(
senf::MACAddress::Broadcast)
40 namespace kw = senf::console::kw;
45 initDir.
add(
"verbose", fty::Variable( verbose));
46 initDir.
add(
"num-packets", fty::Variable( numPackets));
47 initDir.
add(
"packets-per-second", fty::Variable( pktsPerSecond));
48 initDir.
add(
"packet-size", fty::Variable( pktSize));
49 initDir.
add(
"interface", fty::Variable( interface));
50 initDir.
add(
"destination", fty::Variable( destination));
53 enableHighresTimers();
60 senf::console::DirectoryNode::ChildrenRange::iterator it;
61 for (it = range.begin(); it != range.end(); it++) {
62 std::cerr << it->first <<
": ";
63 it->second->help( std::cout);
71 std::cerr <<
"0.1" << std::endl;
78 if (senf::scheduler::haveScalableHiresTimers())
82 senf::scheduler::hiresTimers();
88 struct sched_param param;
89 param.sched_priority = sched_get_priority_max(SCHED_FIFO);
90 if (sched_setscheduler(0, SCHED_FIFO, ¶m) !=0 ) {
101 namespace kw = senf::console::kw;
108 cmdlineOptions.
parse( initDir);
110 std::cerr << e.message() << std::endl;
114 std::cerr <<
"Exception occurred during configuration parsing: "
std::string backtrace() const
boost::iterator_range< ChildMap::const_iterator > ChildrenRange
NodeType & add(std::string const &name, boost::shared_ptr< NodeType > node)
bool parse(int argc, char const *argv[])
void enableHighresTimers()
std::string message() const
void enableRealtimeScheduling()