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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user