RTI Connext .NET API (legacy)  Version 6.1.2
NDDS::NetworkCapture Class Reference

Network Capture APIs. More...

#include <managed_domain.h>

Static Public Member Functions

static System::Boolean enable ()
 Enable Network Capture. More...
 
static System::Boolean disable ()
 Disable Network Capture. More...
 
static System::Boolean set_default_params (NetworkCaptureParams_t^ params)
 Set the default Network Capture parameters. More...
 
static System::Boolean start (System::String^ filename, NetworkCaptureParams_t^ params)
 Start capturing traffic for all DomainParticipants, with the provided parameters. More...
 
static System::Boolean start (DDS::DomainParticipant^ participant, System::String^ filename, NetworkCaptureParams_t^ params)
 Start capturing traffic for a DomainParticipant, with the provided parameters. More...
 
static System::Boolean start (System::String^ filename)
 Start capturing traffic for all DomainParticipants, with the default parameters. More...
 
static System::Boolean start (DDS::DomainParticipant^ participant, System::String^ filename)
 Start capturing traffic for a DomainParticipant, with the default parameters. More...
 
static System::Boolean stop ()
 Stop capturing traffic for all participants. More...
 
static System::Boolean stop (DDS::DomainParticipant^ participant)
 Stop capturing traffic for a DomainParticipant. More...
 
static System::Boolean pause ()
 Pause capturing traffic for all DomainParticipants. More...
 
static System::Boolean pause (DDS::DomainParticipant^ participant)
 Pause capturing traffic for a DomainParticipant. More...
 
static System::Boolean resume ()
 Resume capturing traffic for all DomainParticipants. More...
 
static System::Boolean resume (DDS::DomainParticipant^ participant)
 Resume capturing traffic for a DomainParticipant. More...
 

Detailed Description

Network Capture APIs.

Member Function Documentation

◆ enable()

static System::Boolean NDDS::NetworkCapture::enable ( )
static

Enable Network Capture.

This method must be called before any other Network Capture method. It must also be called before creating the participants for which we want to capture traffic.

Use this method only for debugging purposes, since it may introduce a significant performance impact.

Returns
true if success. Otherwise, false
MT Safety:
UNSAFE. It is not safe to call this method while another thread may be simultaneously calling another Network Caputre related method, including this one.
MT Safety:
UNSAFE. In VxWorks, it is unsafe to call this method while another thread may be simulatenously calling DDS::DomainParticipantFactory::get_instance, DDS::DomainParticipantFactory::finalize_instance, DDS::TypeCodeFactory::get_instance, NDDS::NetworkCapture::enable, or NDDS::NetworkCapture::disable.
See also
NDDS::NetworkCapture::disable

◆ disable()

static System::Boolean NDDS::NetworkCapture::disable ( )
static

Disable Network Capture.

This method must be the last Network Capture method to be called. It must also be called after deleting the participants for which we captured traffic. Disabling Network Capture without stopping it first is not ok!

Returns
true if success. Otherwise, false
MT Safety:
UNSAFE. It is not safe to call this method while another thread may be simultaneously calling another Network Capture related method, including this one.
MT Safety:
UNSAFE. In VxWorks, it is unsafe to call this method while another thread may be simulatenously calling DDS::DomainParticipantFactory::get_instance, DDS::DomainParticipantFactory::finalize_instance, DDS::TypeCodeFactory::get_instance, NDDS::NetworkCapture::enable, or NDDS::NetworkCapture::disable.
See also
NDDS::NetworkCapture::enable

◆ set_default_params()

static System::Boolean NDDS::NetworkCapture::set_default_params ( NetworkCaptureParams_t params)
static

Set the default Network Capture parameters.

The default parameters are used when Network Capture is started without parameters, i.e., NDDS::NetworkCapture::start.

Precondition
This method requires first enabling Network Capture. See NDDS::NetworkCapture::enable.
Parameters
params<<in>>. Configuration parameters that we want to set as defaults.
Returns
true if success. Otherwise, false
See also
NDDS::NetworkCapture::start
NDDS::NetworkCapture::start(DDS::DomainParticipant^, System::String^)

◆ start() [1/4]

static System::Boolean NDDS::NetworkCapture::start ( System::String^  filename,
NetworkCaptureParams_t params 
)
static

Start capturing traffic for all DomainParticipants, with the provided parameters.

Precondition
This method requires first enabling Network Capture. See NDDS::NetworkCapture::enable.

Perfoms the same function as NDDS::NetworkCapture::start except that it uses the provided parameters, instead of the default ones.

Parameters
filename<<in>>. The name of the output capture file will be based on this input parameter.

In particular, the name for the capture file is the concatenation of the filename input parameter, the "_GUID-" string followed by the decimal representation of bytes 8-11 of the DomainParticipant's GUID, and the file extension (".pcap").

Parameters
params<<in>>. Configuration parameters for the capture.
Returns
true if success. Otherwise, false
See also
NDDS::NetworkCapture::stop
NDDS::NetworkCapture::start(DDS:DomainParticipant^, System::String^, NetworkCaptureParams_t^)

◆ start() [2/4]

static System::Boolean NDDS::NetworkCapture::start ( DDS::DomainParticipant participant,
System::String^  filename,
NetworkCaptureParams_t params 
)
static

Start capturing traffic for a DomainParticipant, with the provided parameters.

Precondition
This method requires enabling first Network Capture. See NDDS::NetworkCapture::enable.
Parameters
participant<<in>>. DomainParticipant for which we want to capture traffic.
filename<<in>>. The name of the output capture file will be based on this input parameter.

In particular, the name for the capture file is the concatenation of the filename input parameter, and the file extension (".pcap").

Parameters
params<<in>>. Parameters for configuring the capture.
Returns
true if success. Otherwise, false
See also
NDDS::NetworkCapture::stop(DDS::DomainParticipant^)
NDDS::NetworkCapture::start(DDS::DomainParticipant^, System::String^)

◆ start() [3/4]

static System::Boolean NDDS::NetworkCapture::start ( System::String^  filename)
static

Start capturing traffic for all DomainParticipants, with the default parameters.

Precondition
This method requires first enabling Network Capture. See NDDS::NetworkCapture::enable.
Parameters
filename<<in>>. The name of the output capture file will be based on this input parameter.

In particular, the name for the capture file is the concatenation of the filename input parameter, the "_GUID-" string followed by the decimal representation of bytes 8-11 of the DomainParticipant's GUID, and the file extension (".pcap").

Returns
true if success. Otherwise, false
See also
NDDS::NetworkCapture::stop
NDDS::NetworkCapture::start(DDS::DomainParticipant^, System::String^)

◆ start() [4/4]

static System::Boolean NDDS::NetworkCapture::start ( DDS::DomainParticipant participant,
System::String^  filename 
)
static

Start capturing traffic for a DomainParticipant, with the default parameters.

Precondition
This method requires first enabling Network Capture. See NDDS::NetworkCapture::enable.
Parameters
participant<<in>>. DomainParticipant for which we want to capture traffic.
filename<<in>>. The name of the output capture file will be based on this input parameter.

In particular, the name for the capture file is the concatenation of the filename input parameter, and the file extension (".pcap").

Returns
true if success. Otherwise, false
See also
NDDS::NetworkCapture::stop(DDS::DomainParticipant^)
NDDS::NetworkCapture::start(DDS:DomainParticipant^, System::String^, NetworkCaptureParams_t^)
NDDS::NetworkCapture::enable

◆ stop() [1/2]

static System::Boolean NDDS::NetworkCapture::stop ( )
static

Stop capturing traffic for all participants.

Precondition
This method requires enabling first Network Capture. See NDDS::NetworkCapture::enable.

This method can (and must) be called after NDDS::NetworkCapture::start, not NDDS::NetworkCapture::start(DDS::DomainParticipant^, System::String^). That is, if we start capturing traffic globally (for all DomainParticipants), we must stop capturing traffic also globally. It is not possible to start capturing traffic for a participant but stop it globally.

It is possible to start capturing globally and then stop capturing for a participant, as long as we eventually stop capturing traffic globally.

We must stop capturing for a participant before deleting it.

Returns
true if success. Otherwise, false
See also
NDDS::NetworkCapture::start
NDDS::NetworkCapture::stop(DDS::DomainParticipant^)

◆ stop() [2/2]

static System::Boolean NDDS::NetworkCapture::stop ( DDS::DomainParticipant participant)
static

Stop capturing traffic for a DomainParticipant.

Precondition
This method requires first enabling Network Capture. See NDDS::NetworkCapture::enable.
Parameters
participant<<in>>. DomainParticipant for which we want to stop capturing traffic.
Returns
true if success. Otherwise, false
See also
NDDS::NetworkCapture::start(DDS::DomainParticipant^, System::String^)
NDDS::NetworkCapture::stop

◆ pause() [1/2]

static System::Boolean NDDS::NetworkCapture::pause ( )
static

Pause capturing traffic for all DomainParticipants.

Precondition
This method requires first enabling Network Capture. See NDDS::NetworkCapture::enable.
Returns
true if success. Otherwise, false
See also
NDDS::NetworkCapture::resume
NDDS::NetworkCapture::pause(DDS::DomainParticipant^)

◆ pause() [2/2]

static System::Boolean NDDS::NetworkCapture::pause ( DDS::DomainParticipant participant)
static

Pause capturing traffic for a DomainParticipant.

Precondition
This method requires first enabling Network Capture. See NDDS::NetworkCapture::enable.
Parameters
participant<<in>>. DomainParticipant for which we want to pause capturing traffic.
Returns
true if success. Otherwise, false
See also
NDDS::NetworkCapture::resume(DDS::DomainParticipant^)
NDDS::NetworkCapture::pause

◆ resume() [1/2]

static System::Boolean NDDS::NetworkCapture::resume ( )
static

Resume capturing traffic for all DomainParticipants.

Precondition
This method requires first enabling Network Capture. See NDDS::NetworkCapture::enable.
Returns
true if success. Otherwise, false
See also
NDDS::NetworkCapture::pause
NDDS::NetworkCapture::resume(DDS::DomainParticipant^)

◆ resume() [2/2]

static System::Boolean NDDS::NetworkCapture::resume ( DDS::DomainParticipant participant)
static

Resume capturing traffic for a DomainParticipant.

Precondition
This method requires first enabling Network Capture. See NDDS::NetworkCapture::enable.
Parameters
participant<<in>>. DomainParticipant for which we want to resume capturing traffic.
Returns
true if success. Otherwise, false
See also
NDDS::NetworkCapture::pause(DDS::DomainParticipant^)
NDDS::NetworkCapture::resume