Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Sep 2015 09:28:31 +0000 (UTC)
From:      Koop Mast <kwm@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r396066 - in head/devel/libgtop: . files
Message-ID:  <201509040928.t849SVMa061103@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kwm
Date: Fri Sep  4 09:28:30 2015
New Revision: 396066
URL: https://svnweb.freebsd.org/changeset/ports/396066

Log:
  Update libgtop2 to 2.31.90.
  
  Use single command for libgtop_server2 premissions in the plist.
  
  Obtained from:	gnome devel repo

Deleted:
  head/devel/libgtop/files/patch-glibtop.h
Modified:
  head/devel/libgtop/Makefile
  head/devel/libgtop/distinfo
  head/devel/libgtop/files/patch-config.h.in
  head/devel/libgtop/files/patch-configure
  head/devel/libgtop/files/patch-sysdeps_freebsd_netload.c
  head/devel/libgtop/pkg-plist

Modified: head/devel/libgtop/Makefile
==============================================================================
--- head/devel/libgtop/Makefile	Fri Sep  4 09:10:34 2015	(r396065)
+++ head/devel/libgtop/Makefile	Fri Sep  4 09:28:30 2015	(r396066)
@@ -1,16 +1,14 @@
 # Created by: Joe Marcus Clarke <marcus@FreeBSD.org>
 # $FreeBSD$
-#   $MCom: ports/trunk/devel/libgtop/Makefile 19959 2014-10-15 14:06:28Z kwm $
 
 PORTNAME=	libgtop
-PORTVERSION=	2.30.0
-PORTREVISION=	5
+PORTVERSION=	2.31.90
 CATEGORIES=	devel gnome
 MASTER_SITES=	GNOME
 DIST_SUBDIR=	gnome2
 
 MAINTAINER=	gnome@FreeBSD.org
-COMMENT=	GNOME 2 top library
+COMMENT=	GNOME top library
 
 USE_PERL5=	build
 USE_XORG=	xau
@@ -18,7 +16,6 @@ USES=		gettext gmake libtool makeinfo pa
 USE_GNOME=	gnomeprefix glib20 intlhack introspection:build
 USE_LDCONFIG=	yes
 GNU_CONFIGURE=	yes
-LDFLAGS+=	-L${LOCALBASE}/lib -lutil
 INSTALL_TARGET=	install-strip
 CONFIGURE_ARGS=	--enable-introspection
 

Modified: head/devel/libgtop/distinfo
==============================================================================
--- head/devel/libgtop/distinfo	Fri Sep  4 09:10:34 2015	(r396065)
+++ head/devel/libgtop/distinfo	Fri Sep  4 09:28:30 2015	(r396066)
@@ -1,2 +1,2 @@
-SHA256 (gnome2/libgtop-2.30.0.tar.xz) = 463bcbe5737b1b93f3345ee34abf601e8eb864f507c49ff1921c2737abafc1e5
-SIZE (gnome2/libgtop-2.30.0.tar.xz) = 664476
+SHA256 (gnome2/libgtop-2.31.90.tar.xz) = d58cfbb9af04239983a5102e7e54ae195aea4f2d8f9e8e6a6c60f57572e02b35
+SIZE (gnome2/libgtop-2.31.90.tar.xz) = 665276

Modified: head/devel/libgtop/files/patch-config.h.in
==============================================================================
--- head/devel/libgtop/files/patch-config.h.in	Fri Sep  4 09:10:34 2015	(r396065)
+++ head/devel/libgtop/files/patch-config.h.in	Fri Sep  4 09:28:30 2015	(r396066)
@@ -1,10 +1,10 @@
---- config.h.in.orig	2008-12-06 16:05:23.000000000 -0500
-+++ config.h.in	2008-12-06 16:05:27.000000000 -0500
+--- config.h.in.orig	2015-08-13 20:06:02.824731000 +0200
++++ config.h.in	2015-08-13 20:07:06.011319000 +0200
 @@ -115,6 +115,9 @@
  /* defined if you have linux/isdn.h */
  #undef HAVE_ISDN_H
  
-+/* Define if you have the kinfo_getfile function */
++/* defined if you have kinfo_getfile in -lutil */
 +#undef HAVE_KINFO_GETFILE
 +
  /* Define to 1 if you have the `lchown' function. */

Modified: head/devel/libgtop/files/patch-configure
==============================================================================
--- head/devel/libgtop/files/patch-configure	Fri Sep  4 09:10:34 2015	(r396065)
+++ head/devel/libgtop/files/patch-configure	Fri Sep  4 09:28:30 2015	(r396066)
@@ -1,21 +1,17 @@
---- configure.orig	2014-04-29 10:12:29.633996234 +0000
-+++ configure	2014-04-29 10:14:19.976988652 +0000
-@@ -13638,6 +13638,79 @@
+--- configure.orig	2015-08-13 20:06:09.161030000 +0200
++++ configure	2015-08-13 20:07:04.020683000 +0200
+@@ -14503,6 +14503,57 @@
  
- done
+ fi
  
-+               { echo "$as_me:$LINENO: checking for kinfo_getfile in -lutil" >&5
-+echo $ECHO_N "checking for kinfo_getfile in -lutil... $ECHO_C" >&6; }
-+if test "${ac_cv_lib_util_kinfo_getfile+set}" = set; then
-+  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kinfo_getfile in -lutil" >&5
++$as_echo_n "checking for kinfo_getfile in -lutil... " >&6; }
++if ${ac_cv_lib_util_kinfo_getfile+:} false; then :
++  $as_echo_n "(cached) " >&6
 +else
 +  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-lutil  $LIBS"
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h.  */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
 +
 +/* Override any GCC internal prototype to avoid an error.
@@ -33,50 +29,32 @@
 +  return 0;
 +}
 +_ACEOF
-+rm -f conftest.$ac_objext conftest$ac_exeext
-+if { (ac_try="$ac_link"
-+case "(($ac_try" in
-+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+  *) ac_try_echo=$ac_try;;
-+esac
-+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-+  (eval "$ac_link") 2>conftest.er1
-+  ac_status=$?
-+  grep -v '^ *+' conftest.er1 >conftest.err
-+  rm -f conftest.er1
-+  cat conftest.err >&5
-+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+  (exit $ac_status); } && {
-+        test -z "$ac_c_werror_flag" ||
-+        test ! -s conftest.err
-+       } && test -s conftest$ac_exeext &&
-+	       $as_test_x conftest$ac_exeext; then
++if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_util_kinfo_getfile=yes
 +else
-+  echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+       ac_cv_lib_util_kinfo_getfile=no
++  ac_cv_lib_util_kinfo_getfile=no
 +fi
-+ 
-+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-+	      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
 +LIBS=$ac_check_lib_save_LIBS
 +fi
-+{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_kinfo_getfile" >&5
-+echo "${ECHO_T}$ac_cv_lib_util_kinfo_getfile" >&6; }
-+if test $ac_cv_lib_util_kinfo_getfile = yes; then
-+  EXTRA_SYSDEPS_LIBS="${EXTRA_SYSDEPS_LIBS} -lutil"
-+  
-+cat >>confdefs.h <<\_ACEOF
-+#define HAVE_KINFO_GETFILE 1
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_kinfo_getfile" >&5
++$as_echo "$ac_cv_lib_util_kinfo_getfile" >&6; }
++if test "x$ac_cv_lib_util_kinfo_getfile" = xyes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBUTIL 1
 +_ACEOF
-+  
-+else
-+  :
++
++  LIBS="-lutil $LIBS"
++
 +fi
 +
++if test xac_cv_lib_kinfo_getfile_util = xyes ; then
++
++$as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
++
++fi
 +
- 	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for I4B" >&5
- $as_echo_n "checking for I4B... " >&6; }
- 	  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+ $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+ if ${ac_cv_c_const+:} false; then :

Modified: head/devel/libgtop/files/patch-sysdeps_freebsd_netload.c
==============================================================================
--- head/devel/libgtop/files/patch-sysdeps_freebsd_netload.c	Fri Sep  4 09:10:34 2015	(r396065)
+++ head/devel/libgtop/files/patch-sysdeps_freebsd_netload.c	Fri Sep  4 09:28:30 2015	(r396066)
@@ -1,17 +1,16 @@
---- sysdeps/freebsd/netload.c.orig	2014-10-02 18:05:51.932132157 +0200
-+++ sysdeps/freebsd/netload.c	2014-10-02 18:06:23.435130545 +0200
-@@ -1,7 +1,8 @@
--/* Copyright (C) 1998-99 Martin Baulig
-+/* Copyright (C) 2014 Gleb Smirnoff
-+   Copyright (C) 1998-99 Martin Baulig
+--- sysdeps/freebsd/netload.c.orig	2015-08-17 20:59:37.000000000 +0200
++++ sysdeps/freebsd/netload.c	2015-08-28 09:50:02.522090000 +0200
+@@ -1,7 +1,9 @@
+ /* Copyright (C) 1998-99 Martin Baulig
++   Copyright (C) 2014 Gleb Smirnoff
     This file is part of LibGTop 1.0.
  
--   Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
-+   Contributed by Gleb Smirnoff <glebius@FreeBSD.org>, September 2014.
+    Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
++   Contributed by Gleb Smirnoff <glebius@FreeBSD.org>, September 2014
  
     LibGTop is free software; you can redistribute it and/or modify it
     under the terms of the GNU General Public License as published by
-@@ -26,22 +27,12 @@
+@@ -26,22 +28,12 @@
  
  #include <glibtop_suid.h>
  
@@ -37,7 +36,7 @@
  
  static const unsigned long _glibtop_sysdeps_netload =
  (1L << GLIBTOP_NETLOAD_IF_FLAGS) +
-@@ -64,24 +55,9 @@
+@@ -64,24 +56,11 @@ static const unsigned long _glibtop_sysd
  (1L << GLIBTOP_NETLOAD_ADDRESS6) +
  (1L << GLIBTOP_NETLOAD_SCOPE6);
  
@@ -49,12 +48,12 @@
 -                { 0 }
 -        };
 -
--/* Init function. */
--
+ /* Init function. */
+ 
  void
  _glibtop_init_netload_p (glibtop *server)
  {
--        if (kvm_nlist (server->machine.kd, nlst) < 0) {
+-        if (kvm_nlist (server->machine->kd, nlst) < 0) {
 -                glibtop_warn_io_r (server, "kvm_nlist");
 -		return;
 -	}
@@ -62,66 +61,57 @@
  	server->sysdeps.netload = _glibtop_sysdeps_netload;
  }
  
-@@ -91,164 +67,129 @@
+@@ -91,154 +70,125 @@ void
  glibtop_get_netload_p (glibtop *server, glibtop_netload *buf,
                         const char *interface)
  {
 -        struct ifnet ifnet;
--        u_long ifnetaddr, ifnetfound;
+-        u_long ifnetaddr;
 -        struct sockaddr *sa = NULL;
--        char name [32];
 -
 -        union {
 -                struct ifaddr ifa;
 -                struct in_ifaddr in;
 -        } ifaddr;
-+	struct ifaddrs *ifap, *ifa;
- 
-         glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_NETLOAD), 0);
++        struct ifaddrs *ifap, *ifa;
  
          memset (buf, 0, sizeof (glibtop_netload));
  
 -	if (server->sysdeps.netload == 0) return;
 +	if (server->sysdeps.netload == 0)
-+		return;
++                return;
++
++        if (getifaddrs(&ifap) != 0) {
++                glibtop_warn_io_r (server, "getifaddrs");
++                return;
++        }
  
--        if (kvm_read (server->machine.kd, nlst [0].n_value,
+-        if (kvm_read (server->machine->kd, nlst [0].n_value,
 -                        &ifnetaddr, sizeof (ifnetaddr)) != sizeof (ifnetaddr)) {
 -                glibtop_warn_io_r (server, "kvm_read (ifnet)");
-+	if (getifaddrs(&ifap) != 0) {
-+		glibtop_warn_io_r(server, "getifaddrs");
- 		return;
- 	}
- 
--        while (ifnetaddr)
+-		return;
+-	}
+-
+-        for (/* NOP */; ifnetaddr; ifnetaddr = (u_long) ifnet.if_link.tqe_next)
 -        {
 -                struct sockaddr_in *sin;
 -                register char *cp;
 -                u_long ifaddraddr;
 -
--                {
--                        ifnetfound = ifnetaddr;
--
--                        if (kvm_read (server->machine.kd, ifnetaddr, &ifnet,
--                                        sizeof (ifnet)) != sizeof (ifnet)) {
--                                glibtop_warn_io_r (server,
--						   "kvm_read (ifnetaddr)");
--				continue;
--			}
+-		if (kvm_read (server->machine->kd, ifnetaddr, &ifnet,
+-			      sizeof (ifnet)) != sizeof (ifnet)) {
+-			glibtop_warn_io_r (server,
+-					   "kvm_read (ifnetaddr)");
+-			break;
+-		}
 +#define	IFA_STAT(s)	(((struct if_data *)ifa->ifa_data)->ifi_ ## s)
  
--                        g_strlcpy (name, ifnet.if_xname, sizeof(name));
--                        ifnetaddr = (u_long) ifnet.if_link.tqe_next;
-+        for (ifa = ifap; ifa; ifa = ifa->ifa_next) {
- 
--                        if (strcmp (name, interface) != 0)
--                                continue;
-+		if (strcmp(ifa->ifa_name, interface) != 0)
-+			continue;
- 
--                        ifaddraddr = (u_long) ifnet.if_addrhead.tqh_first;
--                }
--                if (ifnet.if_flags & IFF_UP)
+-		if (strcmp (ifnet.if_xname, interface) != 0)
++	for (ifa = ifap; ifa; ifa = ifa->ifa_next) {
++	        if (strcmp (ifa->ifa_name, interface) != 0)
+ 			continue;
+-		
+-	        if (ifnet.if_flags & IFF_UP)
 -                        buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_UP);
 -                if (ifnet.if_flags & IFF_BROADCAST)
 -                        buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_BROADCAST);
@@ -177,115 +167,14 @@
 -                buf->collisions = ifnet.if_collisions;
 -                buf->flags = _glibtop_sysdeps_netload;
 -
--                while (ifaddraddr) {
--                        if ((kvm_read (server->machine.kd, ifaddraddr, &ifaddr,
+-                for (ifaddraddr = (u_long) ifnet.if_addrhead.tqh_first; ifaddraddr; ifaddraddr = (u_long) ifaddr.ifa.ifa_link.tqe_next) {
+-                        if ((kvm_read (server->machine->kd, ifaddraddr, &ifaddr,
 -                                        sizeof (ifaddr)) != sizeof (ifaddr))) {
 -                                glibtop_warn_io_r (server,
 -						   "kvm_read (ifaddraddr)");
--				continue;
-+		switch (ifa->ifa_addr->sa_family) {
-+		case AF_LINK: {
-+			struct sockaddr_dl *sdl;
-+			struct ifreq ifr;
-+			int s, flags;
-+
-+			s = socket(AF_INET, SOCK_DGRAM, 0);
-+			if (s < 0) {
-+				glibtop_warn_io_r(server, "socket(AF_INET)");
-+				break;
-+			}
-+			memset(&ifr, 0, sizeof(ifr));
-+			(void )strlcpy(ifr.ifr_name, ifa->ifa_name,
-+			    sizeof(ifr.ifr_name));
-+			if (ioctl(s, SIOCGIFFLAGS, (caddr_t)&ifr) < 0) {
-+				glibtop_warn_io_r(server,
-+				    "ioctl(SIOCGIFFLAGS)");
-+				close(s);
-+				break;
- 			}
-+			close(s);
-+
-+			flags = (ifr.ifr_flags & 0xffff) |
-+			    (ifr.ifr_flagshigh << 16);
-+		
-+			if (flags & IFF_UP)
-+				buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_UP);
-+			if (flags & IFF_BROADCAST)
-+				buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_BROADCAST);
-+			if (flags & IFF_DEBUG)
-+				buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_DEBUG);
-+			if (flags & IFF_LOOPBACK)
-+				buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LOOPBACK);
-+			if (flags & IFF_POINTOPOINT)
-+				buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_POINTOPOINT);
-+			if (flags & IFF_RUNNING)
-+				buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_RUNNING);
-+			if (flags & IFF_NOARP)
-+				buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_NOARP);
-+			if (flags & IFF_PROMISC)
-+				buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_PROMISC);
-+			if (flags & IFF_ALLMULTI)
-+				buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_ALLMULTI);
-+			if (flags & IFF_SIMPLEX)
-+				buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_SIMPLEX);
-+			if (flags & IFF_LINK0)
-+				buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LINK0);
-+			if (flags & IFF_LINK1)
-+				buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LINK1);
-+			if (flags & IFF_LINK2)
-+				buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LINK2);
-+			if (flags & IFF_ALTPHYS)
-+				buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_ALTPHYS);
-+			if (flags & IFF_MULTICAST)
-+				buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_MULTICAST);
-+		
-+			buf->packets_in = IFA_STAT(ipackets);
-+			buf->packets_out = IFA_STAT(opackets);
-+			buf->packets_total = buf->packets_in + buf->packets_out;
-+			buf->bytes_in = IFA_STAT(ibytes);
-+			buf->bytes_out = IFA_STAT(obytes);
-+			buf->bytes_total = buf->bytes_in + buf->bytes_out;
-+			buf->errors_in = IFA_STAT(ierrors);
-+			buf->errors_out = IFA_STAT(oerrors);
-+			buf->errors_total = buf->errors_in + buf->errors_out;
-+			buf->collisions = IFA_STAT(collisions);
-+			buf->flags = _glibtop_sysdeps_netload;
-+
-+			sdl = (struct sockaddr_dl *)ifa->ifa_addr;
-+			memcpy(buf->hwaddress, LLADDR(sdl),
-+			    sizeof(buf->hwaddress));
-+			buf->mtu = IFA_STAT(mtu);
-+			buf->flags |= GLIBTOP_NETLOAD_HWADDRESS;
-+
-+			break;
-+		}
-+		case AF_INET: {
-+			struct sockaddr_in *sin;
-+
-+			sin = (struct sockaddr_in *)ifa->ifa_addr;
-+			buf->address = sin->sin_addr.s_addr;
-+			sin = (struct sockaddr_in *)ifa->ifa_netmask;
-+			buf->subnet = sin->sin_addr.s_addr & buf->address;
-+			buf->flags |= _glibtop_sysdeps_netload_data;
-+			break;
-+		}
-+		case AF_INET6: {
-+			struct sockaddr_in6 *sin6;
-+
-+			sin6 = (struct sockaddr_in6 *)ifa->ifa_addr;
-+			memcpy(buf->address6, &sin6->sin6_addr,
-+			    sizeof(buf->address6));
-+			buf->scope6 = (guint8 )sin6->sin6_scope_id;
-+			buf->flags |= _glibtop_sysdeps_netload6;
-+			sin6 = (struct sockaddr_in6 *)ifa->ifa_netmask;
-+			memcpy(buf->prefix6, &sin6->sin6_addr,
-+			    sizeof(buf->prefix6));
-+			buf->flags |= GLIBTOP_NETLOAD_PREFIX6;
-+			break;
-+		}
-+		}
-+	}
- 
+-				break;
+-			}
+-
 -#define CP(x) ((char *)(x))
 -                        cp = (CP(ifaddr.ifa.ifa_addr) - CP(ifaddraddr)) +
 -                             CP(&ifaddr);
@@ -332,9 +221,112 @@
 -                                        close (in6fd);
 -                                }
 -                        }
--                        ifaddraddr = (u_long) ifaddr.ifa.ifa_link.tqe_next;
--                }
--                return;
--        }
-+	freeifaddrs(ifap);
+-                } /* end of for ( ifaddraddr ) */
+ 
+-		/* found the interface anyway */
+-                break;
+-        } /* end of for ( ifnetaddr ) */
++		switch (ifa->ifa_addr->sa_family) {
++                case AF_LINK: {
++                        struct sockaddr_dl *sdl;
++                        struct ifreq ifr;
++                        int s, flags;
++
++                        s = socket(AF_INET, SOCK_DGRAM, 0);
++                        if (s < 0) {
++                                glibtop_warn_io_r(server, "socket(AF_INET)");
++                                break;
++                        }
++                        memset(&ifr, 0, sizeof(ifr));
++                        (void)strlcpy(ifr.ifr_name, ifa->ifa_name,
++                                sizeof(ifr.ifr_name));
++                        if (ioctl(s, SIOCGIFFLAGS, (caddr_t)&ifr) < 0) {
++                                glibtop_warn_io_r(server, "ioctl(SIOCGIFFLAGS)");
++                                close(s);
++                                break;
++                        }
++                        close(s);
++ 
++                        flags = (ifr.ifr_flags & 0xffff) | (ifr.ifr_flagshigh << 16);
++
++                        if (flags & IFF_UP)
++                                buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_UP);
++                        if (flags & IFF_BROADCAST)
++                                buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_BROADCAST);
++                        if (flags & IFF_DEBUG)
++                                buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_DEBUG);
++                        if (flags & IFF_LOOPBACK)
++                                buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LOOPBACK);
++                        if (flags & IFF_POINTOPOINT)
++                                buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_POINTOPOINT);
++                        if (flags & IFF_RUNNING)
++                                buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_RUNNING);
++                        if (flags & IFF_NOARP)
++                                buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_NOARP);
++                        if (flags & IFF_PROMISC)
++                                buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_PROMISC);
++                        if (flags & IFF_ALLMULTI)
++                                buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_ALLMULTI);
++                        if (flags & IFF_SIMPLEX)
++                                buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_SIMPLEX);
++                        if (flags & IFF_LINK0)
++                                buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LINK0);
++                        if (flags & IFF_LINK1)
++                                buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LINK1);
++                        if (flags & IFF_LINK2)
++                                buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LINK2);
++                        if (flags & IFF_ALTPHYS)
++                                buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_ALTPHYS);
++                        if (flags & IFF_MULTICAST)
++                                buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_MULTICAST);
++
++                        buf->packets_in = IFA_STAT(ipackets);
++                        buf->packets_out = IFA_STAT(opackets);
++                        buf->packets_total = buf->packets_in + buf->packets_out;
++
++                        buf->bytes_in = IFA_STAT(ibytes);
++                        buf->bytes_out = IFA_STAT(obytes);
++                        buf->bytes_total = buf->bytes_in + buf->bytes_out;
++
++                        buf->errors_in = IFA_STAT(ierrors);
++                        buf->errors_out = IFA_STAT(oerrors);
++                        buf->errors_total = buf->errors_in + buf->errors_out;
++
++                        buf->collisions = IFA_STAT(collisions);
++                        buf->flags = _glibtop_sysdeps_netload;
++
++                        sdl = (struct sockaddr_dl *)ifa->ifa_addr;
++                        memcpy(buf->hwaddress, LLADDR(sdl),
++                                sizeof(buf->hwaddress));
++                        buf->mtu = IFA_STAT(mtu);
++                        buf->flags |= GLIBTOP_NETLOAD_HWADDRESS;
++                        break;
++                }
++                case AF_INET: {
++                        struct sockaddr_in *sin;
++
++                        sin = (struct sockaddr_in *)ifa->ifa_addr;
++                        buf->address = sin->sin_addr.s_addr;
++                        sin = (struct sockaddr_in *)ifa->ifa_netmask;
++                        buf->subnet = sin->sin_addr.s_addr & buf->address;
++                        buf->flags |= _glibtop_sysdeps_netload_data;
++                        break;
++                }
++                case AF_INET6: {
++                        struct sockaddr_in6 *sin6;
++
++                        sin6 = (struct sockaddr_in6 *)ifa->ifa_addr;
++                        memcpy(buf->address6, &sin6->sin6_addr,
++                                sizeof(buf->address6));
++                        buf->scope6 = (guint8 )sin6->sin6_scope_id;
++                        buf->flags |= _glibtop_sysdeps_netload6;
++                        sin6 = (struct sockaddr_in6 *)ifa->ifa_netmask;
++                        memcpy(buf->prefix6, &sin6->sin6_addr,
++                                sizeof(buf->prefix6));
++                        buf->flags |= GLIBTOP_NETLOAD_PREFIX6;
++                        break;
++                }
++                } // switch() end
++        }
++        freeifaddrs(ifap);
  }

Modified: head/devel/libgtop/pkg-plist
==============================================================================
--- head/devel/libgtop/pkg-plist	Fri Sep  4 09:10:34 2015	(r396065)
+++ head/devel/libgtop/pkg-plist	Fri Sep  4 09:28:30 2015	(r396066)
@@ -1,9 +1,5 @@
 bin/libgtop_daemon2
-@group kmem
-@mode 2555
-bin/libgtop_server2
-@mode
-@group
+@(,kmem,2555) bin/libgtop_server2
 include/libgtop-2.0/glibtop.h
 include/libgtop-2.0/glibtop/close.h
 include/libgtop-2.0/glibtop/command.h
@@ -43,7 +39,6 @@ include/libgtop-2.0/glibtop/union.h
 include/libgtop-2.0/glibtop/uptime.h
 include/libgtop-2.0/glibtop/version.h
 include/libgtop-2.0/glibtop_machine.h
-include/libgtop-2.0/glibtop_private.h
 include/libgtop-2.0/glibtop_server.h
 include/libgtop-2.0/glibtop_suid.h
 include/libgtop-2.0/libgtopconfig.h



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509040928.t849SVMa061103>