FairMQ/fairmq/tools
Dennis Klein 324a27a2e1 fix(tools): No longer use removed alias io_service
Deprecated via d3bbf3756d
and removed via 49fcd03434
in Boost 1.87 or Asio 1.33.
2025-01-09 17:09:57 +01:00
..
Compiler.h feat(tools): Add macro to instruct the compiler to always inline 2022-09-14 07:37:52 +02:00
CppSTL.h Remove custom implementation for enum hashing 2021-01-25 13:46:40 +01:00
Exceptions.h Do not catch and rethrow exception from state handlers 2021-11-03 20:23:40 +01:00
InstanceLimit.h Apply cppcoreguidelines-avoid-non-const-global-variables 2021-09-27 12:04:07 +02:00
IO.h feat: add tool for noncanonical input 2021-10-08 09:42:28 +02:00
Network.cxx fix(tools): No longer use removed query API 2025-01-09 17:09:57 +01:00
Network.h feat: Drop public dependency to Boost.Asio and use standalone asio 2021-07-16 12:31:17 +02:00
Process.cxx fix(tools): No longer use removed alias io_service 2025-01-09 17:09:57 +01:00
Process.h 17-ify namespaces 2021-01-25 13:46:40 +01:00
RateLimit.h 17-ify namespaces 2021-01-25 13:46:40 +01:00
README.md Refactor FairMQTools 2017-05-23 13:42:56 +02:00
runUuidGenerator.cxx fairmq-uuid-gen: Move to tools directory 2021-03-26 10:06:10 +01:00
Semaphore.cxx 17-ify namespaces 2021-01-25 13:46:40 +01:00
Semaphore.h 17-ify namespaces 2021-01-25 13:46:40 +01:00
Strings.h Add tools: StrStartsWith, StrEndsWith 2021-04-08 10:11:23 +02:00
Unique.cxx 17-ify namespaces 2021-01-25 13:46:40 +01:00
Unique.h 17-ify namespaces 2021-01-25 13:46:40 +01:00
Version.h 17-ify namespaces 2021-01-25 13:46:40 +01: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