9d2e499
--- net-tools-1.60/man/en_US/netstat.8.old	2006-02-10 11:18:11.000000000 +0100
9d2e499
+++ net-tools-1.60/man/en_US/netstat.8	2006-02-10 11:22:19.000000000 +0100
9d2e499
@@ -176,6 +176,10 @@
9d2e499
 Print routing information from the FIB.  (This is the default.)
9d2e499
 .SS "\-C"
9d2e499
 Print routing information from the route cache.
9d2e499
+.SS "\-Z \-\-context"
9d2e499
+If SELinux enabled print SELinux context.
3f54dc3
+.SS "\-T \-\-notrim"
9d2e499
+Stop trimming long addresses.
9d2e499
 .SS delay
9d2e499
 Netstat will cycle printing through statistics every 
9d2e499
 .B delay 
9d2e499
--- net-tools-1.60/netstat.c.old	2006-02-10 11:18:12.000000000 +0100
9d2e499
+++ net-tools-1.60/netstat.c	2006-02-10 11:13:50.000000000 +0100
9d2e499
@@ -157,6 +157,9 @@
9d2e499
 int flag_arg = 0;
9d2e499
 int flag_ver = 0;
9d2e499
 int flag_selinux = 0;
9d2e499
+int flag_trim = 0;
9d2e499
+
9d2e499
+
9d2e499
 
9d2e499
 FILE *procinfo;
9d2e499
 
1f3e550
@@ -980,16 +983,20 @@
9d2e499
 		 get_sname(htons(local_port), "tcp",
9d2e499
 			   flag_not & FLAG_NUM_PORT));
9d2e499
 
9d2e499
-	if ((strlen(local_addr) + strlen(buffer)) >= 27)
9d2e499
-	    local_addr[27 - strlen(buffer) - 1] = '\0';
9d2e499
+	if (!flag_trim) {
9d2e499
+	    if ((strlen(local_addr) + strlen(buffer)) >= 27)
9d2e499
+		local_addr[27 - strlen(buffer) - 1] = '\0';
9d2e499
+	}
9d2e499
 
9d2e499
 	strcat(local_addr, ":");
1f3e550
 	strncat(local_addr, buffer, sizeof(local_addr)-strlen(local_addr)-1);
9d2e499
 	snprintf(buffer, sizeof(buffer), "%s",
9d2e499
 		 get_sname(htons(rem_port), "tcp", flag_not & FLAG_NUM_PORT));
9d2e499
-
9d2e499
-	if ((strlen(rem_addr) + strlen(buffer)) >= 27)
9d2e499
-	    rem_addr[27 - strlen(buffer) - 1] = '\0';
9d2e499
+	
9d2e499
+	if (!flag_trim) {
9d2e499
+	    if ((strlen(rem_addr) + strlen(buffer)) >= 27)
9d2e499
+		rem_addr[27 - strlen(buffer) - 1] = '\0';
9d2e499
+	}
9d2e499
 
9d2e499
 	strcat(rem_addr, ":");
1f3e550
 	strncat(rem_addr, buffer, sizeof(rem_addr)-strlen(rem_addr)-1);
9d2e499
@@ -1776,6 +1783,7 @@
9d2e499
 	{"fib", 0, 0, 'F'},
9d2e499
 	{"groups", 0, 0, 'g'},
9d2e499
 	{"context", 0, 0, 'Z'},
3f54dc3
+	{"notrim", 0, 0, 'T'},
9d2e499
 	{NULL, 0, 0, 0}
9d2e499
     };
9d2e499
 
9d2e499
@@ -1788,7 +1796,7 @@
9d2e499
 
9d2e499
     afname[0] = '\0';
9d2e499
 
9d2e499
-    while ((i = getopt_long(argc, argv, "MCFA:acdegphiI::nNorstuVv?wxlZ", longopts, &lop)) != EOF)
9d2e499
+    while ((i = getopt_long(argc, argv, "MCFA:acdegphiI::nNorstuVv?wxlZT", longopts, &lop)) != EOF)
9d2e499
 	switch (i) {
9d2e499
 	case -1:
9d2e499
 	    break;
9d2e499
@@ -1904,6 +1912,10 @@
9d2e499
 	    usage();
9d2e499
 	case 's':
9d2e499
 	    flag_sta++;
9d2e499
+	    break;
9d2e499
+	case 'T':
9d2e499
+	    flag_trim++;
9d2e499
+	    break;
9d2e499
 	}
9d2e499
 
9d2e499
     if(argc == optind + 1) {
53df30c
--- net-tools-1.60/netstat.c.trim2	2006-04-06 16:12:02.000000000 +0200
53df30c
+++ net-tools-1.60/netstat.c	2006-04-06 16:18:09.000000000 +0200
53df30c
@@ -1737,7 +1737,8 @@
53df30c
     fprintf(stderr, _("        -a, --all, --listening     display all sockets (default: connected)\n"));
53df30c
     fprintf(stderr, _("        -o, --timers               display timers\n"));
53df30c
     fprintf(stderr, _("        -F, --fib                  display Forwarding Information Base (default)\n"));
53df30c
-    fprintf(stderr, _("        -C, --cache                display routing cache instead of FIB\n\n"));
53df30c
+    fprintf(stderr, _("        -C, --cache                display routing cache instead of FIB\n"));
3f54dc3
+    fprintf(stderr, _("        -T, --notrim               stop trimming long addresses\n"));
53df30c
     fprintf(stderr, _("        -Z, --context              display SELinux security context for sockets\n\n"));
53df30c
 
53df30c
     fprintf(stderr, _("  <Iface>: Name of interface to monitor/list.\n"));