[arch-commits] Commit in iptraf-ng/repos (6 files)

Allan McRae allan at nymeria.archlinux.org
Fri May 31 04:57:49 UTC 2013


    Date: Friday, May 31, 2013 @ 06:57:49
  Author: allan
Revision: 186764

archrelease: copy trunk to staging-i686, staging-x86_64

Added:
  iptraf-ng/repos/staging-i686/
  iptraf-ng/repos/staging-i686/PKGBUILD
    (from rev 186763, iptraf-ng/trunk/PKGBUILD)
  iptraf-ng/repos/staging-i686/iptraf-ng-linux-3.5-compat.patch
    (from rev 186763, iptraf-ng/trunk/iptraf-ng-linux-3.5-compat.patch)
  iptraf-ng/repos/staging-x86_64/
  iptraf-ng/repos/staging-x86_64/PKGBUILD
    (from rev 186763, iptraf-ng/trunk/PKGBUILD)
  iptraf-ng/repos/staging-x86_64/iptraf-ng-linux-3.5-compat.patch
    (from rev 186763, iptraf-ng/trunk/iptraf-ng-linux-3.5-compat.patch)

-------------------------------------------------+
 staging-i686/PKGBUILD                           |   35 ++++++
 staging-i686/iptraf-ng-linux-3.5-compat.patch   |  127 ++++++++++++++++++++++
 staging-x86_64/PKGBUILD                         |   35 ++++++
 staging-x86_64/iptraf-ng-linux-3.5-compat.patch |  127 ++++++++++++++++++++++
 4 files changed, 324 insertions(+)

Copied: iptraf-ng/repos/staging-i686/PKGBUILD (from rev 186763, iptraf-ng/trunk/PKGBUILD)
===================================================================
--- staging-i686/PKGBUILD	                        (rev 0)
+++ staging-i686/PKGBUILD	2013-05-31 04:57:49 UTC (rev 186764)
@@ -0,0 +1,35 @@
+# $Id$
+# Maintainer: Ionut Biru <ibiru at archlinux.org>
+# Maintainer: sh0 <mee at sh0.org>
+
+pkgname=iptraf-ng
+pkgver=1.1.3.1
+pkgrel=2
+pkgdesc="A console-based network monitoring utility (a fork of original iptraf)"
+url="https://fedorahosted.org/iptraf-ng/"
+arch=('i686' 'x86_64')
+depends=('ncurses')
+license=('GPL2')
+replaces=('iptraf')
+options=('!libtool')
+source=(https://fedorahosted.org/releases/i/p/$pkgname/$pkgname-$pkgver.tar.gz
+        iptraf-ng-linux-3.5-compat.patch)
+md5sums=('1a2c02944b0b012d6a3de96207610fa2'
+         'd2ddee5f9ff485155235f7cb4671d8fb')
+
+prepare() {
+  cd "$pkgname-$pkgver"
+  patch -p1 -i ${srcdir}/iptraf-ng-linux-3.5-compat.patch
+}
+
+build() {
+  cd "$pkgname-$pkgver"
+  ./configure --prefix=/usr --sysconfdir=/etc \
+      --localstatedir=/var --sbindir=/usr/bin
+  make CFLAGS="$CFLAGS -std=gnu99"
+}
+
+package() {
+  cd "$pkgname-$pkgver"
+  make DESTDIR=$pkgdir install
+}

Copied: iptraf-ng/repos/staging-i686/iptraf-ng-linux-3.5-compat.patch (from rev 186763, iptraf-ng/trunk/iptraf-ng-linux-3.5-compat.patch)
===================================================================
--- staging-i686/iptraf-ng-linux-3.5-compat.patch	                        (rev 0)
+++ staging-i686/iptraf-ng-linux-3.5-compat.patch	2013-05-31 04:57:49 UTC (rev 186764)
@@ -0,0 +1,127 @@
+From 72512af1a3f1d55fff73cdfe7b63d9cfe8cc37ab Mon Sep 17 00:00:00 2001
+From: Nikola Pajkovsky <npajkovs at redhat.com>
+Date: Wed, 23 May 2012 16:32:27 +0200
+Subject: [PATCH 01/91] token-ring: kernel v3.5 kill off token-ring support
+
+Signed-off-by: Nikola Pajkovsky <npajkovs at redhat.com>
+---
+ src/hostmon.c          | 10 ----------
+ src/iptraf-ng-compat.h |  1 -
+ src/othptab.c          |  6 ------
+ src/packet.c           | 27 ---------------------------
+ src/tcptable.c         |  4 ----
+ 5 files changed, 48 deletions(-)
+
+diff --git a/src/hostmon.c b/src/hostmon.c
+index 40a2b95..72b91f8 100644
+--- a/src/hostmon.c
++++ b/src/hostmon.c
+@@ -1004,16 +1004,6 @@ void hostmon(const struct OPTIONS *options, time_t facilitytime, char *ifptr,
+ 				       FDDI_K_ALEN);
+ 				list = flist;
+ 				break; }
+-			case ARPHRD_IEEE802:
+-			case ARPHRD_IEEE802_TR: {
+-				struct trh_hdr *hdr_trh =
+-					(struct trh_hdr *)pkt.pkt_buf;
+-				memcpy(scratch_saddr, hdr_trh->saddr,
+-				       TR_ALEN);
+-				memcpy(scratch_daddr, hdr_trh->daddr,
+-				       TR_ALEN);
+-				list = flist;
+-				break; }
+ 			default:
+ 				/* unknown link protocol */
+ 				continue;
+diff --git a/src/iptraf-ng-compat.h b/src/iptraf-ng-compat.h
+index d5aee4a..2d9da96 100644
+--- a/src/iptraf-ng-compat.h
++++ b/src/iptraf-ng-compat.h
+@@ -39,7 +39,6 @@
+ #include <linux/if_ether.h>
+ #include <linux/if_packet.h>
+ #include <linux/if_fddi.h>
+-#include <linux/if_tr.h>
+ #include <linux/types.h>
+ #include <linux/isdn.h>
+ 
+diff --git a/src/othptab.c b/src/othptab.c
+index d12cdfd..1181eb1 100644
+--- a/src/othptab.c
++++ b/src/othptab.c
+@@ -193,12 +193,6 @@ struct othptabent *add_othp_entry(struct othptable *table, struct pkt_hdr *pkt,
+ 					      saddr), new_entry->smacaddr);
+ 			convmacaddr((char *) (((struct fddihdr *) packet)->
+ 					      daddr), new_entry->dmacaddr);
+-		} else if ((pkt->pkt_hatype == ARPHRD_IEEE802)
+-			   || (pkt->pkt_hatype == ARPHRD_IEEE802_TR)) {
+-			convmacaddr((char *) (((struct trh_hdr *) packet)->
+-					      saddr), new_entry->smacaddr);
+-			convmacaddr((char *) (((struct trh_hdr *) packet)->
+-					      daddr), new_entry->dmacaddr);
+ 		}
+ 	}
+ 
+diff --git a/src/packet.c b/src/packet.c
+index a43a27a..f3e4304 100644
+--- a/src/packet.c
++++ b/src/packet.c
+@@ -51,24 +51,6 @@ static int in_cksum(u_short * addr, int len)
+ 	return (u_short) (~sum);
+ }
+ 
+-static unsigned int get_tr_ip_offset(char *pkt)
+-{
+-	struct trh_hdr *trh;
+-	unsigned int riflen = 0;
+-
+-	trh = (struct trh_hdr *) pkt;
+-
+-	/*
+-	 * Check if this packet has TR routing information and get
+-	 * its length.
+-	 */
+-	if (trh->saddr[0] & TR_RII)
+-		riflen = (ntohs(trh->rcf) & TR_RCF_LEN_MASK) >> 8;
+-
+-	return sizeof(struct trh_hdr) - TR_MAXRIFLEN + riflen +
+-	    sizeof(struct trllc);
+-}
+-
+ static int packet_adjust(struct pkt_hdr *pkt)
+ {
+ 	int retval = 0;
+@@ -109,15 +91,6 @@ static int packet_adjust(struct pkt_hdr *pkt)
+ 		pkt->pkt_payload += sizeof(struct fddihdr);
+ 		pkt->pkt_len -= sizeof(struct fddihdr);
+ 		break;
+-	case ARPHRD_IEEE802_TR:
+-	case ARPHRD_IEEE802:
+-		pkt->pkt_payload = pkt->pkt_buf;
+-		/* Token Ring patch supplied by Tomas Dvorak */
+-		/* Get the start of the IP packet from the Token Ring frame. */
+-		unsigned int dataoffset = get_tr_ip_offset(pkt->pkt_payload);
+-		pkt->pkt_payload += dataoffset;
+-		pkt->pkt_len -= dataoffset;
+-		break;
+ 	default:
+ 		/* return a NULL packet to signal an unrecognized link */
+ 		/* protocol to the caller.  Hopefully, this switch statement */
+diff --git a/src/tcptable.c b/src/tcptable.c
+index 56c4780..b0e5ccc 100644
+--- a/src/tcptable.c
++++ b/src/tcptable.c
+@@ -620,10 +620,6 @@ void updateentry(struct tcptable *table, struct tcptableent *tableentry,
+ 		} else if (linkproto == ARPHRD_FDDI) {
+ 			convmacaddr((char *) (((struct fddihdr *) packet)->
+ 					      saddr), newmacaddr);
+-		} else if ((linkproto == ARPHRD_IEEE802)
+-			   || (linkproto == ARPHRD_IEEE802_TR)) {
+-			convmacaddr((char *) (((struct trh_hdr *) packet)->
+-					      saddr), newmacaddr);
+ 		}
+ 
+ 		if (tableentry->smacaddr[0] != '\0') {
+-- 
+1.8.3
+

Copied: iptraf-ng/repos/staging-x86_64/PKGBUILD (from rev 186763, iptraf-ng/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD	                        (rev 0)
+++ staging-x86_64/PKGBUILD	2013-05-31 04:57:49 UTC (rev 186764)
@@ -0,0 +1,35 @@
+# $Id$
+# Maintainer: Ionut Biru <ibiru at archlinux.org>
+# Maintainer: sh0 <mee at sh0.org>
+
+pkgname=iptraf-ng
+pkgver=1.1.3.1
+pkgrel=2
+pkgdesc="A console-based network monitoring utility (a fork of original iptraf)"
+url="https://fedorahosted.org/iptraf-ng/"
+arch=('i686' 'x86_64')
+depends=('ncurses')
+license=('GPL2')
+replaces=('iptraf')
+options=('!libtool')
+source=(https://fedorahosted.org/releases/i/p/$pkgname/$pkgname-$pkgver.tar.gz
+        iptraf-ng-linux-3.5-compat.patch)
+md5sums=('1a2c02944b0b012d6a3de96207610fa2'
+         'd2ddee5f9ff485155235f7cb4671d8fb')
+
+prepare() {
+  cd "$pkgname-$pkgver"
+  patch -p1 -i ${srcdir}/iptraf-ng-linux-3.5-compat.patch
+}
+
+build() {
+  cd "$pkgname-$pkgver"
+  ./configure --prefix=/usr --sysconfdir=/etc \
+      --localstatedir=/var --sbindir=/usr/bin
+  make CFLAGS="$CFLAGS -std=gnu99"
+}
+
+package() {
+  cd "$pkgname-$pkgver"
+  make DESTDIR=$pkgdir install
+}

Copied: iptraf-ng/repos/staging-x86_64/iptraf-ng-linux-3.5-compat.patch (from rev 186763, iptraf-ng/trunk/iptraf-ng-linux-3.5-compat.patch)
===================================================================
--- staging-x86_64/iptraf-ng-linux-3.5-compat.patch	                        (rev 0)
+++ staging-x86_64/iptraf-ng-linux-3.5-compat.patch	2013-05-31 04:57:49 UTC (rev 186764)
@@ -0,0 +1,127 @@
+From 72512af1a3f1d55fff73cdfe7b63d9cfe8cc37ab Mon Sep 17 00:00:00 2001
+From: Nikola Pajkovsky <npajkovs at redhat.com>
+Date: Wed, 23 May 2012 16:32:27 +0200
+Subject: [PATCH 01/91] token-ring: kernel v3.5 kill off token-ring support
+
+Signed-off-by: Nikola Pajkovsky <npajkovs at redhat.com>
+---
+ src/hostmon.c          | 10 ----------
+ src/iptraf-ng-compat.h |  1 -
+ src/othptab.c          |  6 ------
+ src/packet.c           | 27 ---------------------------
+ src/tcptable.c         |  4 ----
+ 5 files changed, 48 deletions(-)
+
+diff --git a/src/hostmon.c b/src/hostmon.c
+index 40a2b95..72b91f8 100644
+--- a/src/hostmon.c
++++ b/src/hostmon.c
+@@ -1004,16 +1004,6 @@ void hostmon(const struct OPTIONS *options, time_t facilitytime, char *ifptr,
+ 				       FDDI_K_ALEN);
+ 				list = flist;
+ 				break; }
+-			case ARPHRD_IEEE802:
+-			case ARPHRD_IEEE802_TR: {
+-				struct trh_hdr *hdr_trh =
+-					(struct trh_hdr *)pkt.pkt_buf;
+-				memcpy(scratch_saddr, hdr_trh->saddr,
+-				       TR_ALEN);
+-				memcpy(scratch_daddr, hdr_trh->daddr,
+-				       TR_ALEN);
+-				list = flist;
+-				break; }
+ 			default:
+ 				/* unknown link protocol */
+ 				continue;
+diff --git a/src/iptraf-ng-compat.h b/src/iptraf-ng-compat.h
+index d5aee4a..2d9da96 100644
+--- a/src/iptraf-ng-compat.h
++++ b/src/iptraf-ng-compat.h
+@@ -39,7 +39,6 @@
+ #include <linux/if_ether.h>
+ #include <linux/if_packet.h>
+ #include <linux/if_fddi.h>
+-#include <linux/if_tr.h>
+ #include <linux/types.h>
+ #include <linux/isdn.h>
+ 
+diff --git a/src/othptab.c b/src/othptab.c
+index d12cdfd..1181eb1 100644
+--- a/src/othptab.c
++++ b/src/othptab.c
+@@ -193,12 +193,6 @@ struct othptabent *add_othp_entry(struct othptable *table, struct pkt_hdr *pkt,
+ 					      saddr), new_entry->smacaddr);
+ 			convmacaddr((char *) (((struct fddihdr *) packet)->
+ 					      daddr), new_entry->dmacaddr);
+-		} else if ((pkt->pkt_hatype == ARPHRD_IEEE802)
+-			   || (pkt->pkt_hatype == ARPHRD_IEEE802_TR)) {
+-			convmacaddr((char *) (((struct trh_hdr *) packet)->
+-					      saddr), new_entry->smacaddr);
+-			convmacaddr((char *) (((struct trh_hdr *) packet)->
+-					      daddr), new_entry->dmacaddr);
+ 		}
+ 	}
+ 
+diff --git a/src/packet.c b/src/packet.c
+index a43a27a..f3e4304 100644
+--- a/src/packet.c
++++ b/src/packet.c
+@@ -51,24 +51,6 @@ static int in_cksum(u_short * addr, int len)
+ 	return (u_short) (~sum);
+ }
+ 
+-static unsigned int get_tr_ip_offset(char *pkt)
+-{
+-	struct trh_hdr *trh;
+-	unsigned int riflen = 0;
+-
+-	trh = (struct trh_hdr *) pkt;
+-
+-	/*
+-	 * Check if this packet has TR routing information and get
+-	 * its length.
+-	 */
+-	if (trh->saddr[0] & TR_RII)
+-		riflen = (ntohs(trh->rcf) & TR_RCF_LEN_MASK) >> 8;
+-
+-	return sizeof(struct trh_hdr) - TR_MAXRIFLEN + riflen +
+-	    sizeof(struct trllc);
+-}
+-
+ static int packet_adjust(struct pkt_hdr *pkt)
+ {
+ 	int retval = 0;
+@@ -109,15 +91,6 @@ static int packet_adjust(struct pkt_hdr *pkt)
+ 		pkt->pkt_payload += sizeof(struct fddihdr);
+ 		pkt->pkt_len -= sizeof(struct fddihdr);
+ 		break;
+-	case ARPHRD_IEEE802_TR:
+-	case ARPHRD_IEEE802:
+-		pkt->pkt_payload = pkt->pkt_buf;
+-		/* Token Ring patch supplied by Tomas Dvorak */
+-		/* Get the start of the IP packet from the Token Ring frame. */
+-		unsigned int dataoffset = get_tr_ip_offset(pkt->pkt_payload);
+-		pkt->pkt_payload += dataoffset;
+-		pkt->pkt_len -= dataoffset;
+-		break;
+ 	default:
+ 		/* return a NULL packet to signal an unrecognized link */
+ 		/* protocol to the caller.  Hopefully, this switch statement */
+diff --git a/src/tcptable.c b/src/tcptable.c
+index 56c4780..b0e5ccc 100644
+--- a/src/tcptable.c
++++ b/src/tcptable.c
+@@ -620,10 +620,6 @@ void updateentry(struct tcptable *table, struct tcptableent *tableentry,
+ 		} else if (linkproto == ARPHRD_FDDI) {
+ 			convmacaddr((char *) (((struct fddihdr *) packet)->
+ 					      saddr), newmacaddr);
+-		} else if ((linkproto == ARPHRD_IEEE802)
+-			   || (linkproto == ARPHRD_IEEE802_TR)) {
+-			convmacaddr((char *) (((struct trh_hdr *) packet)->
+-					      saddr), newmacaddr);
+ 		}
+ 
+ 		if (tableentry->smacaddr[0] != '\0') {
+-- 
+1.8.3
+




More information about the arch-commits mailing list