17 #include <senf/PPI.hh> 34 void onRead(
int dummy) {
43 handle,
senf::scheduler::FdEvent::EV_READ, false)
46 handle.protocol().reuseaddr(
true);
65 int main(
int argc,
char const * argv[])
71 if (!configuration.
parse( argc, argv)) {
79 handle->protocol().sndbuf( 128000);
80 if (dup2( handle->fd(), fileno(stdout)) == -1) {
100 fs.open( (std::string(
"/sys/class/net/") + configuration.
device + std::string(
"/address")).c_str());
111 socket.protocol().rcvbuf(4096);
138 senf::ppi::connect( *source, filter);
139 senf::ppi::connect( filter, analyzer);
144 senf::ppi::connect( filter, analyzer);
148 SENF_LOG((
senf::log::IMPORTANT)(
"CSV order: flowId,tstamp,pps,brateInKbps,retriesPerSec,len_min,len_avg,len_max,len_stddev,rssi_min,rssi_avg,rssi_max,rssi_stdev,mcs_min,mcs_avg,mcs_max,mcs_stddev,(latency_min,latency_avg,latency_max,latency_stddev,loss%,duplicate,late)(received,data,corrupt,control,management,other,dataNonUDP,nonMGEN)"));
158 unsigned dropped (socket.protocol().rxQueueDropped());
senf::INet4SocketAddress destination
void dump(std::ostream &os) const
TSFTHistogram & tsftHistogram()
SocketReader(senf::INet4SocketAddress const &addr)
MonitorDataFilter header.
static void logToStderr()
bool start(senf::MACAddress const &src)
senf::INet4SocketAddress logDestination
virtual void terminate() const
static void filterMonitorRxFrames(BSDSocket sock)
static MACAddress from_string(std::string const &s)
boost::function< R(Args)> membind(R(T::*fn)(Args), T *ob)
int run(int argc, char const *argv[])
ppi::connector::PassiveInput< EthernetPacket > input_plain
bool parse(int argc, char const *argv[])
ProtocolClientSocketHandle< ConnectedMMapPacketSocketProtocol< QueueReadPolicy > > ConnectedMMapReadPacketSocketHandle
void handleSignal(siginfo_t const &)
ProtocolClientSocketHandle< TCPv4SocketProtocol > TCPv4ClientSocketHandle
std::string message() const
MonitorDataFilterStatistics stats()
static void filterMonitorTxFrames(BSDSocket sock)
void dump(std::ostream &os) const
int main(int argc, char const *argv[])
ProtocolClientSocketHandle< UDPv4SocketProtocol > UDPv4ClientSocketHandle