diff --git a/bindings/ruby/rbsigar.c b/bindings/ruby/rbsigar.c index 7bfc7a7d..526125a9 100644 --- a/bindings/ruby/rbsigar.c +++ b/bindings/ruby/rbsigar.c @@ -684,6 +684,7 @@ static void Init_rbsigar_constants(VALUE rclass) RB_SIGAR_CONST_INT(IFF_MULTICAST); RB_SIGAR_CONST_INT(IFF_SLAVE); RB_SIGAR_CONST_INT(IFF_MASTER); + RB_SIGAR_CONST_INT(IFF_DYNAMIC); RB_SIGAR_CONST_INT(NETCONN_CLIENT); RB_SIGAR_CONST_INT(NETCONN_SERVER); diff --git a/include/sigar.h b/include/sigar.h index a09ecebd..d5f5d6a2 100644 --- a/include/sigar.h +++ b/include/sigar.h @@ -585,6 +585,7 @@ SIGAR_DECLARE(int) sigar_net_route_list_destroy(sigar_t *sigar, #define SIGAR_IFF_MULTICAST 0x800 #define SIGAR_IFF_SLAVE 0x1000 #define SIGAR_IFF_MASTER 0x2000 +#define SIGAR_IFF_DYNAMIC 0x4000 #define SIGAR_NULL_HWADDR "00:00:00:00:00:00" diff --git a/src/sigar.c b/src/sigar.c index 9ab00450..a21808ae 100644 --- a/src/sigar.c +++ b/src/sigar.c @@ -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; } diff --git a/src/sigar_format.c b/src/sigar_format.c index ea7d5290..a719f6a0 100644 --- a/src/sigar_format.c +++ b/src/sigar_format.c @@ -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; }