Add IFF_DYNAMIC support for Linux.
Support in the ruby binding.
This commit is contained in:
1 parent
c007175b21
commit
cfae297d9b
4 files changed
+9
No files matched your search
@@ -1551,6 +1551,7 @@ int sigar_net_interface_config_get(sigar_t *sigar, const char *name,
|
||||
int is_mcast = flags & IFF_MULTICAST;
|
||||
int is_slave = flags & IFF_SLAVE;
|
||||
int is_master = flags & IFF_MASTER;
|
||||
int is_dynamic = flags & IFF_DYNAMIC;
|
||||
/*
|
||||
* XXX: should just define SIGAR_IFF_*
|
||||
* and test IFF_* bits on given platform.
|
||||
@@ -1568,6 +1569,9 @@ int sigar_net_interface_config_get(sigar_t *sigar, const char *name,
|
||||
if (is_master) {
|
||||
flags |= SIGAR_IFF_MASTER;
|
||||
}
|
||||
if (is_dynamic) {
|
||||
flags |= SIGAR_IFF_DYNAMIC;
|
||||
}
|
||||
#endif
|
||||
ifconfig->flags = flags;
|
||||
}
|
||||
|
||||
@@ -559,6 +559,9 @@ SIGAR_DECLARE(char *) sigar_net_interface_flags_to_string(sigar_uint64_t flags,
|
||||
if (flags & SIGAR_IFF_MASTER) {
|
||||
strcat(buf, "MASTER ");
|
||||
}
|
||||
if (flags & SIGAR_IFF_DYNAMIC) {
|
||||
strcat(buf, "DYNAMIC ");
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user