FairMQ/fairmq/tools
2018-11-13 11:08:48 +01:00
..
CppSTL.h
Network.cxx Add test for interface IP detection tools 2018-11-01 15:43:40 +01:00
Network.h Add test for interface IP detection tools 2018-11-01 15:43:40 +01:00
Process.cxx Move Bind/Connect/Attach to FairMQChannel 2018-11-13 11:08:48 +01:00
Process.h Support feeding the child process data on stdin 2018-10-10 19:35:18 +02:00
RateLimit.h
README.md
Strings.h
Unique.cxx Avoid boost::uuids::entropy_error on some systems 2018-11-05 13:18:08 +01:00
Unique.h
Version.h

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