diff -ru net-tools-1.60.orig/man/en_US/netstat.8 net-tools-1.60/man/en_US/netstat.8 --- net-tools-1.60.orig/man/en_US/netstat.8 2001-01-07 13:43:57.000000000 +0100 +++ net-tools-1.60/man/en_US/netstat.8 2004-06-12 19:30:55.566822928 +0200 @@ -24,6 +24,7 @@ .RB [ \-\-all | \-a ] .RB [ \-\-numeric | \-n ] .RB [ \-\-numeric-hosts ] [ \-\-numeric-ports ] [ \-\-numeric-ports ] +.RB [ \-\-wide | \-W] .RB [ \-\-symbolic | \-N ] .RB [ \-\-extend | \-e [ \-\-extend | \-e] ] .RB [ \-\-timers | \-o ] @@ -55,6 +56,7 @@ .RB { \-\-groups | \-g } .RB [ \-\-numeric | \-n ] .RB [ \-\-numeric-hosts ] [ \-\-numeric-ports ] [ \-\-numeric-ports ] +.RB [ \-\-wide | \-W] .RB [ \-\-continuous | \-c] .P .B netstat @@ -124,6 +126,8 @@ .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 -ru net-tools-1.60.orig/netstat.c net-tools-1.60/netstat.c --- net-tools-1.60.orig/netstat.c 2001-04-15 16:41:17.000000000 +0200 +++ net-tools-1.60/netstat.c 2004-06-12 19:50:23.459276288 +0200 @@ -149,6 +149,7 @@ int flag_prg = 0; int flag_arg = 0; int flag_ver = 0; +int flag_wid = 0; FILE *procinfo; @@ -772,7 +773,7 @@ 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, ":"); @@ -780,7 +781,7 @@ 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, ":"); @@ -922,7 +923,7 @@ 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, ":"); strcat(local_addr, buffer); @@ -931,7 +932,7 @@ 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)); - 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, ":"); strcat(rem_addr, buffer); @@ -1041,7 +1042,7 @@ flag_not & FLAG_NUM_PORT)); safe_strncpy(local_addr, ap->sprint((struct sockaddr *) &localaddr, flag_not), 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, ":"); strcat(local_addr, buffer); @@ -1050,7 +1051,7 @@ 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)); - 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, ":"); strcat(rem_addr, buffer); @@ -1492,6 +1493,7 @@ 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")); @@ -1541,6 +1543,7 @@ {"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'}, @@ -1556,7 +1559,7 @@ getroute_init(); /* Set up AF routing support */ afname[0] = '\0'; - while ((i = getopt_long(argc, argv, "MCFA:acdegphinNorstuVv?wxl", longopts, &lop)) != EOF) + while ((i = getopt_long(argc, argv, "MCFA:acdegphinWNorstuVv?wxl", longopts, &lop)) != EOF) switch (i) { case -1: break; @@ -1612,6 +1615,9 @@ case '#': flag_not |= FLAG_NUM_USER; break; + case 'W': + flag_wid++; + break; case 'N': flag_not |= FLAG_SYM; break; diff -ru net-tools-1.60.orig/po/net-tools.pot net-tools-1.60/po/net-tools.pot --- net-tools-1.60.orig/po/net-tools.pot 2001-04-15 16:40:06.000000000 +0200 +++ net-tools-1.60/po/net-tools.pot 2004-06-12 19:54:09.989838408 +0200 @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2001-04-15 15:40+0100\n" +"POT-Creation-Date: 2004-06-12 19:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -156,11 +156,11 @@ msgid " -d, --delete delete a specified entry\n" msgstr "" -#: ../arp.c:624 ../netstat.c:1490 ../route.c:86 +#: ../arp.c:624 ../netstat.c:1491 ../route.c:86 msgid " -v, --verbose be verbose\n" msgstr "" -#: ../arp.c:625 ../netstat.c:1491 ../route.c:87 +#: ../arp.c:625 ../netstat.c:1492 ../route.c:87 msgid " -n, --numeric don't resolve names\n" msgstr "" @@ -179,8 +179,8 @@ #: ../arp.c:629 msgid "" -" -f, --file read new entries from file or from " -"/etc/ethers\n" +" -f, --file read new entries from file or from /etc/" +"ethers\n" "\n" msgstr "" @@ -539,415 +539,419 @@ msgid "Don't know how to set addresses for family %d.\n" msgstr "" -#: ../netstat.c:430 +#: ../netstat.c:431 #, c-format msgid "" "(No info could be read for \"-p\": geteuid()=%d but you should be root.)\n" msgstr "" -#: ../netstat.c:434 +#: ../netstat.c:435 msgid "" "(Not all processes could be identified, non-owned process info\n" " will not be shown, you would have to be root to see it all.)\n" msgstr "" -#: ../netstat.c:441 ../netstat.c:1176 ../netstat.c:1253 +#: ../netstat.c:442 ../netstat.c:1177 ../netstat.c:1254 msgid "LISTENING" msgstr "" -#: ../netstat.c:442 +#: ../netstat.c:443 msgid "CONN SENT" msgstr "" -#: ../netstat.c:443 ../netstat.c:1255 +#: ../netstat.c:444 ../netstat.c:1256 msgid "DISC SENT" msgstr "" -#: ../netstat.c:444 ../netstat.c:511 ../netstat.c:894 ../netstat.c:1256 +#: ../netstat.c:445 ../netstat.c:512 ../netstat.c:895 ../netstat.c:1257 msgid "ESTABLISHED" msgstr "" -#: ../netstat.c:466 +#: ../netstat.c:467 msgid "Active NET/ROM sockets\n" msgstr "" -#: ../netstat.c:467 +#: ../netstat.c:468 msgid "" -"User Dest Source Device State Vr/Vs Send-Q " -"Recv-Q\n" +"User Dest Source Device State Vr/Vs Send-Q Recv-" +"Q\n" msgstr "" -#: ../netstat.c:477 ../netstat.c:1295 +#: ../netstat.c:478 ../netstat.c:1296 #, c-format msgid "Problem reading data from %s\n" msgstr "" -#: ../netstat.c:512 +#: ../netstat.c:513 msgid "SYN_SENT" msgstr "" -#: ../netstat.c:513 +#: ../netstat.c:514 msgid "SYN_RECV" msgstr "" -#: ../netstat.c:514 +#: ../netstat.c:515 msgid "FIN_WAIT1" msgstr "" -#: ../netstat.c:515 +#: ../netstat.c:516 msgid "FIN_WAIT2" msgstr "" -#: ../netstat.c:516 +#: ../netstat.c:517 msgid "TIME_WAIT" msgstr "" -#: ../netstat.c:517 +#: ../netstat.c:518 msgid "CLOSE" msgstr "" -#: ../netstat.c:518 +#: ../netstat.c:519 msgid "CLOSE_WAIT" msgstr "" -#: ../netstat.c:519 +#: ../netstat.c:520 msgid "LAST_ACK" msgstr "" -#: ../netstat.c:520 +#: ../netstat.c:521 msgid "LISTEN" msgstr "" -#: ../netstat.c:521 +#: ../netstat.c:522 msgid "CLOSING" msgstr "" -#: ../netstat.c:592 +#: ../netstat.c:593 #, c-format msgid "warning, got bogus igmp6 line %d.\n" msgstr "" -#: ../netstat.c:597 ../netstat.c:635 ../netstat.c:756 ../netstat.c:888 -#: ../netstat.c:1019 ../netstat.c:1024 +#: ../netstat.c:598 ../netstat.c:636 ../netstat.c:757 ../netstat.c:889 +#: ../netstat.c:1020 ../netstat.c:1025 #, c-format msgid "netstat: unsupported address family %d !\n" msgstr "" -#: ../netstat.c:610 ../netstat.c:615 ../netstat.c:623 ../netstat.c:630 +#: ../netstat.c:611 ../netstat.c:616 ../netstat.c:624 ../netstat.c:631 #, c-format msgid "warning, got bogus igmp line %d.\n" msgstr "" -#: ../netstat.c:673 +#: ../netstat.c:674 msgid "Active X.25 sockets\n" msgstr "" #. IMHO, Vr/Vs is not very usefull --SF -#: ../netstat.c:675 +#: ../netstat.c:676 msgid "" -"Dest Source Device LCI State Vr/Vs Send-Q " -"Recv-Q\n" +"Dest Source Device LCI State Vr/Vs Send-Q Recv-" +"Q\n" msgstr "" -#: ../netstat.c:752 +#: ../netstat.c:753 msgid "warning, got bogus tcp line.\n" msgstr "" -#: ../netstat.c:793 ../netstat.c:943 ../netstat.c:1062 +#: ../netstat.c:794 ../netstat.c:944 ../netstat.c:1063 #, c-format msgid "off (0.00/%ld/%d)" msgstr "" -#: ../netstat.c:797 +#: ../netstat.c:798 #, c-format msgid "on (%2.2f/%ld/%d)" msgstr "" -#: ../netstat.c:802 +#: ../netstat.c:803 #, c-format msgid "keepalive (%2.2f/%ld/%d)" msgstr "" -#: ../netstat.c:807 +#: ../netstat.c:808 #, c-format msgid "timewait (%2.2f/%ld/%d)" msgstr "" -#: ../netstat.c:812 ../netstat.c:952 ../netstat.c:1072 +#: ../netstat.c:813 ../netstat.c:953 ../netstat.c:1073 #, c-format msgid "unkn-%d (%2.2f/%ld/%d)" msgstr "" -#: ../netstat.c:884 +#: ../netstat.c:885 msgid "warning, got bogus udp line.\n" msgstr "" -#: ../netstat.c:902 ../netstat.c:1162 ../netstat.c:1195 +#: ../netstat.c:903 ../netstat.c:1163 ../netstat.c:1196 msgid "UNKNOWN" msgstr "" -#: ../netstat.c:948 ../netstat.c:1067 +#: ../netstat.c:949 ../netstat.c:1068 #, c-format msgid "on%d (%2.2f/%ld/%d)" msgstr "" -#: ../netstat.c:1033 +#: ../netstat.c:1034 msgid "warning, got bogus raw line.\n" msgstr "" -#: ../netstat.c:1115 +#: ../netstat.c:1116 msgid "warning, got bogus unix line.\n" msgstr "" -#: ../netstat.c:1142 +#: ../netstat.c:1143 msgid "STREAM" msgstr "" -#: ../netstat.c:1146 +#: ../netstat.c:1147 msgid "DGRAM" msgstr "" -#: ../netstat.c:1150 +#: ../netstat.c:1151 msgid "RAW" msgstr "" -#: ../netstat.c:1154 +#: ../netstat.c:1155 msgid "RDM" msgstr "" -#: ../netstat.c:1158 +#: ../netstat.c:1159 msgid "SEQPACKET" msgstr "" -#: ../netstat.c:1167 +#: ../netstat.c:1168 msgid "FREE" msgstr "" -#: ../netstat.c:1183 +#: ../netstat.c:1184 msgid "CONNECTING" msgstr "" -#: ../netstat.c:1187 +#: ../netstat.c:1188 msgid "CONNECTED" msgstr "" -#: ../netstat.c:1191 +#: ../netstat.c:1192 msgid "DISCONNECTING" msgstr "" -#: ../netstat.c:1222 +#: ../netstat.c:1223 msgid "Active UNIX domain sockets " msgstr "" -#: ../netstat.c:1224 ../netstat.c:1735 +#: ../netstat.c:1225 ../netstat.c:1741 msgid "(servers and established)" msgstr "" -#: ../netstat.c:1227 ../netstat.c:1738 +#: ../netstat.c:1228 ../netstat.c:1744 msgid "(only servers)" msgstr "" -#: ../netstat.c:1229 ../netstat.c:1740 +#: ../netstat.c:1230 ../netstat.c:1746 msgid "(w/o servers)" msgstr "" -#: ../netstat.c:1232 +#: ../netstat.c:1233 msgid "" "\n" "Proto RefCnt Flags Type State I-Node" msgstr "" -#: ../netstat.c:1234 +#: ../netstat.c:1235 msgid " Path\n" msgstr "" -#: ../netstat.c:1254 +#: ../netstat.c:1255 msgid "SABM SENT" msgstr "" -#: ../netstat.c:1257 +#: ../netstat.c:1258 msgid "RECOVERY" msgstr "" -#: ../netstat.c:1271 +#: ../netstat.c:1272 msgid "Active AX.25 sockets\n" msgstr "" -#: ../netstat.c:1272 +#: ../netstat.c:1273 msgid "Dest Source Device State Vr/Vs Send-Q Recv-Q\n" msgstr "" -#: ../netstat.c:1315 +#: ../netstat.c:1316 #, c-format msgid "problem reading data from %s\n" msgstr "" -#: ../netstat.c:1366 +#: ../netstat.c:1367 msgid "" "Active IPX sockets\n" "Proto Recv-Q Send-Q Local Address Foreign Address " "State" msgstr "" -#: ../netstat.c:1368 +#: ../netstat.c:1369 msgid " User" msgstr "" -#: ../netstat.c:1402 +#: ../netstat.c:1403 msgid "ESTAB" msgstr "" -#: ../netstat.c:1410 +#: ../netstat.c:1411 msgid "UNK." msgstr "" -#: ../netstat.c:1448 +#: ../netstat.c:1449 msgid "Kernel Interface table\n" msgstr "" -#: ../netstat.c:1452 +#: ../netstat.c:1453 msgid "" "Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR " "Flg\n" msgstr "" -#: ../netstat.c:1456 +#: ../netstat.c:1457 msgid "missing interface information" msgstr "" -#: ../netstat.c:1479 +#: ../netstat.c:1480 msgid "" -"usage: netstat [-veenNcCF] [] -r netstat " -"{-V|--version|-h|--help}\n" +"usage: netstat [-veenNcCF] [] -r netstat {-V|--version|-h|--" +"help}\n" msgstr "" -#: ../netstat.c:1480 +#: ../netstat.c:1481 msgid " netstat [-vnNcaeol] [ ...]\n" msgstr "" -#: ../netstat.c:1481 +#: ../netstat.c:1482 msgid "" " netstat { [-veenNac] -i | [-cnNe] -M | -s }\n" "\n" msgstr "" -#: ../netstat.c:1483 +#: ../netstat.c:1484 msgid " -r, --route display routing table\n" msgstr "" -#: ../netstat.c:1484 +#: ../netstat.c:1485 msgid " -i, --interfaces display interface table\n" msgstr "" -#: ../netstat.c:1485 +#: ../netstat.c:1486 msgid " -g, --groups display multicast group memberships\n" msgstr "" -#: ../netstat.c:1486 +#: ../netstat.c:1487 msgid "" " -s, --statistics display networking statistics (like SNMP)\n" msgstr "" -#: ../netstat.c:1488 +#: ../netstat.c:1489 msgid "" " -M, --masquerade display masqueraded connections\n" "\n" msgstr "" -#: ../netstat.c:1492 +#: ../netstat.c:1493 msgid " --numeric-hosts don't resolve host names\n" msgstr "" -#: ../netstat.c:1493 +#: ../netstat.c:1494 msgid " --numeric-ports don't resolve port names\n" msgstr "" -#: ../netstat.c:1494 +#: ../netstat.c:1495 msgid " --numeric-users don't resolve user names\n" msgstr "" -#: ../netstat.c:1495 +#: ../netstat.c:1496 +msgid " -W, --wide don't truncate host names\n" +msgstr "" + +#: ../netstat.c:1497 msgid " -N, --symbolic resolve hardware names\n" msgstr "" -#: ../netstat.c:1496 ../route.c:88 +#: ../netstat.c:1498 ../route.c:88 msgid " -e, --extend display other/more information\n" msgstr "" -#: ../netstat.c:1497 +#: ../netstat.c:1499 msgid " -p, --programs display PID/Program name for sockets\n" msgstr "" -#: ../netstat.c:1498 +#: ../netstat.c:1500 msgid "" " -c, --continuous continuous listing\n" "\n" msgstr "" -#: ../netstat.c:1499 +#: ../netstat.c:1501 msgid " -l, --listening display listening server sockets\n" msgstr "" -#: ../netstat.c:1500 +#: ../netstat.c:1502 msgid "" " -a, --all, --listening display all sockets (default: connected)\n" msgstr "" -#: ../netstat.c:1501 +#: ../netstat.c:1503 msgid " -o, --timers display timers\n" msgstr "" -#: ../netstat.c:1502 ../route.c:89 +#: ../netstat.c:1504 ../route.c:89 msgid "" " -F, --fib display Forwarding Information Base " "(default)\n" msgstr "" -#: ../netstat.c:1503 ../route.c:90 +#: ../netstat.c:1505 ../route.c:90 msgid "" " -C, --cache display routing cache instead of FIB\n" "\n" msgstr "" -#: ../netstat.c:1505 +#: ../netstat.c:1507 msgid "" -" ={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx " -"--netrom\n" +" ={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx --" +"netrom\n" msgstr "" -#: ../netstat.c:1506 ../route.c:92 +#: ../netstat.c:1508 ../route.c:92 #, c-format msgid " =Use '-A ' or '--'; default: %s\n" msgstr "" -#: ../netstat.c:1507 ../route.c:93 +#: ../netstat.c:1509 ../route.c:93 msgid " List of possible address families (which support routing):\n" msgstr "" -#: ../netstat.c:1732 +#: ../netstat.c:1738 msgid "Active Internet connections " msgstr "" -#: ../netstat.c:1742 +#: ../netstat.c:1748 msgid "" "\n" -"Proto Recv-Q Send-Q Local Address Foreign Address State " -" " +"Proto Recv-Q Send-Q Local Address Foreign Address " +"State " msgstr "" -#: ../netstat.c:1744 +#: ../netstat.c:1750 msgid " User Inode " msgstr "" -#: ../netstat.c:1747 +#: ../netstat.c:1753 msgid " Timer" msgstr "" -#: ../netstat.c:1777 +#: ../netstat.c:1783 msgid "IPv4 Group Memberships\n" msgstr "" -#: ../netstat.c:1778 +#: ../netstat.c:1784 msgid "Interface RefCnt Group\n" msgstr "" @@ -1886,8 +1890,8 @@ #: ../lib/inet6_gr.c:76 msgid "" -"Destination Next Hop " -" Flags Metric Ref Use Iface\n" +"Destination Next " +"Hop Flags Metric Ref Use Iface\n" msgstr "" #: ../lib/inet6_gr.c:150 @@ -2071,8 +2075,8 @@ #: ../lib/masq_info.c:204 msgid "" -"prot expire initseq delta prevd source destination " -" ports\n" +"prot expire initseq delta prevd source " +"destination ports\n" msgstr "" #: ../lib/netrom_gr.c:48