FairMQ/fairmq/tools
Dennis Klein a8c76accdc Split StateMachine and Tools into separate targets
This change is needed to share the functionality between
the core library and the SDK library. We want to support building/installing
just the SDK without having a dependency on the core library which adds
additional dependencies.
2019-07-02 21:30:37 +02:00
..
CppSTL.h add array variant of fair::mq::tools::make_unique() 2019-05-14 14:56:08 +02:00
Network.cxx Split StateMachine and Tools into separate targets 2019-07-02 21:30:37 +02:00
Network.h Add test for interface IP detection tools 2018-11-01 15:43:40 +01:00
Process.cxx Process tools: add print helper, support signals 2019-03-19 18:09:01 +01:00
Process.h Process tools: add print helper, support signals 2019-03-19 18:09:01 +01:00
RateLimit.h Add more tests for custom main() 2018-08-27 17:37:22 +02:00
README.md Refactor FairMQTools 2017-05-23 13:42:56 +02:00
Strings.h FairMQ: fix const qualifier for DeviceRunner 2017-10-05 15:32:12 +02:00
Unique.cxx Avoid boost::uuids::entropy_error on some systems 2018-11-05 13:18:08 +01:00
Unique.h Improve compilation speed 2018-05-17 16:32:49 +02:00
Version.h FairMQ: Fix various errors from CI 2017-07-04 07:05:11 +02:00

FairMQ Tools

Contains common tools for use by FairMQ and/or users.

fair::mq::tools::getHostIPs

Fills a map with the network interfaces and their IP addresses available on the current host.

Example usage

#include <map>
#include <string>
#include <iostream>

#include <fairmq/Tools.h>

void main()
{
    std::map<string,string> IPs;

    fair::mq::tools::getHostIPs(IPs);

    for (std::map<string,string>::iterator it = IPs.begin(); it != IPs.end(); ++it)
    {
        std::cout << it->first << ": " << it->second << std::endl;
    }
}
Example Output
eth0: 123.123.1.123
ib0: 123.123.2.123
lo: 127.0.0.1