Added IPv6 feature : provides address, prefix and scope. This breaks the

* sysdeps/names/netload.c:
        * include/glibtop/netload.h: Added IPv6 feature : provides address,
        prefix and scope. This breaks the ABI. Not documented yet : check
        this file.
This commit is contained in:
Benoît Dejean
2004-06-18 06:52:09 +00:00
parent 559f481354
commit 34e322e7c2
3 changed files with 37 additions and 8 deletions

View File

@@ -1,3 +1,10 @@
2004-06-18 Benoît Dejean <tazforever@dlfp.org>
* sysdeps/names/netload.c:
* include/glibtop/netload.h: Added IPv6 feature : provides address,
prefix and scope. This breaks the ABI. Not documented yet : check
this file.
2004-06-13 Benoît Dejean <tazforever@dlfp.org>
* include/glibtop/sysinfo.h: Changed get_sysinfo prototype so that it

View File

@@ -43,8 +43,11 @@ G_BEGIN_DECLS
#define GLIBTOP_NETLOAD_ERRORS_OUT 11
#define GLIBTOP_NETLOAD_ERRORS_TOTAL 12
#define GLIBTOP_NETLOAD_COLLISIONS 13
#define GLIBTOP_NETLOAD_ADDRESS6 14
#define GLIBTOP_NETLOAD_PREFIX6 15
#define GLIBTOP_NETLOAD_SCOPE6 16
#define GLIBTOP_MAX_NETLOAD 14
#define GLIBTOP_MAX_NETLOAD 17
typedef struct _glibtop_netload glibtop_netload;
@@ -67,6 +70,15 @@ enum {
GLIBTOP_IF_FLAGS_MULTICAST
};
enum GLIBTOP_IF_IN6_SCOPE
{
GLIBTOP_IF_IN6_SCOPE_UNKNOWN = 0,
GLIBTOP_IF_IN6_SCOPE_LINK = 1,
GLIBTOP_IF_IN6_SCOPE_SITE = 2,
GLIBTOP_IF_IN6_SCOPE_GLOBAL = 4,
GLIBTOP_IF_IN6_SCOPE_HOST = 8
};
struct _glibtop_netload
{
guint64 flags,
@@ -84,6 +96,10 @@ struct _glibtop_netload
errors_out, /* GLIBTOP_NETLOAD_ERRORS_OUT */
errors_total, /* GLIBTOP_NETLOAD_ERRORS_TOTAL */
collisions; /* GLIBTOP_NETLOAD_COLLISIONS */
guint8 address6[16];
guint8 prefix6[16];
guint8 scope6;
};
#define glibtop_get_netload(netload,interface) glibtop_get_netload_l(glibtop_global_server, netload, interface)

View File

@@ -29,7 +29,7 @@ const char *glibtop_names_netload [GLIBTOP_MAX_NETLOAD] =
"if_flags", "mtu", "subnet", "address", "packets_in",
"packets_out", "packets_total", "bytes_in", "bytes_out",
"bytes_total", "errors_in", "errors_out", "errors_total",
"collisions"
"collisions", "address6", "prefix6", "scope6"
};
const unsigned glibtop_types_netload [GLIBTOP_MAX_NETLOAD] =
@@ -45,8 +45,8 @@ const char *glibtop_labels_netload [GLIBTOP_MAX_NETLOAD] =
{
N_("Interface Flags"),
N_("MTU"),
N_("Subnet"),
N_("Address"),
N_("IPv4 Subnet"),
N_("IPv4 Address"),
N_("Packets In"),
N_("Packets Out"),
N_("Packets Total"),
@@ -56,15 +56,18 @@ const char *glibtop_labels_netload [GLIBTOP_MAX_NETLOAD] =
N_("Errors In"),
N_("Errors Out"),
N_("Errors Total"),
N_("Collisions")
N_("Collisions"),
N_("IPv6 Address"),
N_("IPv6 Prefix"),
N_("IPv6 Scope")
};
const char *glibtop_descriptions_netload [GLIBTOP_MAX_NETLOAD] =
{
N_("Interface Flags"),
N_("Maximum Transfer Unit"),
N_("Subnet"),
N_("Address"),
N_("IPv4 Subnet"),
N_("IPv4 Address"),
N_("Packets In"),
N_("Packets Out"),
N_("Packets Total"),
@@ -74,5 +77,8 @@ const char *glibtop_descriptions_netload [GLIBTOP_MAX_NETLOAD] =
N_("Errors In"),
N_("Errors Out"),
N_("Errors Total"),
N_("Collisions")
N_("Collisions"),
N_("IPv6 Address"),
N_("IPv6 Prefix"),
N_("IPv6 Scope")
};