PIJSON::new* now accept optional initial fields
This commit is contained in:
@@ -325,10 +325,10 @@ public:
|
||||
//! Network interface descriptor
|
||||
struct PIP_EXPORT Interface {
|
||||
//! System index
|
||||
int index;
|
||||
int index = -1;
|
||||
|
||||
//! MTU
|
||||
int mtu;
|
||||
int mtu = 0;
|
||||
|
||||
//! System name
|
||||
PIString name;
|
||||
@@ -351,6 +351,9 @@ public:
|
||||
//! Flags of interface
|
||||
InterfaceFlags flags;
|
||||
|
||||
//! Returns if interface is active
|
||||
bool isValid() const { return name.isNotEmpty(); }
|
||||
|
||||
//! Returns if interface is active
|
||||
bool isActive() const { return flags[PIEthernet::ifActive]; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user