clang-format
This commit is contained in:
parent
4944a5179c
commit
e309253fc8
@ -1,7 +1,5 @@
|
|||||||
#include "adapters/net.hpp"
|
#include "adapters/net.hpp"
|
||||||
|
|
||||||
#include <iomanip>
|
|
||||||
|
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <linux/ethtool.h>
|
#include <linux/ethtool.h>
|
||||||
#include <linux/if_link.h>
|
#include <linux/if_link.h>
|
||||||
@ -12,6 +10,8 @@
|
|||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
||||||
|
#include <iomanip>
|
||||||
|
|
||||||
#include "common.hpp"
|
#include "common.hpp"
|
||||||
#include "settings.hpp"
|
#include "settings.hpp"
|
||||||
#include "utils/command.hpp"
|
#include "utils/command.hpp"
|
||||||
@ -209,7 +209,6 @@ namespace net {
|
|||||||
if (strncmp(driver.driver, "bridge", 6) == 0) {
|
if (strncmp(driver.driver, "bridge", 6) == 0) {
|
||||||
m_bridge = true;
|
m_bridge = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -257,7 +256,7 @@ namespace net {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_bridge) {
|
if (m_bridge) {
|
||||||
/* If bridge network then link speed cannot be computed
|
/* If bridge network then link speed cannot be computed
|
||||||
* TODO: Identify the physical network in bridge and compute the link speed
|
* TODO: Identify the physical network in bridge and compute the link speed
|
||||||
*/
|
*/
|
||||||
@ -309,7 +308,9 @@ namespace net {
|
|||||||
* about the current connection
|
* about the current connection
|
||||||
*/
|
*/
|
||||||
string wired_network::linkspeed() const {
|
string wired_network::linkspeed() const {
|
||||||
return m_linkspeed == -1 ? "N/A" : (m_linkspeed < 1000 ? (to_string(m_linkspeed) + " Mbit/s") : (to_string(m_linkspeed / 1000) + " Gbit/s"));
|
return m_linkspeed == -1 ? "N/A"
|
||||||
|
: (m_linkspeed < 1000 ? (to_string(m_linkspeed) + " Mbit/s")
|
||||||
|
: (to_string(m_linkspeed / 1000) + " Gbit/s"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// }}}
|
// }}}
|
||||||
|
Loading…
Reference in New Issue
Block a user