mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2026-02-04 03:19:21 +00:00
Boost 1.88 replaced Boost.Process with v2, breaking the v1 API. Boost 1.89 restores v1 compatibility via <boost/process/v1.hpp>. - Fail configuration if Boost 1.88 is detected - Define FAIRMQ_BOOST_PROCESS_V1_HEADER for Boost >= 1.89 - Use conditional includes to select v1.hpp or process.hpp - Add namespace aliases (bp, bp_this) for portable API access
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