1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-23 02:35:57 +01:00

Add NetworkInterface::friendly_name to get Windows friendly names

Fixes #103
This commit is contained in:
Matias Fontanini
2016-01-10 17:44:32 -08:00
parent 3d3d7b8506
commit 75add84741
2 changed files with 60 additions and 22 deletions

View File

@@ -128,6 +128,26 @@ public:
* \return std::string containing this interface's name.
*/
std::string name() const;
/**
* \brief Retrieves this interface's friendly name.
*
* The name returned by this method can be more human-friendly than
* the one returned by NetworkInterface::name, depending on the platform
* in which it's used.
*
* On GNU/Linux and OSX/FreeBSD, this returns the same string as
* NetworkInterface::name.
*
* On Windows, this method returns a name such as
* "Local Area Connection 1".
*
* Note thaat this returns a wstring rather than a string, to comply
* with Window's adapter's FriendlyName type.
*
* \return std::wstring containing this interface's name.
*/
std::wstring friendly_name() const;
/**
* \brief Retrieve this interface's addresses.