1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-29 13:04:28 +01:00

Added Utils::interface_id.

This commit is contained in:
Matias Fontanini
2011-08-15 00:10:02 -03:00
parent 89b04a1238
commit c803e25db4
2 changed files with 30 additions and 0 deletions

View File

@@ -102,6 +102,14 @@ namespace Tins {
*/
bool interface_hwaddr(const std::string &iface, uint8_t *buffer);
/** \brief Lookup the interface identifier.
*
* If the lookup fails, false will be returned, true otherwise.
* \param iface The interface from which to extract the identifier.
* \param flag The interface id will be returned in this parameter.
*/
bool interface_id(const std::string &iface, uint32_t &id);
/** \brief Convert 32 bit integer into network byte order.
*
* \param data The data to convert.