PIJSON::new* now accept optional initial fields

This commit is contained in:
2025-07-09 12:41:23 +03:00
parent 7b52f6d70d
commit ed3d4c4217
5 changed files with 72 additions and 51 deletions

View File

@@ -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]; }