summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2003-09-08 07:25:51 +0000
committeredwin <edwin@FreeBSD.org>2003-09-08 07:25:51 +0000
commitc55221aaf4a4d0c922ee3194dd90f1b447d224a4 (patch)
treec6db689266be1995c52740a95922e679da68c3fa /net
parent7c7f43e87f589a57bbe673bd438201a90951d584 (diff)
downloadFreeBSD-ports-c55221aaf4a4d0c922ee3194dd90f1b447d224a4.zip
FreeBSD-ports-c55221aaf4a4d0c922ee3194dd90f1b447d224a4.tar.gz
New port: net/gkrellmmultiping2
This plugin pings several machines and shows the current round-trip and status. PR: ports/45693 Submitted by: Jean-Yves Lefort <jylefort@brutele.be>
Diffstat (limited to 'net')
-rw-r--r--net/Makefile1
-rw-r--r--net/gkrellmmultiping2/Makefile39
-rw-r--r--net/gkrellmmultiping2/distinfo1
-rw-r--r--net/gkrellmmultiping2/files/patch-Makefile32
-rw-r--r--net/gkrellmmultiping2/files/patch-multiping.c19
-rw-r--r--net/gkrellmmultiping2/files/patch-pinger.c190
-rw-r--r--net/gkrellmmultiping2/pkg-descr7
-rw-r--r--net/gkrellmmultiping2/pkg-plist2
8 files changed, 291 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile
index eb2f1ba..40841e8 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -152,6 +152,7 @@
SUBDIR += gicq
SUBDIR += gini
SUBDIR += gkrellm_snmp
+ SUBDIR += gkrellmmultiping2
SUBDIR += gkrellmqst
SUBDIR += gkrellmwireless
SUBDIR += gnet
diff --git a/net/gkrellmmultiping2/Makefile b/net/gkrellmmultiping2/Makefile
new file mode 100644
index 0000000..3d67579
--- /dev/null
+++ b/net/gkrellmmultiping2/Makefile
@@ -0,0 +1,39 @@
+# New ports collection makefile for: gkrellmmultiping2
+# Date Created: 24 Nov 2002
+# Whom: Jean-Yves Lefort <jylefort@brutele.be>
+#
+# $FreeBSD$
+# $Id: Makefile,v 1.1.1.1 2002/11/24 23:19:28 jylefort Exp $
+#
+
+PORTNAME= gkrellmmultiping
+PORTVERSION= 2.0.3
+CATEGORIES= net
+MASTER_SITES= http://kmlinux.fjfi.cvut.cz/~makovick/gkrellm/
+DISTNAME= gkrellm-multiping-${PORTVERSION}
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= jylefort@brutele.be
+COMMENT= GKrellM multiping plugin
+
+BUILD_DEPENDS= ${X11BASE}/include/gkrellm2/gkrellm.h:${PORTSDIR}/sysutils/gkrellm2
+RUN_DEPENDS= gkrellm:${PORTSDIR}/sysutils/gkrellm2
+
+USE_X_PREFIX= yes
+USE_REINPLACE= yes
+
+MAKE_ENV+= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
+ PTHREAD_LIBS="${PTHREAD_LIBS}" \
+ MKDIR="${MKDIR}" \
+ CHMOD="${CHMOD}" \
+ INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
+ INSTALL_DATA="${INSTALL_DATA}"
+
+.include <bsd.port.pre.mk>
+
+post-patch:
+ ${REINPLACE_CMD} -e \
+ "s,@COMMAND@,${PREFIX}/libexec/gkrellm2/plugins/pinger," \
+ ${WRKSRC}/multiping.c
+
+.include <bsd.port.post.mk>
diff --git a/net/gkrellmmultiping2/distinfo b/net/gkrellmmultiping2/distinfo
new file mode 100644
index 0000000..2968fb8
--- /dev/null
+++ b/net/gkrellmmultiping2/distinfo
@@ -0,0 +1 @@
+MD5 (gkrellm-multiping-2.0.3.tgz) = ca50628c1a1ebc94274de9b933b39fa6
diff --git a/net/gkrellmmultiping2/files/patch-Makefile b/net/gkrellmmultiping2/files/patch-Makefile
new file mode 100644
index 0000000..8865ab1
--- /dev/null
+++ b/net/gkrellmmultiping2/files/patch-Makefile
@@ -0,0 +1,32 @@
+--- Makefile.orig Sun Nov 24 23:27:11 2002
++++ Makefile Sun Nov 24 23:34:49 2002
+@@ -1,4 +1,4 @@
+-INSTALLDIR = /usr/local/lib/gkrellm2/plugins
++INSTALLDIR = ${PREFIX}/libexec/gkrellm2/plugins
+ VERSION = 2.0.1
+ PKGNAME = gkrellm-multiping
+ #OPT = -march=athlon -O2
+@@ -8,7 +8,7 @@
+ all: pinger multiping.so
+
+ pinger: pinger.c
+- $(CC) `pkg-config glib-2.0 --cflags` $(OPT) -lpthread `pkg-config glib-2.0 --libs` -Wall -o pinger pinger.c
++ ${CC} `pkg-config glib-2.0 --cflags` ${OPT} ${PTHREAD_CFLAGS} ${PTHREAD_LIBS} `pkg-config glib-2.0 --libs` -Wall -o pinger pinger.c
+
+ multiping.o: multiping.c decal_multiping_status.xpm
+ $(CC) -Wall -fPIC -Wall `pkg-config gtk+-2.0 --cflags` $(OPT) -DVERSION=\"$(VERSION)\" -c multiping.c
+@@ -20,10 +20,10 @@
+ rm -f *.o *.so core
+
+ install: pinger multiping.so
+- install -d $(INSTALLDIR)
+- install -c -s -m 644 multiping.so $(INSTALLDIR)
+- install -c -s -m 4755 pinger $(INSTALLDIR)
+- echo "pinger helper is installed suid root"
++ ${MKDIR} ${INSTALLDIR}
++ ${INSTALL_DATA} multiping.so ${INSTALLDIR}
++ ${INSTALL_PROGRAM} pinger ${INSTALLDIR}
++ ${CHMOD} 4755 ${INSTALLDIR}/pinger
+
+ dist:
+ rm -rf $(PKGNAME)-$(VERSION)
diff --git a/net/gkrellmmultiping2/files/patch-multiping.c b/net/gkrellmmultiping2/files/patch-multiping.c
new file mode 100644
index 0000000..fb74b77
--- /dev/null
+++ b/net/gkrellmmultiping2/files/patch-multiping.c
@@ -0,0 +1,19 @@
+--- multiping.c.orig Mon Sep 1 06:40:12 2003
++++ multiping.c Mon Sep 8 00:19:31 2003
+@@ -21,6 +21,7 @@
+
+ #include <stdio.h>
+ #include <string.h>
++#include <signal.h>
+ #include <gkrellm2/gkrellm.h>
+ #include <sys/types.h>
+ #include <sys/wait.h>
+@@ -30,7 +31,7 @@
+ #define CONFIG_NAME "Multiping"
+ #define STYLE_NAME "multiping"
+
+-#define COMMAND "/usr/local/lib/gkrellm2/plugins/pinger"
++#define COMMAND "@COMMAND@"
+
+ static GkrellmMonitor *monitor;
+ static GkrellmPanel *panel;
diff --git a/net/gkrellmmultiping2/files/patch-pinger.c b/net/gkrellmmultiping2/files/patch-pinger.c
new file mode 100644
index 0000000..b78ad5b
--- /dev/null
+++ b/net/gkrellmmultiping2/files/patch-pinger.c
@@ -0,0 +1,190 @@
+--- pinger.c.orig Mon Sep 1 06:40:12 2003
++++ pinger.c Mon Sep 8 00:23:55 2003
+@@ -25,7 +25,9 @@
+ #include <sys/time.h>
+ #include <sys/types.h>
+ #include <sys/signal.h>
++#include <sys/types.h>
+
++#include <netinet/in_systm.h>
+ #include <netinet/in.h>
+ #include <netinet/ip.h>
+ #include <netinet/ip_icmp.h>
+@@ -34,6 +36,7 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <unistd.h>
+ #include <string.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+@@ -237,54 +240,54 @@
+ g_string_assign(s, "Echo Reply");
+ /* XXX ID + Seq + Data */
+ break;
+- case ICMP_DEST_UNREACH:
++ case ICMP_UNREACH:
+ switch (icp->icmp_code) {
+- case ICMP_NET_UNREACH:
++ case ICMP_UNREACH_NET:
+ g_string_assign(s, "Destination Net Unreachable");
+ break;
+- case ICMP_HOST_UNREACH:
++ case ICMP_UNREACH_HOST:
+ g_string_assign(s, "Destination Host Unreachable");
+ break;
+- case ICMP_PROT_UNREACH:
++ case ICMP_UNREACH_PROTOCOL:
+ g_string_assign(s, "Destination Protocol Unreachable");
+ break;
+- case ICMP_PORT_UNREACH:
++ case ICMP_UNREACH_PORT:
+ g_string_assign(s, "Destination Port Unreachable");
+ break;
+- case ICMP_FRAG_NEEDED:
++ case ICMP_UNREACH_NEEDFRAG:
+ g_string_assign(s, "Frag needed and DF set");
+ break;
+- case ICMP_SR_FAILED:
++ case ICMP_UNREACH_SRCFAIL:
+ g_string_assign(s, "Source Route Failed");
+ break;
+- case ICMP_NET_UNKNOWN:
++ case ICMP_UNREACH_NET_UNKNOWN:
+ g_string_assign(s, "Network Unknown");
+ break;
+- case ICMP_HOST_UNKNOWN:
++ case ICMP_UNREACH_HOST_UNKNOWN:
+ g_string_assign(s, "Host Unknown");
+ break;
+- case ICMP_HOST_ISOLATED:
++ case ICMP_UNREACH_ISOLATED:
+ g_string_assign(s, "Host Isolated");
+ break;
+- case ICMP_NET_UNR_TOS:
++ case ICMP_UNREACH_TOSNET:
+ g_string_assign(s,
+ "Destination Network Unreachable At This TOS");
+ break;
+- case ICMP_HOST_UNR_TOS:
++ case ICMP_UNREACH_TOSHOST:
+ g_string_assign(s, "Destination Host Unreachable At This TOS");
+ break;
+-#ifdef ICMP_PKT_FILTERED
+- case ICMP_PKT_FILTERED:
++#ifdef ICMP_UNREACH_FILTER_PROHIB
++ case ICMP_UNREACH_FILTER_PROHIB:
+ g_string_assign(s, "Packet Filtered");
+ break;
+ #endif
+-#ifdef ICMP_PREC_VIOLATION
+- case ICMP_PREC_VIOLATION:
++#ifdef ICMP_HOST_PRECEDENCE
++ case ICMP_HOST_PRECEDENCE:
+ g_string_assign(s, "Precedence Violation");
+ break;
+ #endif
+-#ifdef ICMP_PREC_CUTOFF
+- case ICMP_PREC_CUTOFF:
++#ifdef ICMP_PRECEDENCE_CUTOFF
++ case ICMP_PRECEDENCE_CUTOFF:
+ g_string_assign(s, "Precedence Cutoff");
+ break;
+ #endif
+@@ -294,21 +297,21 @@
+ break;
+ }
+ break;
+- case ICMP_SOURCE_QUENCH:
++ case ICMP_SOURCEQUENCH:
+ g_string_assign(s, "Source Quench");
+ break;
+ case ICMP_REDIRECT:
+ switch (icp->icmp_code) {
+- case ICMP_REDIR_NET:
++ case ICMP_REDIRECT_NET:
+ g_string_assign(s, "Redirect Network");
+ break;
+- case ICMP_REDIR_HOST:
++ case ICMP_REDIRECT_HOST:
+ g_string_assign(s, "Redirect Host");
+ break;
+- case ICMP_REDIR_NETTOS:
++ case ICMP_REDIRECT_TOSNET:
+ g_string_assign(s, "Redirect Type of Service and Network");
+ break;
+- case ICMP_REDIR_HOSTTOS:
++ case ICMP_REDIRECT_TOSHOST:
+ g_string_assign(s, "Redirect Type of Service and Host");
+ break;
+ default:
+@@ -322,12 +325,12 @@
+ g_string_assign(s, "Echo Request");
+ /* XXX ID + Seq + Data */
+ break;
+- case ICMP_TIME_EXCEEDED:
++ case ICMP_TIMXCEED:
+ switch (icp->icmp_code) {
+- case ICMP_EXC_TTL:
++ case ICMP_TIMXCEED_INTRANS:
+ g_string_assign(s, "Time to live exceeded");
+ break;
+- case ICMP_EXC_FRAGTIME:
++ case ICMP_TIMXCEED_REASS:
+ g_string_assign(s, "Frag reassembly time exceeded");
+ break;
+ default:
+@@ -336,23 +339,23 @@
+ break;
+ }
+ break;
+- case ICMP_PARAMETERPROB:
++ case ICMP_PARAMPROB:
+ g_string_sprintf(s, "Parameter problem: IP address = %s",
+ inet_ntoa(icp->icmp_gwaddr));
+ break;
+- case ICMP_TIMESTAMP:
++ case ICMP_TSTAMP:
+ g_string_assign(s, "Timestamp");
+ /* XXX ID + Seq + 3 timestamps */
+ break;
+- case ICMP_TIMESTAMPREPLY:
++ case ICMP_TSTAMPREPLY:
+ g_string_assign(s, "Timestamp Reply");
+ /* XXX ID + Seq + 3 timestamps */
+ break;
+- case ICMP_INFO_REQUEST:
++ case ICMP_IREQ:
+ g_string_assign(s, "Information Request");
+ /* XXX ID + Seq */
+ break;
+- case ICMP_INFO_REPLY:
++ case ICMP_IREQREPLY:
+ g_string_assign(s, "Information Reply");
+ /* XXX ID + Seq */
+ break;
+@@ -447,11 +450,11 @@
+ switch (icp->icmp_type) {
+ case ICMP_ECHO:
+ return;
+- case ICMP_SOURCE_QUENCH:
++ case ICMP_SOURCEQUENCH:
+ case ICMP_REDIRECT:
+- case ICMP_DEST_UNREACH:
+- case ICMP_TIME_EXCEEDED:
+- case ICMP_PARAMETERPROB:
++ case ICMP_UNREACH:
++ case ICMP_TIMXCEED:
++ case ICMP_PARAMPROB:
+ {
+ struct ip *iph = (struct ip *) (&icp->icmp_data);
+ struct icmp *icp1 =
+@@ -464,7 +467,7 @@
+ icp1->icmp_id != ident)
+ return;
+ error_pkt = (icp->icmp_type != ICMP_REDIRECT &&
+- icp->icmp_type != ICMP_SOURCE_QUENCH);
++ icp->icmp_type != ICMP_SOURCEQUENCH);
+
+ h = (host_data *) g_list_find_custom(hosts,
+ (int *) &icp1->
diff --git a/net/gkrellmmultiping2/pkg-descr b/net/gkrellmmultiping2/pkg-descr
new file mode 100644
index 0000000..f9dccab
--- /dev/null
+++ b/net/gkrellmmultiping2/pkg-descr
@@ -0,0 +1,7 @@
+This plugin pings several machines and shows the current
+round-trip and status.
+
+WWW: http://kmlinux.fjfi.cvut.cz/~makovick/gkrellm/
+
+- Jean-Yves Lefort
+jylefort@brutele.be
diff --git a/net/gkrellmmultiping2/pkg-plist b/net/gkrellmmultiping2/pkg-plist
new file mode 100644
index 0000000..2379104
--- /dev/null
+++ b/net/gkrellmmultiping2/pkg-plist
@@ -0,0 +1,2 @@
+libexec/gkrellm2/plugins/multiping.so
+libexec/gkrellm2/plugins/pinger
OpenPOWER on IntegriCloud