Back to index

natlog  0.91.0
Public Member Functions | Private Attributes
Devices Class Reference

#include <devices.h>

Collaboration diagram for Devices:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Devices (std::ostream &stdMsg)
void run (std::ostream &parent)

Private Attributes

PcapRecord d_record
Optionsd_options
std::ostream & d_stdMsg

Detailed Description

Definition at line 10 of file devices.h.


Constructor & Destructor Documentation

Devices::Devices ( std::ostream &  stdMsg)

Definition at line 3 of file devices1.cc.

:
    d_record(stdMsg),
    d_options(Options::instance()),
    d_stdMsg(stdMsg)
{
}

Member Function Documentation

void Devices::run ( std::ostream &  parent)

Definition at line 3 of file run.cc.

{
    PcapFilter in(d_options[0], d_record, PcapRecord::IN);
    PcapFilter out(d_options[1], d_record, PcapRecord::OUT);

    parent << 0 << endl;                    // all OK

    Signal::instance().add(SIGTERM, in);
    Signal::instance().add(SIGTERM, out);

    d_stdMsg << "starting: capturing " << d_options[0] << 
                              " and " << d_options[1] << endl;

    thread inThread(in);
    thread outThread(out);

    inThread.join();
    outThread.join();
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 13 of file devices.h.

Definition at line 12 of file devices.h.

std::ostream& Devices::d_stdMsg [private]

Definition at line 14 of file devices.h.


The documentation for this class was generated from the following files: