FairMQ  1.3.7
C++ Message Passing Framework
Network.h
1 /********************************************************************************
2  * Copyright (C) 2017 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 
9 #ifndef FAIR_MQ_TOOLS_NETWORK_H
10 #define FAIR_MQ_TOOLS_NETWORK_H
11 
12 #include <map>
13 #include <string>
14 
15 // forward declarations
16 namespace boost
17 {
18 namespace asio
19 {
20 
21 class io_context;
22 typedef class io_context io_service;
23 
24 } // namespace asio
25 } // namespace boost
26 
27 namespace fair
28 {
29 namespace mq
30 {
31 namespace tools
32 {
33 
34 // returns a map with network interface names as keys and their IP addresses as values
35 std::map<std::string, std::string> getHostIPs();
36 
37 // get IP address of a given interface name
38 std::string getInterfaceIP(const std::string& interface);
39 
40 // get name of the default route interface
41 std::string getDefaultRouteNetworkInterface();
42 
43 std::string getIpFromHostname(const std::string& hostname);
44 
45 std::string getIpFromHostname(const std::string& hostname, boost::asio::io_service& ios);
46 
47 } /* namespace tools */
48 } /* namespace mq */
49 } /* namespace fair */
50 
51 #endif /* FAIR_MQ_TOOLS_NETWORK_H */
Definition: Network.h:16
Tools for interfacing containers to the transport via polymorphic allocators.
Definition: DeviceRunner.h:23

privacy