diff options
author | Benoît Dejean <bdejean@src.gnome.org> | 2004-06-18 06:52:09 +0000 |
---|---|---|
committer | Benoît Dejean <bdejean@src.gnome.org> | 2004-06-18 06:52:09 +0000 |
commit | 34e322e7c26924b083da3355e127753c68baf8da (patch) | |
tree | 2619714645dbfb8f550fee01db89687fa14eab97 | |
parent | 559f48135407753719900f0f6bc94fb7fae38b9e (diff) | |
download | libgtop-34e322e7c26924b083da3355e127753c68baf8da.tar.gz |
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.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | include/glibtop/netload.h | 18 | ||||
-rw-r--r-- | sysdeps/names/netload.c | 20 |
3 files changed, 37 insertions, 8 deletions
@@ -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 diff --git a/include/glibtop/netload.h b/include/glibtop/netload.h index d4eb7a59..1ef45ed8 100644 --- a/include/glibtop/netload.h +++ b/include/glibtop/netload.h @@ -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) diff --git a/sysdeps/names/netload.c b/sysdeps/names/netload.c index a49ded10..06834dca 100644 --- a/sysdeps/names/netload.c +++ b/sysdeps/names/netload.c @@ -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") }; |