Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-commits
Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-commits@g.o
From: "Mike Frysinger (vapier)" <vapier@g.o>
Subject: gentoo-x86 commit in sys-apps/net-tools/files/1.60_p20071202044231: 0001-git-ignores.patch 0002-respect-normal-toolchain-envvars.patch 0003-libdir-needs-version.h.patch 0004-document-the-e-option.patch 0005-all-of-the-8-man-pages-are-administrator-not-pr.patch 0006-handle-just-raw-IP-info.patch 0007-prevent-overflows-in-interface-buffers.patch 0008-Mads-Martin-Joergensen-writes.patch 0009-Patch-by-pasi.valminen-hut.fi-to-fix-FQDN-handling-w.patch 0010-Patch-by-Tom-Duffy-tduffy-sun.com-to-teach-ifconfi.patch 0011-comabug-gmail.com-writes.patch
Date: Mon, 14 Apr 2008 05:07:40 +0000
vapier      08/04/14 05:07:40

  Added:                0001-git-ignores.patch
                        0002-respect-normal-toolchain-envvars.patch
                        0003-libdir-needs-version.h.patch
                        0004-document-the-e-option.patch
                        0005-all-of-the-8-man-pages-are-administrator-not-pr.patch
                        0006-handle-just-raw-IP-info.patch
                        0007-prevent-overflows-in-interface-buffers.patch
                        0008-Mads-Martin-Joergensen-writes.patch
                        0009-Patch-by-pasi.valminen-hut.fi-to-fix-FQDN-handling-w.patch
                        0010-Patch-by-Tom-Duffy-tduffy-sun.com-to-teach-ifconfi.patch
                        0011-comabug-gmail.com-writes.patch
  Log:
  New version based on current cvs.
  (Portage version: 2.2_pre5)
   (Signed Manifest commit)

Revision  Changes    Path
1.1                  sys-apps/net-tools/files/1.60_p20071202044231/0001-git-ignores.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/net-tools/files/1.60_p20071202044231/0001-git-ignores.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/net-tools/files/1.60_p20071202044231/0001-git-ignores.patch?rev=1.1&content-type=text/plain

Index: 0001-git-ignores.patch
===================================================================
From cc21d43a5991764a2dc2bfc5b22a19cec2f62180 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@g.o>
Date: Sun, 13 Apr 2008 23:57:55 -0400
Subject: [PATCH] git ignores

---
 .gitignore |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)
 create mode 100644 .gitignore

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..f011661
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,22 @@
+*.o
+
+/config.h
+/config.make
+/config.status
+
+/lib/libnet-tools.a
+
+/version.h
+
+/arp
+/hostname
+/ifconfig
+/ipmaddr
+/iptunnel
+/mii-tool
+/nameif
+/netstat
+/plipconfig
+/rarp
+/route
+/slattach
-- 
1.5.5




1.1                  sys-apps/net-tools/files/1.60_p20071202044231/0002-respect-normal-toolchain-envvars.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/net-tools/files/1.60_p20071202044231/0002-respect-normal-toolchain-envvars.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/net-tools/files/1.60_p20071202044231/0002-respect-normal-toolchain-envvars.patch?rev=1.1&content-type=text/plain

Index: 0002-respect-normal-toolchain-envvars.patch
===================================================================
From 8903f55c34c4f7a4bed25b7961717fdf4652704b Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@g.o>
Date: Sun, 13 Apr 2008 23:58:07 -0400
Subject: [PATCH] respect normal toolchain envvars

---
 Makefile |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/Makefile b/Makefile
index 8fcc55c..a2f0c77 100644
--- a/Makefile
+++ b/Makefile
@@ -88,10 +88,9 @@ endif
 
 # Compiler and Linker Options
 # You may need to uncomment and edit these if you are using libc5 and IPv6.
-COPTS = -D_GNU_SOURCE -O2 -Wall -g # -I/usr/inet6/include
-ifeq ($(origin LOPTS), undefined)
-LOPTS = 
-endif
+CFLAGS ?= -O2 -g
+CFLAGS += -Wall
+CPPFLAGS += -D_GNU_SOURCE
 RESLIB = # -L/usr/inet6/lib -linet6
 
 ifeq ($(HAVE_AFDECnet),1)
@@ -113,8 +112,8 @@ endif
 
 NET_LIB = $(NET_LIB_PATH)/lib$(NET_LIB_NAME).a
 
-CFLAGS	= $(COPTS) -I. -idirafter ./include/ -I$(NET_LIB_PATH)
-LDFLAGS	= $(LOPTS) -L$(NET_LIB_PATH)
+CPPFLAGS += -I. -idirafter ./include/ -I$(NET_LIB_PATH)
+LDFLAGS  += -L$(NET_LIB_PATH)
 
 SUBDIRS	= man/ $(NET_LIB_PATH)/
 
@@ -125,8 +124,6 @@ LD	= $(CC)
 
 NLIB	= -l$(NET_LIB_NAME)
 
-MDEFINES = COPTS='$(COPTS)' LOPTS='$(LOPTS)' TOPDIR='$(TOPDIR)'
-
 %.o:		%.c config.h version.h intl.h net-features.h $<
 		$(CC) $(CFLAGS) -c $<
 
@@ -176,13 +173,13 @@ $(NET_LIB):	config.h version.h intl.h libdir
 i18n.h:		i18ndir
 
 libdir:
-		@$(MAKE) -C $(NET_LIB_PATH) $(MDEFINES)
+		@$(MAKE) -C $(NET_LIB_PATH)
 
 i18ndir:
 		@$(MAKE) -C po
 
 subdirs:
-		@for i in $(SUBDIRS); do $(MAKE) -C $$i $(MDEFINES) ; done
+		@for i in $(SUBDIRS); do $(MAKE) -C $$i ; done
 
 ifconfig:	$(NET_LIB) ifconfig.o
 		$(CC) $(LDFLAGS) -o ifconfig ifconfig.o $(NLIB) $(RESLIB)
-- 
1.5.5




1.1                  sys-apps/net-tools/files/1.60_p20071202044231/0003-libdir-needs-version.h.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/net-tools/files/1.60_p20071202044231/0003-libdir-needs-version.h.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/net-tools/files/1.60_p20071202044231/0003-libdir-needs-version.h.patch?rev=1.1&content-type=text/plain

Index: 0003-libdir-needs-version.h.patch
===================================================================
From 396d2d99db901296449663782a7ea13b1d0d6b51 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@g.o>
Date: Mon, 14 Apr 2008 00:17:39 -0400
Subject: [PATCH] libdir needs version.h

---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index a2f0c77..382cbf2 100644
--- a/Makefile
+++ b/Makefile
@@ -172,7 +172,7 @@ $(NET_LIB):	config.h version.h intl.h libdir
 
 i18n.h:		i18ndir
 
-libdir:
+libdir:		version.h
 		@$(MAKE) -C $(NET_LIB_PATH)
 
 i18ndir:
-- 
1.5.5




1.1                  sys-apps/net-tools/files/1.60_p20071202044231/0004-document-the-e-option.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/net-tools/files/1.60_p20071202044231/0004-document-the-e-option.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/net-tools/files/1.60_p20071202044231/0004-document-the-e-option.patch?rev=1.1&content-type=text/plain

Index: 0004-document-the-e-option.patch
===================================================================
From ea596e184e45d3cb08fbb0f4269f9bcbf3256ed3 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@g.o>
Date: Mon, 14 Apr 2008 00:32:40 -0400
Subject: [PATCH] document the -e option

---
 arp.c           |    1 +
 man/en_US/arp.8 |    7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arp.c b/arp.c
index 4ee5c58..26ab326 100644
--- a/arp.c
+++ b/arp.c
@@ -630,6 +630,7 @@ static void usage(void)
     fprintf(stderr, _("  arp [-v]   [<HW>] [-i <if>] -Ds <host> <if> [netmask <nm>] pub          <-''-\n\n"));
     
     fprintf(stderr, _("        -a                       display (all) hosts in alternative (BSD) style\n"));
+    fprintf(stderr, _("        -e                       display (all) hosts in default (Linux) style\n"));
     fprintf(stderr, _("        -s, --set                set a new ARP entry\n"));
     fprintf(stderr, _("        -d, --delete             delete a specified entry\n"));
     fprintf(stderr, _("        -v, --verbose            be verbose\n"));
diff --git a/man/en_US/arp.8 b/man/en_US/arp.8
index 4d20ed3..281047d 100644
--- a/man/en_US/arp.8
+++ b/man/en_US/arp.8
@@ -8,7 +8,7 @@ arp \- manipulate the system ARP cache
 .IR type ] 
 .RB [ \-i
 .IR if ] 
-.RB [ \-a ] 
+.RB [ \-ae ]
 .RI [ hostname ]
 .PP
 .B arp 
@@ -115,7 +115,7 @@ Tell the user what is going on by being verbose.
 shows numerical addresses instead of trying to determine symbolic host, port
 or user names.
 .TP
-.B "\-H type, \-\-hw-type type"
+.B "\-H type, \-\-hw-type type, \-t type"
 When setting or reading the ARP cache, this optional parameter tells
 .B arp
 which class of entries it should check for.  The default value of
@@ -134,6 +134,9 @@ and
 .B \-a
 Use alternate BSD style output format (with no fixed columns).
 .TP
+.B \-e
+Use default Linux style output format (with fixed columns).
+.TP
 .B "\-D, \-\-use-device"
 Instead of a hw_addr, the given argument is the name of an interface. 
 .B arp
-- 
1.5.5




1.1                  sys-apps/net-tools/files/1.60_p20071202044231/0005-all-of-the-8-man-pages-are-administrator-not-pr.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/net-tools/files/1.60_p20071202044231/0005-all-of-the-8-man-pages-are-administrator-not-pr.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/net-tools/files/1.60_p20071202044231/0005-all-of-the-8-man-pages-are-administrator-not-pr.patch?rev=1.1&content-type=text/plain

Index: 0005-all-of-the-8-man-pages-are-administrator-not-pr.patch
===================================================================
From fbb893d0d1655fd514a55da22dccd28693e63031 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@g.o>
Date: Mon, 14 Apr 2008 00:35:00 -0400
Subject: [PATCH] all of the (8) man pages are "administrator" not "programmer" manpages

---
 man/en_US/arp.8      |    2 +-
 man/en_US/ifconfig.8 |    2 +-
 man/en_US/netstat.8  |    2 +-
 man/en_US/rarp.8     |    2 +-
 man/en_US/route.8    |    2 +-
 man/fr_FR/arp.8      |    2 +-
 man/fr_FR/ifconfig.8 |    2 +-
 man/fr_FR/netstat.8  |    2 +-
 man/fr_FR/rarp.8     |    2 +-
 man/fr_FR/route.8    |    2 +-
 10 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/man/en_US/arp.8 b/man/en_US/arp.8
index 281047d..93feb04 100644
--- a/man/en_US/arp.8
+++ b/man/en_US/arp.8
@@ -1,4 +1,4 @@
-.TH ARP 8 "2007-12-01" "net-tools" "Linux Programmer's Manual"
+.TH ARP 8 "2007-12-01" "net-tools" "Linux Administrator's Manual"
 .SH NAME
 arp \- manipulate the system ARP cache
 .SH SYNOPSIS
diff --git a/man/en_US/ifconfig.8 b/man/en_US/ifconfig.8
index 410677e..ac5c829 100644
--- a/man/en_US/ifconfig.8
+++ b/man/en_US/ifconfig.8
@@ -1,4 +1,4 @@
-.TH IFCONFIG 8 "2007-11-07" "net-tools" "Linux Programmer's Manual"
+.TH IFCONFIG 8 "2007-11-07" "net-tools" "Linux Administrator's Manual"
 .SH NAME
 ifconfig \- configure a network interface
 .SH SYNOPSIS
diff --git a/man/en_US/netstat.8 b/man/en_US/netstat.8
index 7a8a42c..e6be46b 100644
--- a/man/en_US/netstat.8
+++ b/man/en_US/netstat.8
@@ -8,7 +8,7 @@
 .\" Modified: Tuan Hoang tqhoang@... 
 .\"
 .\"
-.TH NETSTAT 8 "2007-12-02" "net-tools" "Linux Programmer's Manual"
+.TH NETSTAT 8 "2007-12-02" "net-tools" "Linux Administrator's Manual"
 
 .SH NAME
 netstat \- Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships
diff --git a/man/en_US/rarp.8 b/man/en_US/rarp.8
index 1186aa8..c450f13 100644
--- a/man/en_US/rarp.8
+++ b/man/en_US/rarp.8
@@ -1,4 +1,4 @@
-.TH RARP 8 "4 August 1997" "net-tools" "Linux Programmer's Manual"
+.TH RARP 8 "4 August 1997" "net-tools" "Linux Administrator's Manual"
 .SH NAME
 rarp \- manipulate the system RARP table
 .SH SYNOPSIS
diff --git a/man/en_US/route.8 b/man/en_US/route.8
index 6c06017..9aa4ff1 100644
--- a/man/en_US/route.8
+++ b/man/en_US/route.8
@@ -1,4 +1,4 @@
-.TH ROUTE 8 "02 October 2003" "net-tools" "Linux Programmer's Manual"
+.TH ROUTE 8 "02 October 2003" "net-tools" "Linux Administrator's Manual"
 .SH NAME
 route \- show / manipulate the IP routing table
 .SH SYNOPSIS
diff --git a/man/fr_FR/arp.8 b/man/fr_FR/arp.8
index b658aa5..50dbc99 100644
--- a/man/fr_FR/arp.8
+++ b/man/fr_FR/arp.8
@@ -1,4 +1,4 @@
-.TH ARP 8 "5 Jan 1999" "net-tools" "Linux Programmer's Manual"
+.TH ARP 8 "5 Jan 1999" "net-tools" "Linux Administrator's Manual"
 .SH NOM
 arp \- manipule la table ARP du syst�
 .SH SYNOPSIS
diff --git a/man/fr_FR/ifconfig.8 b/man/fr_FR/ifconfig.8
index af58e56..afed13a 100644
--- a/man/fr_FR/ifconfig.8
+++ b/man/fr_FR/ifconfig.8
@@ -1,4 +1,4 @@
-.TH IFCONFIG 8 "4 August 1997" "net-tools" "Linux Programmer's Manual"
+.TH IFCONFIG 8 "4 August 1997" "net-tools" "Linux Administrator's Manual"
 .SH NOM
 ifconfig \- configure une interface r�au
 .SH SYNOPSIS
diff --git a/man/fr_FR/netstat.8 b/man/fr_FR/netstat.8
index 5ec3721..d92fbcb 100644
--- a/man/fr_FR/netstat.8
+++ b/man/fr_FR/netstat.8
@@ -8,7 +8,7 @@
 .\" Modified: Tuan Hoang tuan@... 
 .\"
 .\"
-.TH NETSTAT 8 "2007-12-02" "net-tools" "Linux Programmer's Manual"
+.TH NETSTAT 8 "2007-12-02" "net-tools" "Linux Administrator's Manual"
 
 .SH NAME
 netstat \- Affiche les connexions r�au, les tables de routage, les
diff --git a/man/fr_FR/rarp.8 b/man/fr_FR/rarp.8
index 57a2281..1098c63 100644
--- a/man/fr_FR/rarp.8
+++ b/man/fr_FR/rarp.8
@@ -1,4 +1,4 @@
-.TH RARP 8 "4 Ao�97" "net-tools" "Linux Programmer's Manual"
+.TH RARP 8 "4 Ao�97" "net-tools" "Linux Administrator's Manual"
 .SH NOM
 rarp \- manipule la table syst� RARP
 .SH SYNOPSIS
diff --git a/man/fr_FR/route.8 b/man/fr_FR/route.8
index 9109e8d..bf9863c 100644
--- a/man/fr_FR/route.8
+++ b/man/fr_FR/route.8
@@ -1,4 +1,4 @@
-.TH ROUTE 8 "8 Ao�97" "net-tools" "Linux Programmer's Manual"
+.TH ROUTE 8 "8 Ao�97" "net-tools" "Linux Administrator's Manual"
 .SH NAME
 route \- affiche / manipule la table de routage IP
 .SH SYNOPSIS
-- 
1.5.5




1.1                  sys-apps/net-tools/files/1.60_p20071202044231/0006-handle-just-raw-IP-info.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/net-tools/files/1.60_p20071202044231/0006-handle-just-raw-IP-info.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/net-tools/files/1.60_p20071202044231/0006-handle-just-raw-IP-info.patch?rev=1.1&content-type=text/plain

Index: 0006-handle-just-raw-IP-info.patch
===================================================================
From b7171f3e8a16766e1543e3e3ca797371466cbf87 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@g.o>
Date: Mon, 14 Apr 2008 00:35:59 -0400
Subject: [PATCH] handle just raw "IP" info

---
 lib/masq_info.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lib/masq_info.c b/lib/masq_info.c
index 45ca689..93eb04f 100644
--- a/lib/masq_info.c
+++ b/lib/masq_info.c
@@ -119,7 +119,9 @@ static int read_masqinfo(FILE * f, struct masq *mslist, int nmslist)
 	ms->src.sin_family = AF_INET;
 	ms->dst.sin_family = AF_INET;
 
-	if (strcmp("TCP", buf) == 0)
+	if (strcmp("IP", buf) == 0)
+	    ms->proto = "ip";
+	else if (strcmp("TCP", buf) == 0)
 	    ms->proto = "tcp";
 	else if (strcmp("UDP", buf) == 0)
 	    ms->proto = "udp";
-- 
1.5.5




1.1                  sys-apps/net-tools/files/1.60_p20071202044231/0007-prevent-overflows-in-interface-buffers.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/net-tools/files/1.60_p20071202044231/0007-prevent-overflows-in-interface-buffers.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/net-tools/files/1.60_p20071202044231/0007-prevent-overflows-in-interface-buffers.patch?rev=1.1&content-type=text/plain

Index: 0007-prevent-overflows-in-interface-buffers.patch
===================================================================
From bef310c8274c7df6e004ae0e927e0d757a85c586 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@g.o>
Date: Mon, 14 Apr 2008 00:39:09 -0400
Subject: [PATCH] prevent overflows in interface buffers

---
 netstat.c |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/netstat.c b/netstat.c
index dcd1f8a..8057d78 100644
--- a/netstat.c
+++ b/netstat.c
@@ -784,7 +784,8 @@ static void tcp_do_one(int lnr, const char *line)
 	    local_addr[22 - strlen(buffer)] = '\0';
 
 	strcat(local_addr, ":");
-	strcat(local_addr, buffer);
+	strncat(local_addr, buffer, sizeof(local_addr));
+	local_addr[sizeof(local_addr)-1] = 0;
 	snprintf(buffer, sizeof(buffer), "%s",
 		 get_sname(htons(rem_port), "tcp", flag_not & FLAG_NUM_PORT));
 
@@ -792,7 +793,8 @@ static void tcp_do_one(int lnr, const char *line)
 	    rem_addr[22 - strlen(buffer)] = '\0';
 
 	strcat(rem_addr, ":");
-	strcat(rem_addr, buffer);
+	strncat(rem_addr, buffer, sizeof(rem_addr));
+	rem_addr[sizeof(rem_addr)-1] = 0;
 	timers[0] = '\0';
 
 	if (flag_opt)
@@ -936,7 +938,8 @@ static void udp_do_one(int lnr, const char *line)
 	if ((strlen(local_addr) + strlen(buffer)) > 22)
 	    local_addr[22 - strlen(buffer)] = '\0';
 	strcat(local_addr, ":");
-	strcat(local_addr, buffer);
+	strncat(local_addr, buffer, sizeof(local_addr));
+	local_addr[sizeof(local_addr)-1] = 0;
 
 	snprintf(buffer, sizeof(buffer), "%s",
 		 get_sname(htons(rem_port), "udp", flag_not & FLAG_NUM_PORT));
@@ -945,7 +948,8 @@ static void udp_do_one(int lnr, const char *line)
 	if ((strlen(rem_addr) + strlen(buffer)) > 22)
 	    rem_addr[22 - strlen(buffer)] = '\0';
 	strcat(rem_addr, ":");
-	strcat(rem_addr, buffer);
+	strncat(rem_addr, buffer, sizeof(rem_addr));
+	rem_addr[sizeof(rem_addr)-1] = 0;
 
 	timers[0] = '\0';
 	if (flag_opt)
@@ -1058,7 +1062,8 @@ static void raw_do_one(int lnr, const char *line)
 	if ((strlen(local_addr) + strlen(buffer)) > 22)
 	    local_addr[22 - strlen(buffer)] = '\0';
 	strcat(local_addr, ":");
-	strcat(local_addr, buffer);
+	strncat(local_addr, buffer, sizeof(local_addr));
+	local_addr[sizeof(local_addr)-1] = 0;
 
 	snprintf(buffer, sizeof(buffer), "%s",
 		 get_sname(htons(rem_port), "raw", flag_not & FLAG_NUM_PORT));
@@ -1067,7 +1072,8 @@ static void raw_do_one(int lnr, const char *line)
 	if ((strlen(rem_addr) + strlen(buffer)) > 22)
 	    rem_addr[22 - strlen(buffer)] = '\0';
 	strcat(rem_addr, ":");
-	strcat(rem_addr, buffer);
+	strncat(rem_addr, buffer, sizeof(rem_addr));
+	rem_addr[sizeof(rem_addr)-1] = 0;
 
 	timers[0] = '\0';
 	if (flag_opt)
-- 
1.5.5




1.1                  sys-apps/net-tools/files/1.60_p20071202044231/0008-Mads-Martin-Joergensen-writes.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/net-tools/files/1.60_p20071202044231/0008-Mads-Martin-Joergensen-writes.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/net-tools/files/1.60_p20071202044231/0008-Mads-Martin-Joergensen-writes.patch?rev=1.1&content-type=text/plain

Index: 0008-Mads-Martin-Joergensen-writes.patch
===================================================================
From fcfb7fa902fcfc23e9fe78bb57748c110b972029 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@g.o>
Date: Mon, 14 Apr 2008 00:39:50 -0400
Subject: [PATCH] Mads Martin Joergensen writes:
 According to the manual the option "--numeric-ports" should not
 affect host resolution, but it does. All connected hosts are displayed
 with numeric values instead of their FQDN.

http://bugs.gentoo.org/76756
---
 netstat.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/netstat.c b/netstat.c
index 8057d78..843c06b 100644
--- a/netstat.c
+++ b/netstat.c
@@ -772,8 +772,8 @@ static void tcp_do_one(int lnr, const char *line)
 	txq = 0L;
     }
     safe_strncpy(local_addr, ap->sprint((struct sockaddr *) &localaddr, 
-					flag_not), sizeof(local_addr));
-    safe_strncpy(rem_addr, ap->sprint((struct sockaddr *) &remaddr, flag_not),
+					flag_not & FLAG_NUM_HOST), sizeof(local_addr));
+    safe_strncpy(rem_addr, ap->sprint((struct sockaddr *) &remaddr, flag_not & FLAG_NUM_HOST),
 		 sizeof(rem_addr));
     if (flag_all || (flag_lst && !rem_port) || (!flag_lst && rem_port)) {
 	snprintf(buffer, sizeof(buffer), "%s",
@@ -931,7 +931,7 @@ static void udp_do_one(int lnr, const char *line)
     if (flag_all || (notnull(remaddr) && !flag_lst) || (!notnull(remaddr) && flag_lst))
     {
         safe_strncpy(local_addr, ap->sprint((struct sockaddr *) &localaddr, 
-					    flag_not), sizeof(local_addr));
+					    flag_not & FLAG_NUM_HOST), sizeof(local_addr));
 	snprintf(buffer, sizeof(buffer), "%s",
 		 get_sname(htons(local_port), "udp",
 			   flag_not & FLAG_NUM_PORT));
@@ -944,7 +944,7 @@ static void udp_do_one(int lnr, const char *line)
 	snprintf(buffer, sizeof(buffer), "%s",
 		 get_sname(htons(rem_port), "udp", flag_not & FLAG_NUM_PORT));
         safe_strncpy(rem_addr, ap->sprint((struct sockaddr *) &remaddr, 
-					  flag_not), sizeof(rem_addr));
+					  flag_not & FLAG_NUM_HOST), sizeof(rem_addr));
 	if ((strlen(rem_addr) + strlen(buffer)) > 22)
 	    rem_addr[22 - strlen(buffer)] = '\0';
 	strcat(rem_addr, ":");
@@ -1058,7 +1058,7 @@ static void raw_do_one(int lnr, const char *line)
 		 get_sname(htons(local_port), "raw",
 			   flag_not & FLAG_NUM_PORT));
         safe_strncpy(local_addr, ap->sprint((struct sockaddr *) &localaddr, 
-					    flag_not), sizeof(local_addr));
+					    flag_not & FLAG_NUM_HOST), sizeof(local_addr));
 	if ((strlen(local_addr) + strlen(buffer)) > 22)
 	    local_addr[22 - strlen(buffer)] = '\0';
 	strcat(local_addr, ":");
@@ -1068,7 +1068,7 @@ static void raw_do_one(int lnr, const char *line)
 	snprintf(buffer, sizeof(buffer), "%s",
 		 get_sname(htons(rem_port), "raw", flag_not & FLAG_NUM_PORT));
         safe_strncpy(rem_addr, ap->sprint((struct sockaddr *) &remaddr, 
-					  flag_not), sizeof(rem_addr));
+					  flag_not & FLAG_NUM_HOST), sizeof(rem_addr));
 	if ((strlen(rem_addr) + strlen(buffer)) > 22)
 	    rem_addr[22 - strlen(buffer)] = '\0';
 	strcat(rem_addr, ":");
-- 
1.5.5




1.1                  sys-apps/net-tools/files/1.60_p20071202044231/0009-Patch-by-pasi.valminen-hut.fi-to-fix-FQDN-handling-w.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/net-tools/files/1.60_p20071202044231/0009-Patch-by-pasi.valminen-hut.fi-to-fix-FQDN-handling-w.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/net-tools/files/1.60_p20071202044231/0009-Patch-by-pasi.valminen-hut.fi-to-fix-FQDN-handling-w.patch?rev=1.1&content-type=text/plain

Index: 0009-Patch-by-pasi.valminen-hut.fi-to-fix-FQDN-handling-w.patch
===================================================================
From d894c8c42415fb8e5148dc0ba073078acb99a607 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@g.o>
Date: Mon, 14 Apr 2008 00:40:29 -0400
Subject: [PATCH] Patch by pasi.valminen@... to fix FQDN handling with AAAA records

http://bugs.gentoo.org/42650
---
 hostname.c |   71 +++++++++++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 61 insertions(+), 10 deletions(-)

diff --git a/hostname.c b/hostname.c
index c4c5aa0..e8ed156 100644
--- a/hostname.c
+++ b/hostname.c
@@ -36,6 +36,10 @@
 #include <getopt.h>
 #include <string.h>
 #include <netdb.h>
+#ifdef IPV6
+#include <sys/socket.h> /* for PF_INET6 */
+#include <sys/types.h>  /* for inet_ntop */
+#endif /* IPV6 */
 #include <errno.h>
 #include <sys/param.h>
 #include <netinet/in.h>
@@ -125,15 +129,23 @@ static void setdname(char *dname)
 static void showhname(char *hname, int c)
 {
     struct hostent *hp;
+#ifdef IPV6
+    struct in6_addr **ip6;
+#endif /* IPV6 */
     register char *p, **alias;
     struct in_addr **ip;
 
     if (opt_v)
 	fprintf(stderr, _("Resolving `%s' ...\n"), hname);
-    if (!(hp = gethostbyname(hname))) {
+    if (
+#ifdef IPV6
+        !(hp = gethostbyname2(hname, PF_INET6)) && 
+#endif /* IPV6 */
+        !(hp = gethostbyname(hname))) {
 	herror(program_name);
 	exit(1);
     }
+
     if (opt_v) {
 	fprintf(stderr, _("Result: h_name=`%s'\n"),
 		hp->h_name);
@@ -142,11 +154,28 @@ static void showhname(char *hname, int c)
 	while (alias[0])
 	    fprintf(stderr, _("Result: h_aliases=`%s'\n"),
 		    *alias++);
-
-	ip = (struct in_addr **) hp->h_addr_list;
-	while (ip[0])
-	    fprintf(stderr, _("Result: h_addr_list=`%s'\n"),
-		    inet_ntoa(**ip++));
+#ifdef IPV6
+        if(hp->h_addrtype == PF_INET6) {
+            char addr[INET6_ADDRSTRLEN + 1];
+	    addr[INET6_ADDRSTRLEN] = '\0';
+            ip6 = (struct in6_addr **) hp->h_addr_list;
+            while(ip6[0]) {
+                if(inet_ntop(PF_INET6, *ip6++, addr, INET6_ADDRSTRLEN))
+                    fprintf(stderr, _("Result: h_addr_list=`%s'\n"), addr);
+                else if(errno == EAFNOSUPPORT)
+                    fprintf(stderr, _("%s: protocol family not supported\n"),
+                            program_name);
+                else if(errno == ENOSPC)
+                    fprintf(stderr, _("%s: name too long\n"), program_name);
+            }
+        } else 
+#endif /* IPV6 */
+	{
+	    ip = (struct in_addr **) hp->h_addr_list;
+	    while (ip[0])
+	        fprintf(stderr, _("Result: h_addr_list=`%s'\n"),
+		        inet_ntoa(**ip++));
+        }
     }
     if (!(p = strchr(hp->h_name, '.')) && (c == 'd'))
 	return;
@@ -158,10 +187,32 @@ static void showhname(char *hname, int c)
 	printf("\n");
 	break;
     case 'i':
-	while (hp->h_addr_list[0])
-	    printf("%s ", inet_ntoa(*(struct in_addr *) *hp->h_addr_list++));
-	printf("\n");
-	break;
+#ifdef IPV6
+        if(hp->h_addrtype == PF_INET6) {
+            char addr[INET6_ADDRSTRLEN + 1];
+            addr[INET6_ADDRSTRLEN] = '\0';
+            while(hp->h_addr_list[0]) {
+                if(inet_ntop(PF_INET6, (struct in6_addr *)*hp->h_addr_list++,
+                             addr, INET6_ADDRSTRLEN))
+                    printf("%s ", addr);
+                else if(errno == EAFNOSUPPORT) {
+                    fprintf(stderr, _("\n%s: protocol family not supported\n"),
+                            program_name);
+                    exit(1);
+                } else if(errno == ENOSPC) {
+                    fprintf(stderr, _("\n%s: name too long\n"), program_name);
+                    exit(1);
+                }
+                printf("\n");
+            }
+        } else
+#endif /* IPV6 */
+        {
+	    while (hp->h_addr_list[0])
+	        printf("%s ", inet_ntoa(*(struct in_addr *)*hp->h_addr_list++));
+            printf("\n");
+        }
+        break;
     case 'd':
 	printf("%s\n", ++p);
 	break;
-- 
1.5.5




1.1                  sys-apps/net-tools/files/1.60_p20071202044231/0010-Patch-by-Tom-Duffy-tduffy-sun.com-to-teach-ifconfi.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/net-tools/files/1.60_p20071202044231/0010-Patch-by-Tom-Duffy-tduffy-sun.com-to-teach-ifconfi.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/net-tools/files/1.60_p20071202044231/0010-Patch-by-Tom-Duffy-tduffy-sun.com-to-teach-ifconfi.patch?rev=1.1&content-type=text/plain

Index: 0010-Patch-by-Tom-Duffy-tduffy-sun.com-to-teach-ifconfi.patch
===================================================================
From 9fb2c65b56df96c7bc9538c2b40028df0a1a3255 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@g.o>
Date: Mon, 14 Apr 2008 00:42:18 -0400
Subject: [PATCH] Patch by Tom Duffy <tduffy@...> to teach ifconfig about infiniband

http://bugs.gentoo.org/81180
---
 config.in    |    1 +
 lib/Makefile |    2 +-
 lib/hw.c     |    8 +++
 lib/ib.c     |  147 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 157 insertions(+), 1 deletions(-)
 create mode 100644 lib/ib.c

diff --git a/config.in b/config.in
index 2999cd1..da09827 100644
--- a/config.in
+++ b/config.in
@@ -83,6 +83,7 @@ bool '(Cisco)-HDLC/LAPB support' HAVE_HWHDLCLAPB y
 bool 'IrDA support' HAVE_HWIRDA y
 bool 'Econet hardware support' HAVE_HWEC y
 bool 'Generic EUI-64 hardware support' HAVE_HWEUI64 y
+bool 'InfiniBand hardware support' HAVE_HWIB y
 
 *
 *
diff --git a/lib/Makefile b/lib/Makefile
index f4b5cbd..976ebb8 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -16,7 +16,7 @@
 #
 
 
-HWOBJS	 = hw.o loopback.o slip.o ether.o ax25.o ppp.o arcnet.o tr.o tunnel.o frame.o sit.o rose.o ash.o fddi.o hippi.o hdlclapb.o strip.o irda.o ec_hw.o x25.o eui64.o
+HWOBJS	 = hw.o loopback.o slip.o ether.o ax25.o ppp.o arcnet.o tr.o tunnel.o frame.o sit.o rose.o ash.o fddi.o hippi.o hdlclapb.o strip.o irda.o ec_hw.o x25.o eui64.o ib.o
 AFOBJS	 = unix.o inet.o inet6.o ax25.o ipx.o ddp.o ipx.o netrom.o af.o rose.o econet.o x25.o
 AFGROBJS = inet_gr.o inet6_gr.o ipx_gr.o ddp_gr.o netrom_gr.o ax25_gr.o rose_gr.o getroute.o x25_gr.o
 AFSROBJS = inet_sr.o inet6_sr.o netrom_sr.o ipx_sr.o setroute.o x25_sr.o
diff --git a/lib/hw.c b/lib/hw.c
index c714313..fd6ea76 100644
--- a/lib/hw.c
+++ b/lib/hw.c
@@ -75,6 +75,8 @@ extern struct hwtype ec_hwtype;
 
 extern struct hwtype eui64_hwtype;
 
+extern struct hwtype ib_hwtype;
+
 static struct hwtype *hwtypes[] =
 {
 
@@ -149,6 +151,9 @@ static struct hwtype *hwtypes[] =
 #if HAVE_HWEUI64
     &eui64_hwtype,
 #endif
+#if HAVE_HWIB
+    &ib_hwtype,
+#endif
     &unspec_hwtype,
     NULL
 };
@@ -225,6 +230,9 @@ void hwinit()
 #if HAVE_HWEUI64
     eui64_hwtype.title = _("Generic EUI-64");
 #endif
+#if HAVE_HWIB
+    ib_hwtype.title = _("InfiniBand");
+#endif
     sVhwinit = 1;
 }
 
diff --git a/lib/ib.c b/lib/ib.c
new file mode 100644
index 0000000..aa3d8f9
--- /dev/null
+++ b/lib/ib.c
@@ -0,0 +1,147 @@
+/*
+ * lib/ib.c        This file contains an implementation of the "Infiniband"
+ *              support functions.
+ *
+ * Version:     $Id: 0010-Patch-by-Tom-Duffy-tduffy-sun.com-to-teach-ifconfi.patch,v 1.1 2008/04/14 05:07:39 vapier Exp $
+ *
+ * Author:      Fred N. van Kempen, <waltje@...>
+ *              Copyright 1993 MicroWalt Corporation
+ *		Tom Duffy <tduffy@...>
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include "config.h"
+
+#if HAVE_HWIB
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <net/if_arp.h>
+#include <linux/if_infiniband.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <ctype.h>
+#include <string.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+#include "util.h"
+
+extern struct hwtype ib_hwtype;
+
+
+/* Display an InfiniBand address in readable format. */
+static char *pr_ib(unsigned char *ptr)
+{
+    static char buff[128];
+    char *pos;
+    unsigned int i;
+
+    pos = buff;
+    for (i = 0; i < INFINIBAND_ALEN; i++) {
+	pos += sprintf(pos, "%02X:", (*ptr++ & 0377));
+    }
+    buff[strlen(buff) - 1] = '\0';
+
+    /* snprintf(buff, sizeof(buff), "%02X:%02X:%02X:%02X:%02X:%02X",
+	     (ptr[0] & 0377), (ptr[1] & 0377), (ptr[2] & 0377),
+	     (ptr[3] & 0377), (ptr[4] & 0377), (ptr[5] & 0377)
+	);
+    */
+    return (buff);
+}
+
+
+/* Input an Infiniband address and convert to binary. */
+static int in_ib(char *bufp, struct sockaddr *sap)
+{
+    unsigned char *ptr;
+    char c, *orig;
+    int i;
+    unsigned val;
+
+    sap->sa_family = ib_hwtype.type;
+    ptr = sap->sa_data;
+
+    i = 0;
+    orig = bufp;
+    while ((*bufp != '\0') && (i < INFINIBAND_ALEN)) {
+	val = 0;
+	c = *bufp++;
+	if (isdigit(c))
+	    val = c - '0';
+	else if (c >= 'a' && c <= 'f')
+	    val = c - 'a' + 10;
+	else if (c >= 'A' && c <= 'F')
+	    val = c - 'A' + 10;
+	else {
+#ifdef DEBUG
+	    fprintf(stderr, _("in_ib(%s): invalid infiniband address!\n"), orig);
+#endif
+	    errno = EINVAL;
+	    return (-1);
+	}
+	val <<= 4;
+	c = *bufp;
+	if (isdigit(c))
+	    val |= c - '0';
+	else if (c >= 'a' && c <= 'f')
+	    val |= c - 'a' + 10;
+	else if (c >= 'A' && c <= 'F')
+	    val |= c - 'A' + 10;
+	else if (c == ':' || c == 0)
+	    val >>= 4;
+	else {
+#ifdef DEBUG
+	    fprintf(stderr, _("in_ib(%s): invalid infiniband address!\n"), orig);
+#endif
+	    errno = EINVAL;
+	    return (-1);
+	}
+	if (c != 0)
+	    bufp++;
+	*ptr++ = (unsigned char) (val & 0377);
+	i++;
+
+	/* We might get a semicolon here - not required. */
+	if (*bufp == ':') {
+	    if (i == INFINIBAND_ALEN) {
+#ifdef DEBUG
+		fprintf(stderr, _("in_ib(%s): trailing : ignored!\n"),
+			orig)
+#endif
+		    ;		/* nothing */
+	    }
+	    bufp++;
+	}
+    }
+
+    /* That's it.  Any trailing junk? */
+    if ((i == INFINIBAND_ALEN) && (*bufp != '\0')) {
+#ifdef DEBUG
+	fprintf(stderr, _("in_ib(%s): trailing junk!\n"), orig);
+	errno = EINVAL;
+	return (-1);
+#endif
+    }
+#ifdef DEBUG
+    fprintf(stderr, "in_ib(%s): %s\n", orig, pr_ib(sap->sa_data));
+#endif
+
+    return (0);
+}
+
+
+struct hwtype ib_hwtype =
+{
+    "infiniband", NULL, ARPHRD_INFINIBAND, INFINIBAND_ALEN,
+    pr_ib, in_ib, NULL
+};
+
+
+#endif				/* HAVE_HWETHER */
-- 
1.5.5




1.1                  sys-apps/net-tools/files/1.60_p20071202044231/0011-comabug-gmail.com-writes.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/net-tools/files/1.60_p20071202044231/0011-comabug-gmail.com-writes.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/net-tools/files/1.60_p20071202044231/0011-comabug-gmail.com-writes.patch?rev=1.1&content-type=text/plain

Index: 0011-comabug-gmail.com-writes.patch
===================================================================
From b1c72a13d07b59fc67a7b338fa3969b96af7e67d Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@g.o>
Date: Mon, 14 Apr 2008 00:47:37 -0400
Subject: [PATCH] comabug@... writes:

net-tools' netstat should have a -W flag like FreeBSD.
There is currently no way to get the full hostname from netstat
for local/remote hostnames.

http://bugs.gentoo.org/53731
---
 man/en_US/netstat.8 |    3 +++
 netstat.c           |   20 +++++++++++++-------
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/man/en_US/netstat.8 b/man/en_US/netstat.8
index e6be46b..9a3ff44 100644
--- a/man/en_US/netstat.8
+++ b/man/en_US/netstat.8
@@ -24,6 +24,7 @@ netstat \- Print network connections, routing tables, interface statistics, masq
 .RB [ \-\-all | \-a ]
 .RB [ \-\-numeric | \-n ]
 .RB [ \-\-numeric-hosts "] [" \-\-numeric-ports "] [" \-\-numeric-users ]
+.RB [ \-\-wide | \-W]
 .RB [ \-\-symbolic | \-N ]
 .RB [ \-\-extend | \-e  [ \-\-extend | \-e] ]
 .RB [ \-\-timers | \-o ]
@@ -130,6 +131,8 @@ host or user names.
 .SS "\-\-numeric-users"
 shows numerical user IDs but does not affect the resolution of host or
 port names.
+.SS "\-\-wide , \-W"
+Don't truncate host names.
 
 .SS "\-\-protocol=\fIfamily \fR, \fB\-A"
 Specifies the address families (perhaps better described as low level
diff --git a/netstat.c b/netstat.c
index 843c06b..78bf551 100644
--- a/netstat.c
+++ b/netstat.c
@@ -150,6 +150,7 @@ int flag_exp = 1;
 int flag_prg = 0;
 int flag_arg = 0;
 int flag_ver = 0;
+int flag_wid = 0;
 
 FILE *procinfo;
 
@@ -780,7 +781,7 @@ static void tcp_do_one(int lnr, const char *line)
 		 get_sname(htons(local_port), "tcp",
 			   flag_not & FLAG_NUM_PORT));
 
-	if ((strlen(local_addr) + strlen(buffer)) > 22)
+	if (!flag_wid && ((strlen(local_addr) + strlen(buffer)) > 22))
 	    local_addr[22 - strlen(buffer)] = '\0';
 
 	strcat(local_addr, ":");
@@ -789,7 +790,7 @@ static void tcp_do_one(int lnr, const char *line)
 	snprintf(buffer, sizeof(buffer), "%s",
 		 get_sname(htons(rem_port), "tcp", flag_not & FLAG_NUM_PORT));
 
-	if ((strlen(rem_addr) + strlen(buffer)) > 22)
+	if (!flag_wid && ((strlen(rem_addr) + strlen(buffer)) > 22))
 	    rem_addr[22 - strlen(buffer)] = '\0';
 
 	strcat(rem_addr, ":");
@@ -935,7 +936,7 @@ static void udp_do_one(int lnr, const char *line)
 	snprintf(buffer, sizeof(buffer), "%s",
 		 get_sname(htons(local_port), "udp",
 			   flag_not & FLAG_NUM_PORT));
-	if ((strlen(local_addr) + strlen(buffer)) > 22)
+	if (!flag_wid && ((strlen(local_addr) + strlen(buffer)) > 22))
 	    local_addr[22 - strlen(buffer)] = '\0';
 	strcat(local_addr, ":");
 	strncat(local_addr, buffer, sizeof(local_addr));
@@ -945,7 +946,7 @@ static void udp_do_one(int lnr, const char *line)
 		 get_sname(htons(rem_port), "udp", flag_not & FLAG_NUM_PORT));
         safe_strncpy(rem_addr, ap->sprint((struct sockaddr *) &remaddr, 
 					  flag_not & FLAG_NUM_HOST), sizeof(rem_addr));
-	if ((strlen(rem_addr) + strlen(buffer)) > 22)
+	if (!flag_wid && ((strlen(rem_addr) + strlen(buffer)) > 22))
 	    rem_addr[22 - strlen(buffer)] = '\0';
 	strcat(rem_addr, ":");
 	strncat(rem_addr, buffer, sizeof(rem_addr));
@@ -1059,7 +1060,7 @@ static void raw_do_one(int lnr, const char *line)
 			   flag_not & FLAG_NUM_PORT));
         safe_strncpy(local_addr, ap->sprint((struct sockaddr *) &localaddr, 
 					    flag_not & FLAG_NUM_HOST), sizeof(local_addr));
-	if ((strlen(local_addr) + strlen(buffer)) > 22)
+	if (!flag_wid && ((strlen(local_addr) + strlen(buffer)) > 22))
 	    local_addr[22 - strlen(buffer)] = '\0';
 	strcat(local_addr, ":");
 	strncat(local_addr, buffer, sizeof(local_addr));
@@ -1069,7 +1070,7 @@ static void raw_do_one(int lnr, const char *line)
 		 get_sname(htons(rem_port), "raw", flag_not & FLAG_NUM_PORT));
         safe_strncpy(rem_addr, ap->sprint((struct sockaddr *) &remaddr, 
 					  flag_not & FLAG_NUM_HOST), sizeof(rem_addr));
-	if ((strlen(rem_addr) + strlen(buffer)) > 22)
+	    if (!flag_wid && ((strlen(rem_addr) + strlen(buffer)) > 22))
 	    rem_addr[22 - strlen(buffer)] = '\0';
 	strcat(rem_addr, ":");
 	strncat(rem_addr, buffer, sizeof(rem_addr));
@@ -1531,6 +1532,7 @@ static void usage(void)
     fprintf(stderr, _("        --numeric-hosts          don't resolve host names\n"));
     fprintf(stderr, _("        --numeric-ports          don't resolve port names\n"));
     fprintf(stderr, _("        --numeric-users          don't resolve user names\n"));
+    fprintf(stderr, _("        -W, --wide               don't truncate host names\n"));
     fprintf(stderr, _("        -N, --symbolic           resolve hardware names\n"));
     fprintf(stderr, _("        -e, --extend             display other/more information\n"));
     fprintf(stderr, _("        -p, --programs           display PID/Program name for sockets\n"));
@@ -1580,6 +1582,7 @@ int main
 	{"numeric-hosts", 0, 0, '!'},
 	{"numeric-ports", 0, 0, '@'},
 	{"numeric-users", 0, 0, '#'},
+	{"wide", 0, 0, 'W'},
 	{"symbolic", 0, 0, 'N'},
 	{"cache", 0, 0, 'C'},
 	{"fib", 0, 0, 'F'},
@@ -1595,7 +1598,7 @@ int main
     getroute_init();		/* Set up AF routing support */
 
     afname[0] = '\0';
-    while ((i = getopt_long(argc, argv, "MCFA:acdegphinNorstuVv?wxl64", longopts, &lop)) != EOF)
+    while ((i = getopt_long(argc, argv, "MCFA:acdegphinWNorstuVv?wxl64", longopts, &lop)) != EOF)
 	switch (i) {
 	case -1:
 	    break;
@@ -1651,6 +1654,9 @@ int main
 	case '#':
 	    flag_not |= FLAG_NUM_USER;
 	    break;
+	case 'W':
+	    flag_wid++;
+	    break;
 	case 'N':
 	    flag_not |= FLAG_SYM;
 	    break;
-- 
1.5.5




-- 
gentoo-commits@g.o mailing list


Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
gentoo-x86 commit in sys-apps/net-tools: ChangeLog net-tools-1.60_p20071202044231.ebuild
Next by thread:
gentoo-x86 commit in net-proxy/squid/files: squid.initd-logrotate squid.initd
Previous by date:
gentoo-x86 commit in sys-apps/net-tools: ChangeLog net-tools-1.60_p20071202044231.ebuild
Next by date:
gentoo-x86 commit in net-proxy/squid/files: squid.initd-logrotate squid.initd


Updated Apr 04, 2012

Summary: Archive of the gentoo-commits mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.