Update of /cvsroot/fink/dists/10.4-transitional/unstable/main/finkinfo/utils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29419
Modified Files: gkrellm2.info gkrellm2.patch Log Message: Update Index: gkrellm2.patch =================================================================== RCS file: /cvsroot/fink/dists/10.4-transitional/unstable/main/finkinfo/utils/gkrellm2.patch,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gkrellm2.patch 27 Apr 2005 03:26:48 -0000 1.1 +++ gkrellm2.patch 7 May 2006 21:26:38 -0000 1.2 @@ -1,3 +1,178 @@ +diff -ru gkrellm-2.2.5/src/client.c gkrellm-2.2.5_inetmem/src/client.c +--- gkrellm-2.2.5/src/client.c 2005-03-19 10:00:16.000000000 -0600 ++++ gkrellm-2.2.5_inetmem/src/client.c 2006-03-28 16:32:20.000000000 -0600 +@@ -1715,7 +1715,7 @@ + if (fd >= 0) + { + memset(&s, 0, sizeof(s)); +- memcpy(&s.sin_addr.s_addr, he->h_addr, he->h_length); ++ memcpy(&s.sin_addr.s_addr, addr->h_addr, addr->h_length); + s.sin_family = AF_INET; + s.sin_port = htons(server_port); + if (connect(fd, (struct sockaddr *)&s, sizeof (s)) < 0) +diff -ru gkrellm-2.2.5/src/inet.c gkrellm-2.2.5_inetmem/src/inet.c +--- gkrellm-2.2.5/src/inet.c 2004-05-14 14:45:14.000000000 -0500 ++++ gkrellm-2.2.5_inetmem/src/inet.c 2006-03-28 19:11:48.000000000 -0600 +@@ -671,11 +671,15 @@ + continue; + } + if (getnameinfo((struct sockaddr *)&ss, salen, +- hbuf, sizeof(hbuf), NULL, 0, flag)) +- continue; +- snprintf(buf, sizeof(buf), "%6d: %s\n", +- tcp->local_port, hbuf); +-#else ++ hbuf, sizeof(hbuf), NULL, 0, flag)){ ++ snprintf(buf, sizeof(buf), ++ "%6d: %s\n", tcp->local_port, ++ inet_ntoa(tcp->remote_addr)); ++ }else{ ++ snprintf(buf, sizeof(buf), "%6d: %s\n", ++ tcp->local_port, hbuf); ++ } ++ #else + hostent = gethostbyaddr((char *) &tcp->remote_addr, + sizeof(struct in_addr), AF_INET); + if (hostent) +diff -ru gkrellm-2.2.5/src/sysdeps/darwin.c gkrellm-2.2.5_inetmem/src/sysdeps/darwin.c +--- gkrellm-2.2.5/src/sysdeps/darwin.c 2006-03-28 16:47:49.000000000 -0600 ++++ gkrellm-2.2.5_inetmem/src/sysdeps/darwin.c 2006-03-28 16:36:39.000000000 -0600 +@@ -397,16 +397,115 @@ + + /* ===================================================================== */ + /* Inet monitor interface - not implemented */ ++#include "../inet.h" ++ ++#include <net/route.h> ++#include <netinet/in.h> ++#include <netinet/in_systm.h> ++#include <netinet/ip.h> ++#ifdef INET6 ++#include <netinet/ip6.h> ++#endif /* INET6 */ ++#include <netinet/in_pcb.h> ++#include <netinet/ip_icmp.h> ++#include <netinet/icmp_var.h> ++#include <netinet/igmp_var.h> ++#include <netinet/ip_var.h> ++#include <netinet/tcp.h> ++#include <netinet/tcpip.h> ++#include <netinet/tcp_seq.h> ++#define TCPSTATES ++#include <netinet/tcp_fsm.h> ++#include <netinet/tcp_var.h> ++#include <netinet/udp.h> ++#include <netinet/udp_var.h> ++#include <sys/types.h> ++ ++#define warn(x...) fprintf(stderr,x) + + void + gkrellm_sys_inet_read_tcp_data(void) +- { ++{ ++ ActiveTCP tcp; ++ const char *mibvar="net.inet.tcp.pcblist"; ++ char *buf; ++ struct tcpcb *tp = NULL; ++ struct inpcb *inp; ++ struct xinpgen *xig, *oxig; ++ struct xsocket *so; ++ size_t len=0; ++ if (sysctlbyname(mibvar, 0, &len, 0, 0) < 0) { ++ if (errno != ENOENT) ++ warn("sysctl: %s", mibvar); ++ return; ++ } ++ if ((buf = malloc(len)) == 0) { ++ warn("malloc %lu bytes", (u_long)len); ++ return; + } ++ if (sysctlbyname(mibvar, buf, &len, 0, 0) < 0) { ++ warn("sysctl: %s", mibvar); ++ free(buf); ++ return; ++ } ++ /* ++ * Bail-out to avoid logic error in the loop below when ++ * there is in fact no more control block to process ++ */ ++ if (len <= sizeof(struct xinpgen)) { ++ free(buf); ++ return; ++ } ++ oxig = xig = (struct xinpgen *)buf; ++ for (xig = (struct xinpgen *)((char *)xig + xig->xig_len); ++ xig->xig_len > sizeof(struct xinpgen); ++ xig = (struct xinpgen *)((char *)xig + xig->xig_len)) { ++ tp = &((struct xtcpcb *)xig)->xt_tp; ++ inp = &((struct xtcpcb *)xig)->xt_inp; ++ so = &((struct xtcpcb *)xig)->xt_socket; ++ if (so->xso_protocol != IPPROTO_TCP) ++ continue; ++ /* Ignore PCBs which were freed during copyout. */ ++ if (inp->inp_gencnt > oxig->xig_gen) ++ continue; ++ if ((inp->inp_vflag & INP_IPV4) == 0 ++#ifdef INET6 ++ && (inp->inp_vflag & INP_IPV6) == 0 ++#endif /* INET6 */ ++ ) ++ continue; ++ /* ++ * Local address is not an indication of listening socket or ++ * server sockey but just rather the socket has been bound. ++ * That why many UDP sockets were not displayed in the original code. ++ */ ++ if (tp->t_state <= TCPS_LISTEN){ ++ continue; ++ } ++ if (inp->inp_vflag & INP_IPV4) { ++ tcp.local_port=ntohs(inp->inp_lport); ++ tcp.remote_addr.s_addr=(uint32_t)inp->inp_faddr.s_addr; ++ tcp.remote_port=ntohs(inp->inp_fport); ++ tcp.family=AF_INET; ++ gkrellm_inet_log_tcp_port_data(&tcp); ++ } ++#ifdef INET6 ++ else if (inp->inp_vflag & INP_IPV6) { ++ tcp.local_port=ntohs(inp->inp_lport); ++ memcpy(&(tcp.remote_addr6),&(inp->in6p_faddr),sizeof(struct in6_addr)); ++ tcp.remote_port=ntohs(inp->inp_fport); ++ tcp.family=AF_INET; ++ gkrellm_inet_log_tcp_port_data(&tcp); ++ } /* else nothing printed now */ ++#endif /* INET6 */ ++} ++free(buf); ++} + + gboolean + gkrellm_sys_inet_init(void) + { +- return FALSE; ++ return TRUE; + } + + +@@ -453,12 +552,12 @@ + pshift++; + } + +- used = (vm_info.active_count + vm_info.inactive_count + vm_info.wire_count) << pshift; ++ used = (vm_info.wire_count +vm_info.active_count)<< pshift; + free = vm_info.free_count << pshift; + total = (vm_info.active_count + vm_info.inactive_count + vm_info.free_count + vm_info.wire_count) << pshift; + /* Don't know how to get cached or buffers. */ +- buffers = 0; +- cached = 0; ++ buffers = 0;// vm_info.active_count << pshift; ++ cached = vm_info.inactive_count << pshift; + /* shared 0 for now, shared is a PITA */ + shared = 0; + gkrellm_mem_assign_data(total, used, free, shared, buffers, cached); + + # Darwin 7.8 doesn't have (or require) libmd5. I'm not sure when this occurred, # so I don't know whether just removing it or creating a new "darwin7.8" or # somesuch target is the right thing to do. Index: gkrellm2.info =================================================================== RCS file: /cvsroot/fink/dists/10.4-transitional/unstable/main/finkinfo/utils/gkrellm2.info,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- gkrellm2.info 23 Mar 2006 22:17:21 -0000 1.7 +++ gkrellm2.info 7 May 2006 21:26:37 -0000 1.8 @@ -1,5 +1,5 @@ Package: gkrellm2 -Version: 2.2.7 +Version: 2.2.9 Revision: 10 Maintainer: Ben Hines <[EMAIL PROTECTED]> Source: mirror:custom:gkrellm-%v.tar.bz2 @@ -8,7 +8,7 @@ CustomMirror: << nam-us: http://members.dslextreme.com/users/billw/gkrellm/ << -Source-MD5: 6ff47bc8e66ba88f42932365a947f9f3 +Source-MD5: 5334155797901724f4eb46a82ad72395 Conflicts: gkrellm Depends: gtk+2-shlibs, glib2-shlibs, imlib-shlibs, libwww-shlibs BuildDepends: gtk+2-dev, glib2, glib2-dev, imlib, libwww, pkgconfig, atk1, gettext-dev, gettext-bin, gettext-tools, libiconv-dev, pango1-xft2-dev, x11-dev, gcc3.3 _______________________________________________ Fink-commits mailing list Fink-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-commits