diff options
author | Kim van der Riet <kpvdr@apache.org> | 2013-02-28 16:14:30 +0000 |
---|---|---|
committer | Kim van der Riet <kpvdr@apache.org> | 2013-02-28 16:14:30 +0000 |
commit | 9c73ef7a5ac10acd6a50d5d52bd721fc2faa5919 (patch) | |
tree | 2a890e1df09e5b896a9b4168a7b22648f559a1f2 /cpp/include/qpid/sys/SystemInfo.h | |
parent | 172d9b2a16cfb817bbe632d050acba7e31401cd2 (diff) | |
download | qpid-python-asyncstore.tar.gz |
Update from trunk r1375509 through r1450773asyncstore
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/asyncstore@1451244 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/include/qpid/sys/SystemInfo.h')
-rw-r--r-- | cpp/include/qpid/sys/SystemInfo.h | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/cpp/include/qpid/sys/SystemInfo.h b/cpp/include/qpid/sys/SystemInfo.h index 24bc099d75..1b5720a5f0 100644 --- a/cpp/include/qpid/sys/SystemInfo.h +++ b/cpp/include/qpid/sys/SystemInfo.h @@ -47,16 +47,23 @@ QPID_COMMON_EXTERN long concurrency(); QPID_COMMON_EXTERN bool getLocalHostname (Address &address); /** - * Get the (possibly multiple) local IP addresses of this host - * using the specified port. + * Get the names of all the network interfaces connected to + * this host. + * @param names Receives the list of interface names */ -QPID_COMMON_EXTERN void getLocalIpAddresses (uint16_t port, std::vector<Address> &addrList); +QPID_COMMON_EXTERN void getInterfaceNames(std::vector<std::string>& names ); /** - * Return true if host names an address of the local host. - *@param host host name or IP address. + * Get strings for each of the IP addresses associated with a named network + * interface. + * If there is no interface of that name an empty list will be returned. + * + * @param interface The name of the network interface + * @param addresses The list of the strings for the IP addresses are pushed on the back of this parameter + * to get just the list you need to clear the vector before using it. + * @return true if an interface of the correct name was found, false otherwise */ -QPID_COMMON_EXTERN bool isLocalHost(const std::string& host); +QPID_COMMON_EXTERN bool getInterfaceAddresses(const std::string& interface, std::vector<std::string>& addresses); /** * Retrieve system identifiers and versions. This is information that can @@ -90,6 +97,12 @@ QPID_COMMON_EXTERN uint32_t getParentProcessId(); */ QPID_COMMON_EXTERN std::string getProcessName(); +/** + * Can thread related primitives be trusted during runtime house-cleaning? + * (i.e. static destructors, atexit()). + */ +QPID_COMMON_EXTERN bool threadSafeShutdown(); + }}} // namespace qpid::sys::SystemInfo |