OnixS ICE iMpact Multicast Price Feed Handler C++ library  8.5.1
API documentation

What is PCAP replay?

The Handler supports replay of market data not only from log files but from PCAP files as well. PCAP is a widely used capture file format and the data in this format could be produced by many networking tools.

The Handler requires the following data for replay:

  1. Product definitions data (TCP);
  2. Snapshot packets (UDP);
  3. Live packets (UDP);

In the current implementation, the Handler supports replay from PCAP for snapshot and live UDP data only. TCP data should be provided as a raw network dump.

PCAP data providers

As far as there are many ways to create the PCAP data the Handler uses identifiers for different data providers. For now, the Handler supports only one data provider. But it is possible to add any custom data provider by request. Please contact to our Sales Team if you want to replay PCAP data from a source which is not currently supported.

Supported PCAP data providers:

  1. ICE Data Services (IDS).

Convert PCAP data to log file format

The Handler supports converting PCAP data to the log file format. In the package, under tools/PcapConverter you can find a tool which is designed for this. Please see detailed documentation on this tool in the tools/PcapConverter/README.md.

Replay directly from PCAP files

The Handler also supported direct replay from the files, provided by IDS. To make it possible the user should created an instance of OnixS::ICE::iMpact::MarketData::PcapDataProvider using OnixS::ICE::iMpact::MarketData::PcapDataProviderFactory::create method and then assign it to OnixS::ICE::iMpact::MarketData::HandlerSettings::inputStream.

For example:

// Create an instance of custom log input stream.
std::unique_ptr<PcapDataProvider> pcapDataProvider(
, "replay"
, PROD_C10Y_FILE
)
);
HandlerSettings handlerSettings;
// Set custom log replay input stream.
handlerSettings.inputStream = pcapDataProvider.get();

The interface OnixS::ICE::iMpact::MarketData::PcapDataProvider inherits an interface for a custom log replay input stream, i.e. OnixS::ICE::iMpact::MarketData::LogReplayInputStream. This interface is used when instead of plain log file some custom data source should be used.

For more details how all pieces work together please see PcapReplay sample. This sample also includes a sample of PCAP data which can be used to check how it works.

Timestamps

For replayed packets, the Handler uses the same timestamps as available in the PCAP file for UDP data. But for TCP there is no such source so the Handler just uses the current timestamp. The timestamp is available in OnixS::ICE::iMpact::MarketData::MessageInfo::receiveTime and in OnixS::ICE::iMpact::MarketData::Packet::time if the user uses OnixS::ICE::iMpact::MarketData::PacketProcessingListener.