--- net-tools-1.60.orig/lib/Makefile +++ net-tools-1.60/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 +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 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 --- net-tools-1.60.orig/lib/ddp_gr.c +++ net-tools-1.60/lib/ddp_gr.c @@ -1,3 +1,20 @@ +/* + * lib/ddp_gr.c Prinbting of DDP (AppleTalk) routing table + * used by the NET-LIB. + * + * NET-LIB + * + * Version: $Id: ddp_gr.c,v 1.4 2002/06/02 05:25:15 ecki Exp $ + * + * Author: Ajax + * + * Modification: + * 2002-06-02 integrated into main source by Bernd Eckenfels + * + */ + +/* TODO: name lookups (/etc/atalk.names? NBP?) */ + #include "config.h" #if HAVE_AFATALK @@ -16,9 +33,61 @@ #include "pathnames.h" #include "intl.h" +/* stolen from inet_gr.c */ +#define flags_decode(i,o) do { \ + o[0] = '\0'; \ + if (i & RTF_UP) strcat(o, "U"); \ + if (i & RTF_GATEWAY) strcat(o, "G"); \ + if (i & RTF_REJECT) strcat(o, "!"); \ + if (i & RTF_HOST) strcat(o, "H"); \ + if (i & RTF_REINSTATE) strcat(o, "R"); \ + if (i & RTF_DYNAMIC) strcat(o, "D"); \ + if (i & RTF_MODIFIED) strcat(o, "M"); \ + if (i & RTF_DEFAULT) strcat(o, "d"); \ + if (i & RTF_ALLONLINK) strcat(o, "a"); \ + if (i & RTF_ADDRCONF) strcat(o, "c"); \ + if (i & RTF_NONEXTHOP) strcat(o, "o"); \ + if (i & RTF_EXPIRES) strcat(o, "e"); \ + if (i & RTF_CACHE) strcat(o, "c"); \ + if (i & RTF_FLOW) strcat(o, "f"); \ + if (i & RTF_POLICY) strcat(o, "p"); \ + if (i & RTF_LOCAL) strcat(o, "l"); \ + if (i & RTF_MTU) strcat(o, "u"); \ + if (i & RTF_WINDOW) strcat(o, "w"); \ + if (i & RTF_IRTT) strcat(o, "i"); \ + if (i & RTF_NOTCACHED) strcat(o, "n"); \ + } while (0) + int DDP_rprint(int options) { - fprintf(stderr, _("Routing table for `ddp' not yet supported.\n")); - return (1); + FILE *fp; + char *dest, *gw, *dev, *flags; + char oflags[32]; + char *hdr = "Destination Gateway Device Flags"; + + fp = fopen(_PATH_PROCNET_ATALK_ROUTE, "r"); + + if (!fp) { + perror("Error opening " _PATH_PROCNET_ATALK_ROUTE); + fprintf(stderr, "DDP (AppleTalk) not configured on this system.\n"); + return 1; + } + + fscanf(fp, "%as %as %as %as\n", &dest, &gw, &flags, &dev); + free(dest); free(gw); free(dev); free(flags); + + printf("%s\n", hdr); + + while (fscanf(fp, "%as %as %as %as\n", &dest, &gw, &flags, &dev) == 4) { + int iflags = atoi(flags); + flags_decode(iflags, oflags); + printf("%-16s%-16s%-16s%-s\n", dest, gw, dev, oflags); + free(dest); free(gw); free(dev); free(flags); + } + + fclose(fp); + + return 0; + } #endif --- net-tools-1.60.orig/lib/hw.c +++ net-tools-1.60/lib/hw.c @@ -2,7 +2,7 @@ * lib/hw.c This file contains the top-level part of the hardware * support functions module. * - * Version: $Id: hw.c,v 1.17 2000/05/20 13:38:10 pb Exp $ + * Version: $Id: hw.c,v 1.18 2001/11/12 02:12:05 ecki Exp $ * * Maintainer: Bernd 'eckes' Eckenfels, * @@ -73,6 +73,8 @@ extern struct hwtype ec_hwtype; +extern struct hwtype eui64_hwtype; + static struct hwtype *hwtypes[] = { @@ -144,6 +146,9 @@ #if HAVE_HWX25 &x25_hwtype, #endif +#if HAVE_HWEUI64 + &eui64_hwtype, +#endif &unspec_hwtype, NULL }; @@ -217,6 +222,9 @@ #if HAVE_HWEC ec_hwtype.title = _("Econet"); #endif +#if HAVE_HWEUI64 + eui64_hwtype.title = _("Generic EUI-64"); +#endif sVhwinit = 1; } --- net-tools-1.60.orig/lib/inet.c +++ net-tools-1.60/lib/inet.c @@ -3,7 +3,7 @@ * support functions for the net-tools. * (NET-3 base distribution). * - * Version: $Id: inet.c,v 1.13 1999/12/11 13:35:56 freitag Exp $ + * Version: $Id: inet.c,v 1.14 2003/10/19 11:57:37 pb Exp $ * * Author: Fred N. van Kempen, * Copyright 1993 MicroWalt Corporation @@ -144,7 +144,7 @@ struct hostent *ent; struct netent *np; struct addr *pn; - unsigned long ad, host_ad; + u_int32_t ad, host_ad; int host = 0; /* Grmpf. -FvK */ @@ -155,7 +155,7 @@ errno = EAFNOSUPPORT; return (-1); } - ad = (unsigned long) sin->sin_addr.s_addr; + ad = sin->sin_addr.s_addr; #ifdef DEBUG fprintf (stderr, "rresolve: %08lx, mask %08x, num %08x \n", ad, netmask, numeric); #endif --- net-tools-1.60.orig/lib/inet_sr.c +++ net-tools-1.60/lib/inet_sr.c @@ -3,6 +3,7 @@ 1998-07-01 - Arnaldo Carvalho de Melo - GNU gettext instead of catgets 1999-10-07 - Kurt Garloff - for -host and gws: prefer host names over networks (or even reject) + 2003-10-11 - Maik Broemme - gcc 3.x warnign fixes (default: break;) */ #include "config.h" @@ -104,7 +105,6 @@ isnet = 1; break; case 2: isnet = 0; break; - default: } /* Fill in the other fields. */ --- net-tools-1.60.orig/lib/ipx.c +++ net-tools-1.60/lib/ipx.c @@ -133,6 +133,9 @@ char *ep; int nbo; + if (!sai) + return (-1); + sai->sipx_family = AF_IPX; sai->sipx_network = htonl(0); sai->sipx_node[0] = sai->sipx_node[1] = sai->sipx_node[2] = --- net-tools-1.60.orig/lib/interface.c +++ net-tools-1.60/lib/interface.c @@ -7,7 +7,7 @@ 8/2000 Andi Kleen make the list operations a bit more efficient. People are crazy enough to use thousands of aliases now. - $Id: interface.c,v 1.14 2001/02/10 19:31:15 pb Exp $ + $Id: interface.c,v 1.28 2003/05/29 02:09:14 ecki Exp $ */ #include "config.h" @@ -23,6 +23,7 @@ #include #include #include +#include #if HAVE_AFIPX #if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) @@ -87,14 +88,20 @@ int ife_short; +int if_list_all = 0; /* do we have requested the complete proc list, yet? */ + static struct interface *int_list, *int_last; static int if_readlist_proc(char *); -static struct interface *add_interface(char *name) +static struct interface *if_cache_add(char *name) { struct interface *ife, **nextp, *new; + if (!int_list) + int_last = NULL; + + /* the cache is sorted, so if we hit a smaller if, exit */ for (ife = int_last; ife; ife = ife->prev) { int n = nstrcmp(ife->name, name); if (n == 0) @@ -104,7 +111,7 @@ } new(new); safe_strncpy(new->name, name, IFNAMSIZ); - nextp = ife ? &ife->next : &int_list; + nextp = ife ? &ife->next : &int_list; // keep sorting new->prev = ife; new->next = *nextp; if (new->next) @@ -117,19 +124,22 @@ struct interface *lookup_interface(char *name) { - struct interface *ife = NULL; - - if (if_readlist_proc(name) < 0) - return NULL; - ife = add_interface(name); - return ife; + /* if we have read all, use it */ + if (if_list_all) + return if_cache_add(name); + + /* otherwise we read a limited list */ + if (if_readlist_proc(name) < 0) + return NULL; + + return if_cache_add(name); } int for_all_interfaces(int (*doit) (struct interface *, void *), void *cookie) { struct interface *ife; - if (!int_list && (if_readlist() < 0)) + if (!if_list_all && (if_readlist() < 0)) return -1; for (ife = int_list; ife; ife = ife->next) { int err = doit(ife, cookie); @@ -139,13 +149,15 @@ return 0; } -int free_interface_list(void) +int if_cache_free(void) { struct interface *ife; while ((ife = int_list) != NULL) { int_list = ife->next; free(ife); } + int_last = NULL; + if_list_all = 0; return 0; } @@ -180,7 +192,7 @@ } if (ifc.ifc_len == sizeof(struct ifreq) * numreqs) { /* assume it overflowed and try again */ - numreqs += 10; + numreqs *= 2; continue; } break; @@ -188,7 +200,7 @@ ifr = ifc.ifc_req; for (n = 0; n < ifc.ifc_len; n += sizeof(struct ifreq)) { - add_interface(ifr->ifr_name); + if_cache_add(ifr->ifr_name); ifr++; } err = 0; @@ -198,7 +210,7 @@ return err; } -static char *get_name(char *name, char *p) +char *get_name(char *name, char *p) { while (isspace(*p)) p++; @@ -206,16 +218,19 @@ if (isspace(*p)) break; if (*p == ':') { /* could be an alias */ - char *dot = p, *dotname = name; - *name++ = *p++; - while (isdigit(*p)) - *name++ = *p++; - if (*p != ':') { /* it wasn't, backup */ - p = dot; - name = dotname; + char *dot = p++; + while (*p && isdigit(*p)) p++; + if (*p == ':') { + /* Yes it is, backup and copy it. */ + p = dot; + *name++ = *p++; + while (*p && isdigit(*p)) { + *name++ = *p++; + } + } else { + /* No, it isn't */ + p = dot; } - if (*p == '\0') - return NULL; p++; break; } @@ -225,7 +240,7 @@ return p; } -static int procnetdev_version(char *buf) +int procnetdev_version(char *buf) { if (strstr(buf, "compressed")) return 3; @@ -234,12 +249,12 @@ return 1; } -static int get_dev_fields(char *bp, struct interface *ife) +int get_dev_fields(char *bp, struct interface *ife) { switch (procnetdev_vsn) { case 3: sscanf(bp, - "%llu %llu %lu %lu %lu %lu %lu %lu %llu %llu %lu %lu %lu %lu %lu %lu", + "%Lu %Lu %lu %lu %lu %lu %lu %lu %Lu %Lu %lu %lu %lu %lu %lu %lu", &ife->stats.rx_bytes, &ife->stats.rx_packets, &ife->stats.rx_errors, @@ -259,7 +274,7 @@ &ife->stats.tx_compressed); break; case 2: - sscanf(bp, "%llu %llu %lu %lu %lu %lu %llu %llu %lu %lu %lu %lu %lu", + sscanf(bp, "%Lu %Lu %lu %lu %lu %lu %Lu %Lu %lu %lu %lu %lu %lu", &ife->stats.rx_bytes, &ife->stats.rx_packets, &ife->stats.rx_errors, @@ -277,7 +292,7 @@ ife->stats.rx_multicast = 0; break; case 1: - sscanf(bp, "%llu %lu %lu %lu %lu %llu %lu %lu %lu %lu %lu", + sscanf(bp, "%Lu %lu %lu %lu %lu %Lu %lu %lu %lu %lu %lu", &ife->stats.rx_packets, &ife->stats.rx_errors, &ife->stats.rx_dropped, @@ -300,22 +315,16 @@ static int if_readlist_proc(char *target) { - static int proc_read; FILE *fh; char buf[512]; struct interface *ife; int err; - if (proc_read) - return 0; - if (!target) - proc_read = 1; - fh = fopen(_PATH_PROCNET_DEV, "r"); if (!fh) { fprintf(stderr, _("Warning: cannot open %s (%s). Limited output.\n"), _PATH_PROCNET_DEV, strerror(errno)); - return if_readconf(); + return -2; } fgets(buf, sizeof buf, fh); /* eat line */ fgets(buf, sizeof buf, fh); @@ -350,7 +359,7 @@ while (fgets(buf, sizeof buf, fh)) { char *s, name[IFNAMSIZ]; s = get_name(name, buf); - ife = add_interface(name); + ife = if_cache_add(name); get_dev_fields(s, ife); ife->statistics_valid = 1; if (target && !strcmp(target,name)) @@ -359,7 +368,6 @@ if (ferror(fh)) { perror(_PATH_PROCNET_DEV); err = -1; - proc_read = 0; } #if 0 @@ -371,9 +379,16 @@ int if_readlist(void) { - int err = if_readlist_proc(NULL); - if (!err) - err = if_readconf(); + /* caller will/should check not to call this too often + * (i.e. only if if_list_all == 0 + */ + int err = 0; + + err |= if_readlist_proc(NULL); + err |= if_readconf(); + + if_list_all = 1; + return err; } @@ -580,10 +595,10 @@ void ife_print_short(struct interface *ptr) { printf("%-5.5s ", ptr->name); - printf("%5d %3d", ptr->mtu, ptr->metric); + printf("%5d %-2d ", ptr->mtu, ptr->metric); /* If needed, display the interface statistics. */ if (ptr->statistics_valid) { - printf("%8llu %6lu %6lu %6lu", + printf("%8llu %6lu %6lu %6lu ", ptr->stats.rx_packets, ptr->stats.rx_errors, ptr->stats.rx_dropped, ptr->stats.rx_fifo_errors); printf("%8llu %6lu %6lu %6lu ", @@ -636,8 +651,8 @@ int hf; int can_compress = 0; unsigned long long rx, tx, short_rx, short_tx; - char Rext[5]="b"; - char Text[5]="b"; + const char *Rext = "b"; + const char *Text = "b"; #if HAVE_AFIPX static struct aftype *ipxtype = NULL; @@ -843,10 +858,38 @@ tx = ptr->stats.tx_bytes; short_rx = rx * 10; short_tx = tx * 10; - if (rx > 1048576) { short_rx /= 1048576; strcpy(Rext, "Mb"); } - else if (rx > 1024) { short_rx /= 1024; strcpy(Rext, "Kb"); } - if (tx > 1048576) { short_tx /= 1048576; strcpy(Text, "Mb"); } - else if (tx > 1024) { short_tx /= 1024; strcpy(Text, "Kb"); } + if (rx > 1125899906842624ull) { + short_rx /= 1125899906842624ull; + Rext = "PiB"; + } else if (rx > 1099511627776ull) { + short_rx /= 1099511627776ull; + Rext = "TiB"; + } else if (rx > 1073741824ull) { + short_rx /= 1073741824ull; + Rext = "GiB"; + } else if (rx > 1048576) { + short_rx /= 1048576; + Rext = "MiB"; + } else if (rx > 1024) { + short_rx /= 1024; + Rext = "KiB"; + } + if (tx > 1125899906842624ull) { + short_tx /= 1125899906842624ull; + Text = "PiB"; + } else if (tx > 1099511627776ull) { + short_tx /= 1099511627776ull; + Text = "TiB"; + } else if (tx > 1073741824ull) { + short_tx /= 1073741824ull; + Text = "GiB"; + } else if (tx > 1048576) { + short_tx /= 1048576; + Text = "MiB"; + } else if (tx > 1024) { + short_tx /= 1024; + Text = "KiB"; + } printf(" "); printf(_("TX packets:%llu errors:%lu dropped:%lu overruns:%lu carrier:%lu\n"), @@ -867,7 +910,7 @@ } if ((ptr->map.irq || ptr->map.mem_start || ptr->map.dma || - ptr->map.base_addr)) { + ptr->map.base_addr >= 0x100)) { printf(" "); if (ptr->map.irq) printf(_("Interrupt:%d "), ptr->map.irq); --- net-tools-1.60.orig/lib/net-features.h +++ net-tools-1.60/lib/net-features.h @@ -295,6 +295,13 @@ "-" #endif "HDLC/LAPB " + +#if HAVE_HWEUI64 +"+" +#else +"-" +#endif +"EUI64 " ; --- net-tools-1.60.orig/lib/nstrcmp.c +++ net-tools-1.60/lib/nstrcmp.c @@ -1,34 +1,157 @@ /* Copyright 1998 by Andi Kleen. Subject to the GPL. */ -/* $Id: nstrcmp.c,v 1.2 1998/11/15 20:11:38 freitag Exp $ */ +/* rewritten by bernd eckenfels because of complicated alias semantic */ +/* $Id: nstrcmp.c,v 1.4 2004/06/03 22:49:17 ecki Exp $ */ #include #include +#include #include "util.h" -/* like strcmp(), but knows about numbers */ -int nstrcmp(const char *astr, const char *b) + +/* return numerical :999 suffix or null. sideeffect: replace ':' with \0 */ +char* cutalias(char* name) { - const char *a = astr; + int digit = 0; + int pos; + + for(pos=strlen(name); pos>0; pos--) + { + if (name[pos-1]==':' && digit) + { + name[pos-1]='\0'; + return name+pos; + } + if (!isdigit(name[pos-1])) + break; + digit = 1; + } + return NULL; +} - while (*a == *b) { - if (*a == '\0') - return 0; - a++; - b++; - } - if (isdigit(*a)) { - if (!isdigit(*b)) - return -1; - while (a > astr) { - a--; - if (!isdigit(*a)) { - a++; - break; - } - if (!isdigit(*b)) - return -1; - b--; + +/* return index of last non digit or -1 if it does not end with digits */ +int rindex_nondigit(char *name) +{ + int pos = strlen(name); + + for(pos=strlen(name); pos>0; pos--) + { + if (!isdigit(name[pos-1])) + return pos; } - return atoi(a) > atoi(b) ? 1 : -1; - } - return *a - *b; + return 0; +} + + +/* like strcmp(), but knows about numbers and ':' alias suffix */ +int nstrcmp(const char *ap, const char *bp) +{ + char *a = (char*)strdup(ap); + char *b = (char*)strdup(bp); + char *an, *bn; + int av = 0, bv = 0; + char *aalias=cutalias(a); + char *balias=cutalias(b); + int aindex=rindex_nondigit(a); + int bindex=rindex_nondigit(b); + int complen=(aindex bindex) + { free(a); free(b); return 1; } + + if (aindex < bindex) + { free(a); free(b); return -1; } + + an = a+aindex; + bn = b+bindex; + + av = atoi(an); + bv = atoi(bn); + + if (av < bv) + { free(a); free(b); return -1; } + + if (av > bv) + { free(a); free(b); return 1; } + + av = -1; + if (aalias != NULL) + av = atoi(aalias); + + bv = -1; + if (balias != NULL) + bv = atoi(balias); + + free(a); free(b); + + if (av < bv) + return -1; + + if (av > bv) + return 1; + + return 0; +} + + +#ifdef NSTRCMP_TEST + +int cs(int s) +{ + if (s < 0) return -1; + if (s > 0) return 1; + return 0; +} + + +int dotest(char* a, char* b, int exp) +{ + int res = nstrcmp(a, b); + int err = (cs(res) != cs(exp)); + printf("nstrcmp(\"%s\", \"%s\")=%d %d %s\n", a, b, res, exp, err?"WRONG":"OK"); + return err; } + +int main() +{ + int err = 0; + + err |= dotest("eth1", "eth1", 0); + err |= dotest("eth0:1", "eth0:1", 0); + err |= dotest("lan", "lan", 0); + err |= dotest("100", "100", 0); + err |= dotest("", "", 0); + err |= dotest(":", ":", 0); + err |= dotest("a:b:c", "a:b:c", 0); + err |= dotest("a:", "a:", 0); + err |= dotest(":a", ":a", 0); + + err |= dotest("a", "aa", -1); + err |= dotest("eth0", "eth1", -1); + err |= dotest("eth1", "eth20", -1); + err |= dotest("eth20", "eth100", -1); + err |= dotest("eth1", "eth13", -1); + err |= dotest("eth", "eth2", -1); + err |= dotest("eth0:1", "eth0:2", -1); + err |= dotest("eth1:10", "eth13:10", -1); + err |= dotest("eth1:1", "eth1:13", -1); + err |= dotest("a", "a:", -1); + + err |= dotest("aa", "a", 1); + err |= dotest("eth2", "eth1", 1); + err |= dotest("eth13", "eth1", 1); + err |= dotest("eth2", "eth", 1); + err |= dotest("eth2:10", "eth2:1", 1); + err |= dotest("eth2:5", "eth2:4", 1); + err |= dotest("eth3:2", "eth2:3", 1); + err |= dotest("eth13:1", "eth1:0", 1); + err |= dotest("a:", "a", 1); + err |= dotest("a1b12", "a1b2", 1); + + return err; +} + +#endif --- net-tools-1.60.orig/lib/pathnames.h +++ net-tools-1.60/lib/pathnames.h @@ -1,4 +1,3 @@ - /* * lib/pathnames.h This file contains the definitions of the path * names used by the NET-LIB. @@ -45,6 +44,7 @@ #define _PATH_PROCNET_X25 "/proc/net/x25" #define _PATH_PROCNET_X25_ROUTE "/proc/net/x25_routes" #define _PATH_PROCNET_DEV_MCAST "/proc/net/dev_mcast" +#define _PATH_PROCNET_ATALK_ROUTE "/proc/net/atalk_route" /* pathname for the netlink device */ #define _PATH_DEV_ROUTE "/dev/route" --- net-tools-1.60.orig/lib/tr.c +++ net-tools-1.60/lib/tr.c @@ -2,7 +2,7 @@ * lib/tr.c This file contains an implementation of the "Tokenring" * support functions. * - * Version: $Id: tr.c,v 1.8 2000/02/02 08:56:30 freitag Exp $ + * Version: $Id: tr.c,v 1.9 2005/05/16 03:15:12 ecki Exp $ * * Author: Fred N. van Kempen, * Copyright 1993 MicroWalt Corporation @@ -30,8 +30,14 @@ #include "net-support.h" #include "pathnames.h" #include "intl.h" +#include "util.h" + +/* actual definition at the end of file */ extern struct hwtype tr_hwtype; +#ifdef ARPHRD_IEEE802_TR +extern struct hwtype tr_hwtype1; +#endif static char *pr_tr(unsigned char *ptr) { @@ -42,7 +48,7 @@ (ptr[3] & 0377), (ptr[4] & 0377), (ptr[5] & 0377) ); return (buff); -} + } static int in_tr(char *bufp, struct sockaddr *sap) @@ -51,7 +57,17 @@ char c, *orig; int i, val; +#ifdef ARPHRD_IEEE802_TR + if (kernel_version() < KRELEASE(2,3,30)) { + sap->sa_family = tr_hwtype.type; + } else { + sap->sa_family = tr_hwtype1.type; + } +#else sap->sa_family = tr_hwtype.type; + #warning "Limited functionality, no support for ARPHRD_IEEE802_TR (old kernel headers?)" +#endif + ptr = sap->sa_data; i = 0; --- net-tools-1.60.orig/lib/util.h +++ net-tools-1.60/lib/util.h @@ -14,3 +14,6 @@ char *safe_strncpy(char *dst, const char *src, size_t size); + +#define netmin(a,b) ((a)<(b) ? (a) : (b)) +#define netmax(a,b) ((a)>(b) ? (a) : (b)) --- net-tools-1.60.orig/lib/irda.c +++ net-tools-1.60/lib/irda.c @@ -1,13 +1,15 @@ /********************************************************************* * * Filename: irda.c - * Version: 0.1 - * Description: A first attempt to make ifconfig understand IrDA + * Version: 0.2 + * Description: A second attempt to make ifconfig understand IrDA * Status: Experimental. * Author: Dag Brattli * Created at: Wed Apr 21 09:03:09 1999 * Modified at: Wed Apr 21 09:17:05 1999 * Modified by: Dag Brattli + * Modified at: Wed May 1 11:51:44 CEST 2002 + * Modified by: Christoph Bartelmus * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -59,9 +61,9 @@ */ static char *irda_print(unsigned char *ptr) { - static char buff[8]; + static char buff[12]; - sprintf(&buff[strlen(buff)], "%02x:%02x:%02x:%02x", ptr[3], ptr[2], + snprintf(buff, 12, "%02x:%02x:%02x:%02x", ptr[3], ptr[2], ptr[1], ptr[0]); return (buff); --- net-tools-1.60.orig/lib/x25_sr.c +++ net-tools-1.60/lib/x25_sr.c @@ -67,7 +67,7 @@ strcpy(target, *args++); /* Clean out the x25_route_struct structure. */ - memset((char *) &rt, 0, sizeof(struct x25_route_struct)); + memset((char *) &rt, 0, sizeof(rt)); if ((sigdigits = x25_aftype.input(0, target, (struct sockaddr *)&sx25)) < 0) { @@ -76,8 +76,8 @@ } rt.sigdigits=sigdigits; - /* x25_route_struct.address isn't type struct sockaddr_x25, Why? */ - memcpy(&rt.address, &sx25.sx25_addr, sizeof(x25_address)); + /* this works with 2.4 and 2.6 headers struct x25_address vs. typedef */ + memcpy(&rt.address, &sx25.sx25_addr, sizeof(sx25.sx25_addr)); while (*args) { if (!strcmp(*args,"device") || !strcmp(*args,"dev")) { --- net-tools-1.60.orig/lib/eui64.c +++ net-tools-1.60/lib/eui64.c @@ -0,0 +1,155 @@ +/* + * lib/eui64.c This file contains support for generic EUI-64 hw addressing + * + * Version: $Id: eui64.c,v 1.1 2001/11/12 02:12:05 ecki Exp $ + * + * Author: Daniel Stodden + * Copyright 2001 Daniel Stodden + * + * blueprinted from ether.c + * Copyright 1993 MicroWalt Corporation + * + * 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_HWEUI64 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "net-support.h" +#include "pathnames.h" +#include "intl.h" + +/* + * EUI-64 constants + */ + +#define EUI64_ALEN 8 + +#ifndef ARPHRD_EUI64 +#define ARPHRD_EUI64 27 +#warning "ARPHRD_EUI64 not defined in . Using private value 27" +#endif + +struct hwtype eui64_hwtype; + +/* Display an EUI-64 address in readable format. */ +static char *pr_eui64( unsigned char *ptr ) +{ + static char buff[64]; + + snprintf(buff, sizeof(buff), "%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X", + (ptr[0] & 0377), (ptr[1] & 0377), (ptr[2] & 0377), (ptr[3] & 0377), + (ptr[4] & 0377), (ptr[5] & 0377), (ptr[6] & 0377), (ptr[7] & 0377) + ); + return (buff); +} + +/* Start the PPP encapsulation on the file descriptor. */ +static int in_eui64( char *bufp, struct sockaddr *sap ) +{ + unsigned char *ptr; + char c, *orig; + int i; + unsigned val; + + sap->sa_family = eui64_hwtype.type; + ptr = sap->sa_data; + + i = 0; + orig = bufp; + + while ((*bufp != '\0') && (i < EUI64_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_eui64(%s): invalid eui64 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_eui64(%s): invalid eui64 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 == EUI64_ALEN) { +#ifdef DEBUG + fprintf(stderr, _("in_eui64(%s): trailing : ignored!\n"), + orig) +#endif + ; /* nothing */ + } + bufp++; + } + } + + /* That's it. Any trailing junk? */ + if ((i == EUI64_ALEN) && (*bufp != '\0')) { +#ifdef DEBUG + fprintf(stderr, _("in_eui64(%s): trailing junk!\n"), orig); + errno = EINVAL; + return (-1); +#endif + } +#ifdef DEBUG + fprintf(stderr, "in_eui64(%s): %s\n", orig, pr_eui64(sap->sa_data)); +#endif + + return (0); +} + +struct hwtype eui64_hwtype = +{ + "eui64", NULL, /*"EUI-64 addressing", */ ARPHRD_EUI64, EUI64_ALEN, + pr_eui64, in_eui64, NULL, 0 +}; + + +#endif /* HAVE_EUI64 */ --- net-tools-1.60.orig/Makefile +++ net-tools-1.60/Makefile @@ -76,7 +76,7 @@ NET_LIB_PATH = lib NET_LIB_NAME = net-tools -PROGS := ifconfig hostname arp netstat route rarp slattach plipconfig nameif +PROGS := ifconfig arp netstat route rarp slattach plipconfig nameif # hostname -include config.make ifeq ($(HAVE_IP_TOOLS),1) @@ -88,7 +88,7 @@ # 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 +COPTS = -D_GNU_SOURCE -O2 -Wall # -g -I/usr/inet6/include ifeq ($(origin LOPTS), undefined) LOPTS = endif @@ -116,6 +116,18 @@ CFLAGS = $(COPTS) -I. -idirafter ./include/ -I$(NET_LIB_PATH) LDFLAGS = $(LOPTS) -L$(NET_LIB_PATH) +INSTALL = install +INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755 + +ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) +CFLAGS += -g +endif + +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) +INSTALL_PROGRAM += -s +endif + + SUBDIRS = man/ $(NET_LIB_PATH)/ ifeq ($(origin CC), undefined) @@ -223,29 +235,29 @@ installbin: install -m 0755 -d ${BASEDIR}/sbin install -m 0755 -d ${BASEDIR}/bin - install -m 0755 arp ${BASEDIR}/sbin - install -m 0755 hostname ${BASEDIR}/bin - install -m 0755 ifconfig ${BASEDIR}/sbin - install -m 0755 nameif ${BASEDIR}/sbin - install -m 0755 netstat ${BASEDIR}/bin - install -m 0755 plipconfig $(BASEDIR)/sbin - install -m 0755 rarp ${BASEDIR}/sbin - install -m 0755 route ${BASEDIR}/sbin - install -m 0755 slattach $(BASEDIR)/sbin + $(INSTALL_PROGRAM) arp ${BASEDIR}/sbin +# $(INSTALL_PROGRAM) hostname ${BASEDIR}/bin + $(INSTALL_PROGRAM) ifconfig ${BASEDIR}/sbin + $(INSTALL_PROGRAM) nameif ${BASEDIR}/sbin + $(INSTALL_PROGRAM) netstat ${BASEDIR}/bin + $(INSTALL_PROGRAM) plipconfig $(BASEDIR)/sbin + $(INSTALL_PROGRAM) rarp ${BASEDIR}/sbin + $(INSTALL_PROGRAM) route ${BASEDIR}/sbin + $(INSTALL_PROGRAM) slattach $(BASEDIR)/sbin ifeq ($(HAVE_IP_TOOLS),1) - install -m 0755 ipmaddr $(BASEDIR)/sbin - install -m 0755 iptunnel $(BASEDIR)/sbin + $(INSTALL_PROGRAM) ipmaddr $(BASEDIR)/sbin + $(INSTALL_PROGRAM) iptunnel $(BASEDIR)/sbin endif ifeq ($(HAVE_MII),1) - install -m 0755 mii-tool $(BASEDIR)/sbin -endif - ln -fs hostname $(BASEDIR)/bin/dnsdomainname - ln -fs hostname $(BASEDIR)/bin/ypdomainname - ln -fs hostname $(BASEDIR)/bin/nisdomainname - ln -fs hostname $(BASEDIR)/bin/domainname -ifeq ($(HAVE_AFDECnet),1) - ln -fs hostname $(BASEDIR)/bin/nodename + $(INSTALL_PROGRAM) mii-tool $(BASEDIR)/sbin endif +# ln -fs hostname $(BASEDIR)/bin/dnsdomainname +# ln -fs hostname $(BASEDIR)/bin/ypdomainname +# ln -fs hostname $(BASEDIR)/bin/nisdomainname +# ln -fs hostname $(BASEDIR)/bin/domainname +#ifeq ($(HAVE_AFDECnet),1) +# ln -fs hostname $(BASEDIR)/bin/nodename +#endif savebin: @for i in ${BASEDIR}/sbin/arp ${BASEDIR}/sbin/ifconfig \ --- net-tools-1.60.orig/README +++ net-tools-1.60/README @@ -10,7 +10,7 @@ subsystem of the Linux kernel. This includes arp, hostname, ifconfig, netstat, rarp and route. Additionally, this package contains utilities relating to particular network hardware types (plipconfig, -slattach) and advanced aspects of IP configuration (iptunnel, +slattach, mii-tool) and advanced aspects of IP configuration (iptunnel, ipmaddr). Please include the output of "program --version" when reporting bugs. @@ -24,8 +24,6 @@ INSTALLING Installation instructions. - COPYING Your free copy of the GNU Public License. - TODO Some things that need to be done. --- net-tools-1.60.orig/arp.c +++ net-tools-1.60/arp.c @@ -8,7 +8,7 @@ * NET-3 Networking Distribution for the LINUX operating * system. * - * Version: $Id: arp.c,v 1.20 2001/04/08 17:05:05 pb Exp $ + * Version: $Id: arp.c,v 1.24 2005/05/16 04:30:17 ecki Exp $ * * Maintainer: Bernd 'eckes' Eckenfels, * @@ -102,7 +102,7 @@ struct arpreq req; struct sockaddr sa; int flags = 0; - int err; + int deleted = 0; memset((char *) &req, 0, sizeof(req)); @@ -148,7 +148,7 @@ continue; } if (!strcmp(*args, "dontpub")) { -#ifdef HAVE_ATF_DONTPUB +#ifdef ATF_DONTPUB req.arp_flags |= ATF_DONTPUB; #else ENOSUPP("arp", "ATF_DONTPUB"); @@ -157,7 +157,7 @@ continue; } if (!strcmp(*args, "auto")) { -#ifdef HAVE_ATF_MAGIC +#ifdef ATF_MAGIC req.arp_flags |= ATF_MAGIC; #else ENOSUPP("arp", "ATF_MAGIC"); @@ -190,35 +190,41 @@ } usage(); } + + // if neighter priv nor pub is given, work on both if (flags == 0) flags = 3; strcpy(req.arp_dev, device); - err = -1; + /* unfortuatelly the kernel interface does not allow us to + delete private entries anlone, so we need this hack + to avoid "not found" errors if we try both. */ + deleted = 0; /* Call the kernel. */ if (flags & 2) { if (opt_v) - fprintf(stderr, "arp: SIOCDARP(nopub)\n"); - if ((err = ioctl(sockfd, SIOCDARP, &req) < 0)) { - if (errno == ENXIO) { + fprintf(stderr, "arp: SIOCDARP(dontpub)\n"); + if (ioctl(sockfd, SIOCDARP, &req) < 0) { + if ((errno == ENXIO) || (errno == ENOENT)) { if (flags & 1) - goto nopub; + goto dontpub; printf(_("No ARP entry for %s\n"), host); return (-1); } - perror("SIOCDARP(priv)"); + perror("SIOCDARP(dontpub)"); return (-1); - } + } else + deleted = 1; } - if ((flags & 1) && (err)) { - nopub: + if (!deleted && (flags & 1)) { + dontpub: req.arp_flags |= ATF_PUBL; if (opt_v) fprintf(stderr, "arp: SIOCDARP(pub)\n"); if (ioctl(sockfd, SIOCDARP, &req) < 0) { - if (errno == ENXIO) { + if ((errno == ENXIO) || (errno == ENOENT)) { printf(_("No ARP entry for %s\n"), host); return (-1); } @@ -317,7 +323,7 @@ continue; } if (!strcmp(*args, "dontpub")) { -#ifdef HAVE_ATF_DONTPUB +#ifdef ATF_DONTPUB flags |= ATF_DONTPUB; #else ENOSUPP("arp", "ATF_DONTPUB"); @@ -326,7 +332,7 @@ continue; } if (!strcmp(*args, "auto")) { -#ifdef HAVE_ATF_MAGIC +#ifdef ATF_MAGIC flags |= ATF_MAGIC; #else ENOSUPP("arp", "ATF_MAGIC"); @@ -445,11 +451,11 @@ strcat(flags, "M"); if (arp_flags & ATF_PUBL) strcat(flags, "P"); -#ifdef HAVE_ATF_MAGIC +#ifdef ATF_MAGIC if (arp_flags & ATF_MAGIC) strcat(flags, "A"); #endif -#ifdef HAVE_ATF_DONTPUB +#ifdef ATF_DONTPUB if (arp_flags & ATF_DONTPUB) strcat(flags, "!"); #endif @@ -463,7 +469,7 @@ if (!(arp_flags & ATF_COM)) { if (arp_flags & ATF_PUBL) - printf("%-8.8s%-20.20s", "*", "*"); + printf("%-8.8s%-20.20s", "*", _("")); else printf("%-8.8s%-20.20s", "", _("(incomplete)")); } else { @@ -486,7 +492,7 @@ if (!(arp_flags & ATF_COM)) { if (arp_flags & ATF_PUBL) - printf("* "); + printf(" "); else printf(_(" ")); } else { @@ -499,12 +505,12 @@ if (arp_flags & ATF_PERM) printf("PERM "); if (arp_flags & ATF_PUBL) - printf("PUP "); -#ifdef HAVE_ATF_MAGIC + printf("PUB "); +#ifdef ATF_MAGIC if (arp_flags & ATF_MAGIC) printf("AUTO "); #endif -#ifdef HAVE_ATF_DONTPUB +#ifdef ATF_DONTPUB if (arp_flags & ATF_DONTPUB) printf("DONTPUB "); #endif @@ -612,11 +618,10 @@ static void usage(void) { fprintf(stderr, _("Usage:\n arp [-vn] [] [-i ] [-a] [] <-Display ARP cache\n")); - fprintf(stderr, _(" arp [-v] [-i ] -d [pub][nopub] <-Delete ARP entry\n")); - fprintf(stderr, _(" arp [-vnD] [] [-i ] -f [] <-Add entry from file\n")); - fprintf(stderr, _(" arp [-v] [] [-i ] -s [temp][nopub] <-Add entry\n")); - fprintf(stderr, _(" arp [-v] [] [-i ] -s [netmask ] pub <-''-\n")); - fprintf(stderr, _(" arp [-v] [] [-i ] -Ds [netmask ] pub <-''-\n\n")); + fprintf(stderr, _(" arp [-v] [-i ] -d [pub] <-Delete ARP entry\n")); + fprintf(stderr, _(" arp [-vnD] [] [-i ] -f [] <-Add entry from file\n")); + fprintf(stderr, _(" arp [-v] [] [-i ] -s [temp] <-Add entry\n")); + fprintf(stderr, _(" arp [-v] [] [-i ] -Ds [netmask ] pub <-''-\n\n")); fprintf(stderr, _(" -a display (all) hosts in alternative (BSD) style\n")); fprintf(stderr, _(" -s, --set set a new ARP entry\n")); --- net-tools-1.60.orig/config.in +++ net-tools-1.60/config.in @@ -82,6 +82,8 @@ bool '(Cisco)-HDLC/LAPB support' HAVE_HWHDLCLAPB n bool 'IrDA support' HAVE_HWIRDA y bool 'Econet hardware support' HAVE_HWEC n +bool 'Generic EUI-64 hardware support' HAVE_HWEUI64 n + * * * Other Features. --- net-tools-1.60.orig/hostname.c +++ net-tools-1.60/hostname.c @@ -32,6 +32,7 @@ */ #include #include +#include #include #include #include @@ -97,7 +98,6 @@ case EINVAL: fprintf(stderr, _("%s: name too long\n"), program_name); break; - default: } exit(1); }; @@ -116,7 +116,6 @@ case EINVAL: fprintf(stderr, _("%s: name too long\n"), program_name); break; - default: } exit(1); }; @@ -173,7 +172,6 @@ *p = '\0'; printf("%s\n", hp->h_name); break; - default: } } --- net-tools-1.60.orig/ifconfig.c +++ net-tools-1.60/ifconfig.c @@ -3,7 +3,7 @@ * that either displays or sets the characteristics of * one or more of the system's networking interfaces. * - * Version: $Id: ifconfig.c,v 1.50 2001/04/13 18:25:18 pb Exp $ + * Version: $Id: ifconfig.c,v 1.53 2001/11/01 01:54:49 ecki Exp $ * * Author: Fred N. van Kempen, * and others. Copyright 1993 MicroWalt Corporation @@ -88,7 +88,6 @@ char *Release = RELEASE, *Version = "ifconfig 1.42 (2001-04-13)"; int opt_a = 0; /* show all interfaces */ -int opt_i = 0; /* show the statistics */ int opt_v = 0; /* debugging output flag */ int addr_family = 0; /* currently selected AF */ @@ -105,7 +104,7 @@ int res; if (ife_short) - printf(_("Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg\n")); + printf(_("Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg\n")); if (!ifname) { res = for_all_interfaces(do_if_print, &opt_a); @@ -127,7 +126,7 @@ safe_strncpy(ifr.ifr_name, ifname, IFNAMSIZ); if (ioctl(skfd, SIOCGIFFLAGS, &ifr) < 0) { - fprintf(stderr, _("%s: unknown interface: %s\n"), + fprintf(stderr, _("%s: ERROR while getting interface flags: %s\n"), ifname, strerror(errno)); return (-1); } @@ -159,7 +158,7 @@ safe_strncpy(ifr.ifr_name, ifname, IFNAMSIZ); if (ioctl(fd, SIOCGIFFLAGS, &ifr) < 0) { - fprintf(stderr, _("%s: unknown interface: %s\n"), + fprintf(stderr, _("%s: ERROR while getting interface flags: %s\n"), ifname, strerror(errno)); return -1; } @@ -172,9 +171,35 @@ return (0); } +/** test is a specified flag is set */ +static int test_flag(char *ifname, short flags) +{ + struct ifreq ifr; + int fd; + + if (strchr(ifname, ':')) { + /* This is a v4 alias interface. Downing it via a socket for + another AF may have bad consequences. */ + fd = get_socket_for_af(AF_INET); + if (fd < 0) { + fprintf(stderr, _("No support for INET on this system.\n")); + return -1; + } + } else + fd = skfd; + + safe_strncpy(ifr.ifr_name, ifname, IFNAMSIZ); + if (ioctl(fd, SIOCGIFFLAGS, &ifr) < 0) { + fprintf(stderr, _("%s: ERROR while testing interface flags: %s\n"), + ifname, strerror(errno)); + return -1; + } + return (ifr.ifr_flags & flags); +} + static void usage(void) { - fprintf(stderr, _("Usage:\n ifconfig [-a] [-i] [-v] [-s] [[]
]\n")); + fprintf(stderr, _("Usage:\n ifconfig [-a] [-v] [-s] [[]
]\n")); #if HAVE_AFINET fprintf(stderr, _(" [add
[/]]\n")); fprintf(stderr, _(" [del
[/]]\n")); @@ -208,7 +233,7 @@ static void version(void) { fprintf(stderr, "%s\n%s\n", Release, Version); - exit(0); + exit(E_USAGE); } static int set_netmask(int skfd, struct ifreq *ifr, struct sockaddr *sa) @@ -222,7 +247,7 @@ strerror(errno)); err = 1; } - return 0; + return err; } int main(int argc, char **argv) @@ -388,6 +413,8 @@ } if (!strcmp(*spp, "-promisc")) { goterr |= clr_flag(ifr.ifr_name, IFF_PROMISC); + if (test_flag(ifr.ifr_name, IFF_PROMISC) > 0) + fprintf(stderr, _("Warning: Interface %s still in promisc mode... maybe other application is running?\n"), ifr.ifr_name); spp++; continue; } @@ -398,6 +425,8 @@ } if (!strcmp(*spp, "-multicast")) { goterr |= clr_flag(ifr.ifr_name, IFF_MULTICAST); + if (test_flag(ifr.ifr_name, IFF_MULTICAST) > 0) + fprintf(stderr, _("Warning: Interface %s still in MULTICAST mode.\n"), ifr.ifr_name); spp++; continue; } @@ -408,6 +437,8 @@ } if (!strcmp(*spp, "-allmulti")) { goterr |= clr_flag(ifr.ifr_name, IFF_ALLMULTI); + if (test_flag(ifr.ifr_name, IFF_MULTICAST) > 0) + fprintf(stderr, _("Warning: Interface %s still in ALLMULTI mode.\n"), ifr.ifr_name); spp++; continue; } @@ -430,6 +461,8 @@ if (!strcmp(*spp, "-dynamic")) { goterr |= clr_flag(ifr.ifr_name, IFF_DYNAMIC); spp++; + if (test_flag(ifr.ifr_name, IFF_MULTICAST) > 0) + fprintf(stderr, _("Warning: Interface %s still in DYNAMIC mode.\n"), ifr.ifr_name); continue; } #endif @@ -486,6 +519,8 @@ if (!strcmp(*spp, "-broadcast")) { goterr |= clr_flag(ifr.ifr_name, IFF_BROADCAST); + if (test_flag(ifr.ifr_name, IFF_MULTICAST) > 0) + fprintf(stderr, _("Warning: Interface %s still in BROADCAST mode.\n"), ifr.ifr_name); spp++; continue; } @@ -541,7 +576,7 @@ continue; } didnetmask++; - goterr = set_netmask(ap->fd, &ifr, &sa); + goterr |= set_netmask(ap->fd, &ifr, &sa); spp++; continue; } @@ -613,6 +648,8 @@ if (!strcmp(*spp, "-pointopoint")) { goterr |= clr_flag(ifr.ifr_name, IFF_POINTOPOINT); spp++; + if (test_flag(ifr.ifr_name, IFF_MULTICAST) > 0) + fprintf(stderr, _("Warning: Interface %s still in POINTOPOINT mode.\n"), ifr.ifr_name); continue; } if (!strcmp(*spp, "pointopoint")) { @@ -911,7 +948,7 @@ if (didnetmask) usage(); - goterr = set_netmask(skfd, &ifr, &sa); + goterr |= set_netmask(skfd, &ifr, &sa); didnetmask++; break; } @@ -980,6 +1017,9 @@ spp++; } + if (opt_v && goterr) + fprintf(stderr, _("WARNING: at least one error occured. (%d)\n"), goterr); + return (goterr); } --- net-tools-1.60.orig/netstat.c +++ net-tools-1.60/netstat.c @@ -6,7 +6,7 @@ * NET-3 Networking Distribution for the LINUX operating * system. * - * Version: $Id: netstat.c,v 1.43 2001/04/15 14:41:17 pb Exp $ + * Version: $Id: netstat.c,v 1.51 2004/06/03 22:27:37 ecki Exp $ * * Authors: Fred Baumgarten, * Fred N. van Kempen, @@ -85,6 +85,7 @@ #include #include #include +#include #include "net-support.h" #include "pathnames.h" @@ -216,7 +217,7 @@ static struct prg_node { struct prg_node *next; - int inode; + unsigned long inode; char name[PROGNAME_WIDTH]; } *prg_hash[PRG_HASH_SIZE]; @@ -249,7 +250,7 @@ /* NOT working as of glibc-2.0.7: */ #undef DIRENT_HAVE_D_TYPE_WORKS -static void prg_cache_add(int inode, char *name) +static void prg_cache_add(unsigned long inode, char *name) { unsigned hi = PRG_HASHIT(inode); struct prg_node **pnp,*pn; @@ -272,7 +273,7 @@ strcpy(pn->name,name); } -static const char *prg_cache_get(int inode) +static const char *prg_cache_get(unsigned long inode) { unsigned hi=PRG_HASHIT(inode); struct prg_node *pn; @@ -295,16 +296,18 @@ prg_cache_loaded=0; } -static void extract_type_1_socket_inode(const char lname[], long * inode_p) { +static int extract_type_1_socket_inode(const char lname[], unsigned long * inode_p) { /* If lname is of the form "socket:[12345]", extract the "12345" as *inode_p. Otherwise, return -1 as *inode_p. */ - if (strlen(lname) < PRG_SOCKET_PFXl+3) *inode_p = -1; - else if (memcmp(lname, PRG_SOCKET_PFX, PRG_SOCKET_PFXl)) *inode_p = -1; - else if (lname[strlen(lname)-1] != ']') *inode_p = -1; - else { + if (strlen(lname) < PRG_SOCKET_PFXl+3) return(-1); + + if (memcmp(lname, PRG_SOCKET_PFX, PRG_SOCKET_PFXl)) return(-1); + if (lname[strlen(lname)-1] != ']') return(-1); + + { char inode_str[strlen(lname + 1)]; /* e.g. "12345" */ const int inode_str_len = strlen(lname) - PRG_SOCKET_PFXl - 1; char *serr; @@ -313,37 +316,41 @@ inode_str[inode_str_len] = '\0'; *inode_p = strtol(inode_str,&serr,0); if (!serr || *serr || *inode_p < 0 || *inode_p >= INT_MAX) - *inode_p = -1; + return(-1); } + return(0); } -static void extract_type_2_socket_inode(const char lname[], long * inode_p) { +static int extract_type_2_socket_inode(const char lname[], unsigned long * inode_p) { /* If lname is of the form "[0000]:12345", extract the "12345" as *inode_p. Otherwise, return -1 as *inode_p. */ - if (strlen(lname) < PRG_SOCKET_PFX2l+1) *inode_p = -1; - else if (memcmp(lname, PRG_SOCKET_PFX2, PRG_SOCKET_PFX2l)) *inode_p = -1; - else { + if (strlen(lname) < PRG_SOCKET_PFX2l+1) return(-1); + if (memcmp(lname, PRG_SOCKET_PFX2, PRG_SOCKET_PFX2l)) return(-1); + + { char *serr; *inode_p=strtol(lname + PRG_SOCKET_PFX2l,&serr,0); if (!serr || *serr || *inode_p < 0 || *inode_p >= INT_MAX) - *inode_p = -1; + return(-1); } + return(0); } + static void prg_cache_load(void) { char line[LINE_MAX],eacces=0; int procfdlen,fd,cmdllen,lnamelen; char lname[30],cmdlbuf[512],finbuf[PROGNAME_WIDTH]; - long inode; + unsigned long inode; const char *cs,*cmdlp; DIR *dirproc=NULL,*dirfd=NULL; struct dirent *direproc,*direfd; @@ -386,11 +393,9 @@ lnamelen=readlink(line,lname,sizeof(lname)-1); lname[lnamelen] = '\0'; /*make it a null-terminated string*/ - extract_type_1_socket_inode(lname, &inode); - - if (inode < 0) extract_type_2_socket_inode(lname, &inode); - - if (inode < 0) continue; + if (extract_type_1_socket_inode(lname, &inode) < 0) + if (extract_type_2_socket_inode(lname, &inode) < 0) + continue; if (!cmdlp) { if (procfdlen - PATH_FD_SUFFl + PATH_CMDLINEl >= @@ -530,7 +535,7 @@ printf("%-10s ", pw->pw_name); else printf("%-10d ", uid); - printf("%-10ld ",inode); + printf("%-10lu ",inode); } if (flag_prg) printf("%-" PROGNAME_WIDTHs "s",prg_cache_get(inode)); @@ -700,11 +705,72 @@ igmp_do_one); } +static void tcpudp_one_end(char *result_buf, size_t result_buf_size, + struct aftype *ap, int end_port, + struct sockaddr *endaddr, const char *protostr) +{ + char buffer[8192]; + + snprintf(buffer, sizeof(buffer), "%s", + get_sname(htons(end_port), protostr, + flag_not & FLAG_NUM_PORT)); + + assert(result_buf_size > 23); + + safe_strncpy(result_buf, ap->sprint(endaddr, flag_not), result_buf_size); + if ((strlen(result_buf) + strlen(buffer)) > 22 && + !(flag_not & FLAG_NUM_HOST)) + result_buf[22 - strlen(buffer)] = '\0'; + + assert(strlen(result_buf) + strlen(buffer) + 1 < sizeof(buffer)); + strcat(result_buf, ":"); + strcat(result_buf, buffer); +} + +static void reduce_deficit(int *deficit, int *spc, int min_spc) +{ + int reduction; + reduction= netmin(*deficit, *spc - min_spc); + if (reduction <= 0) return; + *spc -= reduction; + *deficit -= reduction; +} + +static void tcpudp_write(const char *protname, + unsigned long rxq, unsigned long txq, + const char *local_addr, const char *rem_addr, + const char *state) { + int rxq_spc, txq_spc, local_addr_spc, rem_addr_spc, protname_spc; + int local_addr_len, rem_addr_len, deficit; + + protname_spc = 5; + rxq_spc = 6; + txq_spc = 6; + local_addr_spc = 23; + local_addr_len = strlen(local_addr); + rem_addr_spc = 23; + rem_addr_len = strlen(rem_addr); + deficit = netmax(local_addr_len - local_addr_spc, 0) + + netmax(rem_addr_len - rem_addr_spc, 0); + + reduce_deficit(&deficit, &rem_addr_spc, rem_addr_len); + reduce_deficit(&deficit, &local_addr_spc, local_addr_len); + reduce_deficit(&deficit, &txq_spc, 1); + reduce_deficit(&deficit, &rxq_spc, 1); + reduce_deficit(&deficit, &protname_spc, strlen(protname)); + + printf("%-*s %*ld %*ld %-*s %-*s %-11s", + protname_spc, protname, rxq_spc, rxq, txq_spc, txq, + local_addr_spc, local_addr, + rem_addr_spc, rem_addr, state); +} + static void tcp_do_one(int lnr, const char *line) { unsigned long rxq, txq, time_len, retr, inode; int num, local_port, rem_port, d, state, uid, timer_run, timeout; - char rem_addr[128], local_addr[128], timers[64], buffer[1024], more[512]; + char rem_addr[128], local_addr[128], timers[64], more[512]; + char *protname; struct aftype *ap; #if HAVE_AFINET6 struct sockaddr_in6 localaddr, remaddr; @@ -719,12 +785,13 @@ return; num = sscanf(line, - "%d: %64[0-9A-Fa-f]:%X %64[0-9A-Fa-f]:%X %X %lX:%lX %X:%lX %lX %d %d %ld %512s\n", + "%d: %64[0-9A-Fa-f]:%X %64[0-9A-Fa-f]:%X %X %lX:%lX %X:%lX %lX %d %d %lu %512s\n", &d, local_addr, &local_port, rem_addr, &rem_port, &state, &txq, &rxq, &timer_run, &time_len, &retr, &uid, &timeout, &inode, more); if (strlen(local_addr) > 8) { #if HAVE_AFINET6 + protname = "tcp6"; /* Demangle what the kernel gives us */ sscanf(local_addr, "%08X%08X%08X%08X", &in6.s6_addr32[0], &in6.s6_addr32[1], @@ -740,6 +807,7 @@ remaddr.sin6_family = AF_INET6; #endif } else { + protname = "tcp"; sscanf(local_addr, "%X", &((struct sockaddr_in *) &localaddr)->sin_addr.s_addr); sscanf(rem_addr, "%X", @@ -768,25 +836,15 @@ safe_strncpy(rem_addr, ap->sprint((struct sockaddr *) &remaddr, flag_not), sizeof(rem_addr)); if (flag_all || (flag_lst && !rem_port) || (!flag_lst && rem_port)) { - snprintf(buffer, sizeof(buffer), "%s", - get_sname(htons(local_port), "tcp", - flag_not & FLAG_NUM_PORT)); - - if ((strlen(local_addr) + strlen(buffer)) > 22) - local_addr[22 - strlen(buffer)] = '\0'; - - strcat(local_addr, ":"); - strcat(local_addr, buffer); - snprintf(buffer, sizeof(buffer), "%s", - get_sname(htons(rem_port), "tcp", flag_not & FLAG_NUM_PORT)); - - if ((strlen(rem_addr) + strlen(buffer)) > 22) - rem_addr[22 - strlen(buffer)] = '\0'; + tcpudp_one_end(local_addr, sizeof(local_addr), + ap, local_port, (struct sockaddr *) &localaddr, + "tcp"); + + tcpudp_one_end(rem_addr, sizeof(rem_addr), + ap, rem_port, (struct sockaddr *) &remaddr, + "tcp"); - strcat(rem_addr, ":"); - strcat(rem_addr, buffer); timers[0] = '\0'; - if (flag_opt) switch (timer_run) { case 0: @@ -813,8 +871,11 @@ timer_run, (double) time_len / HZ, retr, timeout); break; } - printf("tcp %6ld %6ld %-23s %-23s %-12s", - rxq, txq, local_addr, rem_addr, _(tcp_state[state])); + + tcpudp_write(protname, + rxq, txq, + local_addr, rem_addr, + _(tcp_state[state])); finish_this_one(uid,inode,timers); } @@ -828,9 +889,10 @@ static void udp_do_one(int lnr, const char *line) { - char buffer[8192], local_addr[64], rem_addr[64]; + char local_addr[64], rem_addr[64]; char *udp_state, timers[64], more[512]; int num, local_port, rem_port, d, state, timer_run, uid, timeout; + char *protname; #if HAVE_AFINET6 struct sockaddr_in6 localaddr, remaddr; char addr6[INET6_ADDRSTRLEN]; @@ -847,13 +909,14 @@ more[0] = '\0'; num = sscanf(line, - "%d: %64[0-9A-Fa-f]:%X %64[0-9A-Fa-f]:%X %X %lX:%lX %X:%lX %lX %d %d %ld %512s\n", + "%d: %64[0-9A-Fa-f]:%X %64[0-9A-Fa-f]:%X %X %lX:%lX %X:%lX %lX %d %d %lu %512s\n", &d, local_addr, &local_port, rem_addr, &rem_port, &state, &txq, &rxq, &timer_run, &time_len, &retr, &uid, &timeout, &inode, more); if (strlen(local_addr) > 8) { #if HAVE_AFINET6 + protname="udp6"; sscanf(local_addr, "%08X%08X%08X%08X", &in6.s6_addr32[0], &in6.s6_addr32[1], &in6.s6_addr32[2], &in6.s6_addr32[3]); @@ -868,6 +931,7 @@ remaddr.sin6_family = AF_INET6; #endif } else { + protname="udp"; sscanf(local_addr, "%X", &((struct sockaddr_in *) &localaddr)->sin_addr.s_addr); sscanf(rem_addr, "%X", @@ -917,24 +981,13 @@ 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)); - snprintf(buffer, sizeof(buffer), "%s", - get_sname(htons(local_port), "udp", - flag_not & FLAG_NUM_PORT)); - if ((strlen(local_addr) + strlen(buffer)) > 22) - local_addr[22 - strlen(buffer)] = '\0'; - strcat(local_addr, ":"); - strcat(local_addr, buffer); - - 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)); - if ((strlen(rem_addr) + strlen(buffer)) > 22) - rem_addr[22 - strlen(buffer)] = '\0'; - strcat(rem_addr, ":"); - strcat(rem_addr, buffer); + tcpudp_one_end(local_addr, sizeof(local_addr), + ap, local_port, (struct sockaddr *) &localaddr, + "udp"); + + tcpudp_one_end(rem_addr, sizeof(rem_addr), + ap, rem_port, (struct sockaddr *) &remaddr, + "udp"); timers[0] = '\0'; if (flag_opt) @@ -953,8 +1006,11 @@ retr, timeout); break; } - printf("udp %6ld %6ld %-23s %-23s %-12s", - rxq, txq, local_addr, rem_addr, udp_state); + + tcpudp_write(protname, + rxq, txq, + local_addr, rem_addr, + udp_state); finish_this_one(uid,inode,timers); } @@ -971,6 +1027,7 @@ char buffer[8192], local_addr[64], rem_addr[64]; char timers[64], more[512]; int num, local_port, rem_port, d, state, timer_run, uid, timeout; + char *protname; #if HAVE_AFINET6 struct sockaddr_in6 localaddr, remaddr; char addr6[INET6_ADDRSTRLEN]; @@ -987,12 +1044,13 @@ more[0] = '\0'; num = sscanf(line, - "%d: %64[0-9A-Fa-f]:%X %64[0-9A-Fa-f]:%X %X %lX:%lX %X:%lX %lX %d %d %ld %512s\n", + "%d: %64[0-9A-Fa-f]:%X %64[0-9A-Fa-f]:%X %X %lX:%lX %X:%lX %lX %d %d %lu %512s\n", &d, local_addr, &local_port, rem_addr, &rem_port, &state, &txq, &rxq, &timer_run, &time_len, &retr, &uid, &timeout, &inode, more); if (strlen(local_addr) > 8) { #if HAVE_AFINET6 + protname = "raw6"; sscanf(local_addr, "%08X%08X%08X%08X", &in6.s6_addr32[0], &in6.s6_addr32[1], &in6.s6_addr32[2], &in6.s6_addr32[3]); @@ -1007,6 +1065,7 @@ remaddr.sin6_family = AF_INET6; #endif } else { + protname = "raw"; sscanf(local_addr, "%X", &((struct sockaddr_in *) &localaddr)->sin_addr.s_addr); sscanf(rem_addr, "%X", @@ -1074,8 +1133,8 @@ retr, timeout); break; } - printf("raw %6ld %6ld %-23s %-23s %-12d", - rxq, txq, local_addr, rem_addr, state); + printf("%-4s %6ld %6ld %-23s %-23s %-11d", + protname, rxq, txq, local_addr, rem_addr, state); finish_this_one(uid,inode,timers); } @@ -1099,9 +1158,9 @@ static int has = 0; char path[MAXPATHLEN], ss_flags[32]; char *ss_proto, *ss_state, *ss_type; - int num, state, type, inode; + int num, state, type; void *d; - unsigned long refcnt, proto, flags; + unsigned long refcnt, proto, flags, inode; if (nr == 0) { if (strstr(line, "Inode")) @@ -1109,14 +1168,14 @@ return; } path[0] = '\0'; - num = sscanf(line, "%p: %lX %lX %lX %X %X %d %s", + num = sscanf(line, "%p: %lX %lX %lX %X %X %lu %s", &d, &refcnt, &proto, &flags, &type, &state, &inode, path); if (num < 6) { fprintf(stderr, _("warning, got bogus unix line.\n")); return; } if (!(has & HAS_INODE)) - snprintf(path,sizeof(path),"%d",inode); + snprintf(path,sizeof(path),"%lu",inode); if (!flag_all) { if ((state == SS_UNCONNECTED) && (flags & SO_ACCEPTCON)) { @@ -1208,9 +1267,9 @@ printf("%-5s %-6ld %-11s %-10s %-13s ", ss_proto, refcnt, ss_flags, ss_type, ss_state); if (has & HAS_INODE) - printf("%-6d ",inode); + printf("%-8lu ",inode); else - printf("- "); + printf("- "); if (flag_prg) printf("%-" PROGNAME_WIDTHs "s",(has & HAS_INODE?prg_cache_get(inode):"-")); puts(path); @@ -1449,7 +1508,7 @@ } if (flag_exp < 2) { ife_short = 1; - printf(_("Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg\n")); + printf(_("Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg\n")); } if (for_all_interfaces(do_if_print, &flag_all) < 0) { @@ -1457,7 +1516,7 @@ exit(1); } if (flag_cnt) - free_interface_list(); + if_cache_free(); else { close(skfd); skfd = -1; @@ -1503,7 +1562,7 @@ fprintf(stderr, _(" -C, --cache display routing cache instead of FIB\n\n")); fprintf(stderr, _(" ={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx --netrom\n")); - fprintf(stderr, _(" =Use '-A ' or '--'; default: %s\n"), DFLT_AF); + fprintf(stderr, _(" =Use '-6|-4' or '-A ' or '--'; default: %s\n"), DFLT_AF); fprintf(stderr, _(" List of possible address families (which support routing):\n")); print_aflist(1); /* 1 = routeable */ exit(E_USAGE); @@ -1514,7 +1573,7 @@ (int argc, char *argv[]) { int i; int lop; - struct option longopts[] = + static struct option longopts[] = { AFTRANS_OPTS, {"version", 0, 0, 'V'}, @@ -1556,7 +1615,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:acdegphinNorstuVv?wxl64", longopts, &lop)) != EOF) switch (i) { case -1: break; @@ -1624,6 +1683,14 @@ case 'o': flag_opt++; break; + case '6': + if (aftrans_opt("inet6")) + exit(1); + break; + case '4': + if (aftrans_opt("inet")) + exit(1); + break; case 'V': version(); /*NOTREACHED */ --- net-tools-1.60.orig/route.c +++ net-tools-1.60/route.c @@ -2,7 +2,7 @@ * route This file contains an implementation of the command * that manages the IP routing table in the kernel. * - * Version: $Id: route.c,v 1.9 2001/04/15 14:41:17 pb Exp $ + * Version: $Id: route.c,v 1.10 2002/07/30 05:24:20 ecki Exp $ * * Maintainer: Bernd 'eckes' Eckenfels, * @@ -142,7 +142,7 @@ } /* Fetch the command-line arguments. */ - while ((i = getopt_long(argc, argv, "A:eCFhnNVv?", longopts, &lop)) != EOF) + while ((i = getopt_long(argc, argv, "A:eCFhnN64Vv?", longopts, &lop)) != EOF) switch (i) { case -1: break; @@ -176,6 +176,14 @@ if ((i = aftrans_opt(optarg))) exit(i); break; + case '6': + if ((i = aftrans_opt("inet6"))) + exit(i); + break; + case '4': + if ((i = aftrans_opt("inet"))) + exit(i); + break; case 'V': version(); case 'h': --- net-tools-1.60.orig/statistics.c +++ net-tools-1.60/statistics.c @@ -1,6 +1,6 @@ /* * Copyright 1997,1999,2000 Andi Kleen. Subject to the GPL. - * $Id: statistics.c,v 1.14 2001/02/02 18:01:23 pb Exp $ + * $Id: statistics.c,v 1.17 2002/04/28 15:41:01 ak Exp $ * 19980630 - i18n - Arnaldo Carvalho de Melo * 19981113 - i18n fixes - Arnaldo Carvalho de Melo * 19990101 - added net/netstat, -t, -u, -w supprt - Bernd Eckenfels @@ -175,16 +175,54 @@ { "ListenDrops", N_("%u SYNs to LISTEN sockets ignored"), opt_number }, { "TCPPrequeued", N_("%u packets directly queued to recvmsg prequeue."), opt_number }, - { "TCPDirectCopyFromBacklog", N_("%u packets directly received" + { "TCPDirectCopyFromBacklog", N_("%u of bytes directly received" " from backlog"), opt_number }, - { "TCPDirectCopyFromPrequeue", N_("%u packets directly received" + { "TCPDirectCopyFromPrequeue", N_("%u of bytes directly received" " from prequeue"), opt_number }, { "TCPPrequeueDropped", N_("%u packets dropped from prequeue"), opt_number }, - { "TCPHPHits", N_("%u packets header predicted"), number }, + { "TCPHPHits", N_("%u packet headers predicted"), number }, { "TCPHPHitsToUser", N_("%u packets header predicted and " "directly queued to user"), opt_number }, { "SockMallocOOM", N_("Ran %u times out of system memory during " "packet sending"), opt_number }, + { "TCPPureAcks", N_("%u acknowledgments not containing data received"), opt_number }, + { "TCPHPAcks", N_("%u predicted acknowledgments"), opt_number }, + { "TCPRenoRecovery", N_("%u times recovered from packet loss due to fast retransmit"), opt_number }, + { "TCPSackRecovery", N_("%u times recovered from packet loss due to SACK data"), opt_number }, + { "TCPSACKReneging", N_("%u bad SACKs received"), opt_number }, + { "TCPFACKReorder", N_("Detected reordering %u times using FACK"), opt_number }, + { "TCPSACKReorder", N_("Detected reordering %u times using SACK"), opt_number }, + { "TCPTSReorder", N_("Detected reordering %u times using time stamp"), opt_number }, + { "TCPRenoReorder", N_("Detected reordering %u times using reno fast retransmit"), opt_number }, + { "TCPFullUndo", N_("%u congestion windows fully recovered"), opt_number }, + { "TCPPartialUndo", N_("%u congestion windows partially recovered using Hoe heuristic"), opt_number }, + { "TCPDSackUndo", N_("%u congestion window recovered using DSACK"), opt_number }, + { "TCPLossUndo", N_("%u congestion windows recovered after partial ack"), opt_number }, + { "TCPLostRetransmits", N_("%u retransmits lost"), opt_number }, + { "TCPRenoFailures", N_("%u timeouts after reno fast retransmit"), opt_number }, + { "TCPSackFailures", N_("%u timeouts after SACK recovery"), opt_number }, + { "TCPLossFailures", N_("%u timeouts in loss state"), opt_number }, + { "TCPFastRetrans", N_("%u fast retransmits"), opt_number }, + { "TCPForwardRetrans", N_("%u forward retransmits"), opt_number }, + { "TCPSlowStartRetrans", N_("%u retransmits in slow start"), opt_number }, + { "TCPTimeouts", N_("%u other TCP timeouts"), opt_number }, + { "TCPRenoRecoveryFailed", N_("%u reno fast retransmits failed"), opt_number }, + { "TCPSackRecoveryFail", N_("%u sack retransmits failed"), opt_number }, + { "TCPSchedulerFailed", N_("%u times receiver scheduled too late for direct processing"), opt_number }, + { "TCPRcvCollapsed", N_("%u packets collapsed in receive queue due to low socket buffer"), opt_number }, + { "TCPDSACKOldSent", N_("%u DSACKs sent for old packets"), opt_number }, + { "TCPDSACKOfoSent", N_("%u DSACKs sent for out of order packets"), opt_number }, + { "TCPDSACKRecv", N_("%u DSACKs received"), opt_number }, + { "TCPDSACKOfoRecv", N_("%u DSACKs for out of order packets received"), opt_number }, + { "TCPAbortOnSyn", N_("%u connections reset due to unexpected SYN"), opt_number }, + { "TCPAbortOnData", N_("%u connections reset due to unexpected data"), opt_number }, + { "TCPAbortOnClose", N_("%u connections reset due to early user close"), opt_number }, + { "TCPAbortOnMemory", N_("%u connections aborted due to memory pressure"), opt_number }, + { "TCPAbortOnTimeout", N_("%u connections aborted due to timeout"), opt_number }, + { "TCPAbortOnLinger", N_("%u connections aborted after user close in linger timeout"), opt_number }, + { "TCPAbortFailed", N_("%u times unabled to send RST due to no memory"), opt_number }, + { "TCPMemoryPressures", N_("TCP ran low on memory %u times"), opt_number }, + { "TCPLoss", N_("%u TCP data loss events") }, }; struct tabtab { @@ -222,7 +260,8 @@ ent = bsearch(&key, tab->tab, tab->size / sizeof(struct entry), sizeof(struct entry), cmpentries); if (!ent) { /* try our best */ - printf("%*s%s: %d\n", states[state].indent, "", title, val); + if (val) + printf("%*s%s: %d\n", states[state].indent, "", title, val); return; } type = ent->type; --- net-tools-1.60.orig/include/interface.h +++ net-tools-1.60/include/interface.h @@ -64,13 +64,17 @@ extern int if_fetch(struct interface *ife); extern int for_all_interfaces(int (*)(struct interface *, void *), void *); -extern int free_interface_list(void); +extern int if_cache_free(void); extern struct interface *lookup_interface(char *name); extern int if_readlist(void); extern int do_if_fetch(struct interface *ife); extern int do_if_print(struct interface *ife, void *cookie); +extern int procnetdev_version(char *buf); +extern int get_dev_fields(char *bp, struct interface *ife); +extern char * get_name(char *name, char *p); + extern void ife_print(struct interface *ptr); extern int ife_short; --- net-tools-1.60.orig/include/mii.h +++ net-tools-1.60/include/mii.h @@ -6,11 +6,14 @@ * Copyright (C) 2000 David A. Hinds -- dhinds@pcmcia.sourceforge.org */ -#ifndef _LINUX_MII_H -#define _LINUX_MII_H +#ifndef _NETTOOL_MII_H +#define _NETTOOLS_MII_H + +#include /* network interface ioctl's for MII commands */ #ifndef SIOCGMIIPHY +#warning "SIOCGMIIPHY is not defined by your kernel source" #define SIOCGMIIPHY (SIOCDEVPRIVATE) /* Read from current PHY */ #define SIOCGMIIREG (SIOCDEVPRIVATE+1) /* Read any PHY register */ #define SIOCSMIIREG (SIOCDEVPRIVATE+2) /* Write any PHY register */ @@ -83,4 +86,4 @@ #define MII_ANER_PAGE_RX 0x0002 #define MII_ANER_LP_AN_ABLE 0x0001 -#endif /* _LINUX_MII_H */ +#endif /* _NETTOOLS_MII_H */ --- net-tools-1.60.orig/man/en_US/arp.8 +++ net-tools-1.60/man/en_US/arp.8 @@ -1,4 +1,4 @@ -.TH ARP 8 "5 Jan 1999" "net-tools" "Linux Programmer's Manual" +.TH ARP 8 "2005-05-16" "net-tools" "Linux Programmer's Manual" .SH NAME arp \- manipulate the system ARP cache .SH SYNOPSIS @@ -132,7 +132,10 @@ entire subnet. Linux instead does automagic proxy arp when a route exists and it is forwarding. See .BR arp (7) -for details. +for details. Also the +.B dontpub +option which is available for delete and set operations cannot be +used with 2.4 and newer kernels. .TP .B "\-f filename, \-\-file filename" Similar to the --- net-tools-1.60.orig/man/en_US/ethers.5 +++ net-tools-1.60/man/en_US/ethers.5 @@ -1,4 +1,4 @@ -.TH ETHERS 5 "April 26th, 1996" "" "File formats" +.TH ETHERS 5 "May 15th, 2005" "" "File formats" .SH NAME \"{{{roff}}}\"{{{ ethers \- Ethernet address to IP number database .\"}}} @@ -10,8 +10,8 @@ \fIEthernet-address\fP \fIIP-number\fP .RE .sp -The two items are separated by any number of SPACE and/or TAB char -acters. A \fB#\fP at the beginning of a line starts a comment +The two items are separated by any number of SPACE and/or TAB characters. +A \fB#\fP at the beginning of a line starts a comment which extends to the end of the line. The \fIEthernet-address\fP is written as .IR x : x : x : x : x : x , --- net-tools-1.60.orig/man/en_US/ifconfig.8 +++ net-tools-1.60/man/en_US/ifconfig.8 @@ -1,10 +1,10 @@ -.TH IFCONFIG 8 "14 August 2000" "net-tools" "Linux Programmer's Manual" +.TH IFCONFIG 8 "2005-06-30" "net-tools" "Linux Programmer's Manual" .SH NAME ifconfig \- configure a network interface .SH SYNOPSIS -.B "ifconfig [interface]" +.B "ifconfig [-v] [-a] [-s] [interface]" .br -.B "ifconfig interface [aftype] options | address ..." +.B "ifconfig [-v] interface [aftype] options | address ..." .SH DESCRIPTION .B Ifconfig is used to configure the kernel-resident network interfaces. It is @@ -41,11 +41,27 @@ (AMPR Packet radio). .SH OPTIONS .TP +.B -a +display all interfaces which are currently available, even if down +.TP +.B -s +display a short list (like netstat -i) +.TP +.B -v +be more verbose for some error conditions +.TP .B interface The name of the interface. This is usually a driver name followed by a unit number, for example .B eth0 -for the first Ethernet interface. +for the first Ethernet interface. If your kernel supports alias interfaces, +you can specify them with +.B eth0:0 +for the first alias of eth0. You can use them to assign a second address. To +delete an alias interface use +.B ifconfig eth0:0 down +. Note: for every scope (i.e. same net with address/netmask combination) all +aliases are deleted, if you delete the first (primary). .TP .B up This flag causes the interface to be activated. It is implicitly @@ -173,11 +189,20 @@ are shared with all alias addresses on the same device. If you want per-address statistics you should add explicit accounting rules for the address using the -.BR ipchains(8) +.BR ipchains (8) +or +.BR iptables (8) command. .LP -Interrupt problems with Ethernet device drivers fail with EAGAIN. See -.I http://cesdis.gsfc.nasa.gov/linux/misc/irq-conflict.html +Since net-tools 1.60-4 ifconfig is printing byte counters and human readable +counters with IEC 60027-2 units. So 1 KiB are 2^10 byte. Note, the numbers +are truncated to one decimal (which can by quite a large error if you +consider 0.1 PiB is 112.589.990.684.262 bytes :) +.LP +Interrupt problems with Ethernet device drivers fail with EAGAIN +.I (SIOCSIIFLAGS: Resource temporarily unavailable) +it is most likely a interrupt conflict. See +.I http://www.scyld.com/expert/irq-conflict.html for more information. .SH FILES .I /proc/net/socket @@ -189,7 +214,9 @@ While appletalk DDP and IPX addresses will be displayed they cannot be altered by this command. .SH SEE ALSO -route(8), netstat(8), arp(8), rarp(8), ipchains(8) +route(8), netstat(8), arp(8), rarp(8), ipchains(8), iptables(8) +.br +http://physics.nist.gov/cuu/Units/binary.html - Prefixes for binary multiples .SH AUTHORS Fred N. van Kempen, .br @@ -198,3 +225,5 @@ Phil Blundell, .br Andi Kleen +.br +Bernd Eckenfels, --- net-tools-1.60.orig/man/en_US/netstat.8 +++ net-tools-1.60/man/en_US/netstat.8 @@ -8,7 +8,7 @@ .\" Modified: Tuan Hoang tqhoang@bigfoot.com .\" .\" -.TH NETSTAT 8 "19 December 2000" "net-tools" "Linux Programmer's Manual" +.TH NETSTAT 8 "24 November 2001" "net-tools" "Linux Programmer's Manual" .SH NAME netstat \- Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships @@ -23,7 +23,7 @@ .RB [ \-\-listening | \-l ] .RB [ \-\-all | \-a ] .RB [ \-\-numeric | \-n ] -.RB [ \-\-numeric-hosts ] [ \-\-numeric-ports ] [ \-\-numeric-ports ] +.RB [ \-\-numeric-hosts "] [" \-\-numeric-ports "] [" \-\-numeric-users ] .RB [ \-\-symbolic | \-N ] .RB [ \-\-extend | \-e [ \-\-extend | \-e] ] .RB [ \-\-timers | \-o ] @@ -37,31 +37,30 @@ .RB [ \-\-extend | \-e [ \-\-extend | \-e] ] .RB [ \-\-verbose | \-v ] .RB [ \-\-numeric | \-n ] -.RB [ \-\-numeric-hosts ] [ \-\-numeric-ports ] [ \-\-numeric-ports ] +.RB [ \-\-numeric-hosts "] [" \-\-numeric-ports "] [" \-\-numeric-users ] .RB [ \-\-continuous | \-c] .P .B netstat .RB { \-\-interfaces | \-i } -.RI [ iface ] .RB [ \-\-all | \-a ] .RB [ \-\-extend | \-e [ \-\-extend | \-e] ] .RB [ \-\-verbose | \-v ] .RB [ \-\-program | \-p ] .RB [ \-\-numeric | \-n ] -.RB [ \-\-numeric-hosts ] [ \-\-numeric-ports ] [ \-\-numeric-ports ] +.RB [ \-\-numeric-hosts "] [" \-\-numeric-ports "] [" \-\-numeric-users ] .RB [ \-\-continuous | \-c] .P .B netstat .RB { \-\-groups | \-g } .RB [ \-\-numeric | \-n ] -.RB [ \-\-numeric-hosts ] [ \-\-numeric-ports ] [ \-\-numeric-ports ] +.RB [ \-\-numeric-hosts "] [" \-\-numeric-ports "] [" \-\-numeric-users ] .RB [ \-\-continuous | \-c] .P .B netstat .RB { \-\-masquerade | \-M } .RB [ \-\-extend | \-e ] .RB [ \-\-numeric | \-n ] -.RB [ \-\-numeric-hosts ] [ \-\-numeric-ports ] [ \-\-numeric-ports ] +.RB [ \-\-numeric-hosts "] [" \-\-numeric-ports "] [" \-\-numeric-users ] .RB [ \-\-continuous | \-c] .P .B netstat @@ -101,9 +100,8 @@ Display the kernel routing tables. .SS "\-\-groups , \-g" Display multicast group membership information for IPv4 and IPv6. -.SS "\-\-interface=\fIiface \fR, \fB\-i" -Display a table of all network interfaces, or the specified -.IR iface ) . +.SS "\-\-interface, \-i" +Display a table of all network interfaces. .SS "\-\-masquerade , \-M" Display a list of masqueraded connections. .SS "\-\-statistics , \-s" @@ -165,7 +163,7 @@ .SS "\-a, \-\-all" Show both listening and non-listening sockets. With the .B --interfaces -option, show interfaces that are not marked +option, show interfaces that are not up .SS "\-F" Print routing information from the FIB. (This is the default.) .SS "\-C" @@ -221,7 +219,7 @@ The socket is waiting after close to handle packets still in the network. .TP .I -CLOSED +CLOSE The socket is not being used. .TP .I @@ -438,7 +436,7 @@ .P .SH AUTHORS The netstat user interface was written by Fred Baumgarten - the man page basically +, the man page basically by Matt Welsh . It was updated by Alan Cox but could do with a bit more work. It was updated again by Tuan Hoang --- net-tools-1.60.orig/man/en_US/route.8 +++ net-tools-1.60/man/en_US/route.8 @@ -1,4 +1,4 @@ -.TH ROUTE 8 "2 January 2000" "net-tools" "Linux Programmer's Manual" +.TH ROUTE 8 "02 October 2003" "net-tools" "Linux Programmer's Manual" .SH NAME route \- show / manipulate the IP routing table .SH SYNOPSIS @@ -141,7 +141,7 @@ set the TCP Maximum Segment Size (MSS) for connections over this route to M bytes. The default is the device MTU minus headers, or a lower MTU when path mtu -discovery occured. This setting can be used to force smaller TCP packets on the +discovery occurred. This setting can be used to force smaller TCP packets on the other end when path mtu discovery does not work (usually because of misconfigured firewalls that block ICMP Fragmentation Needed) .TP @@ -182,7 +182,7 @@ .B route add -net 127.0.0.0 adds the normal loopback entry, using netmask 255.0.0.0 (class A net, determined from the destination address) and associated with the -"lo" device (assuming this device was prviously set up correctly with +"lo" device (assuming this device was previously set up correctly with .BR ifconfig (8)). .TP @@ -289,7 +289,7 @@ Interface to which packets for this route will be sent. .TP .B MSS -Default maximum segement size for TCP connections over this route. +Default maximum segment size for TCP connections over this route. .TP .B Window Default window size for TCP connections over this route. --- net-tools-1.60.orig/man/en_US/slattach.8 +++ net-tools-1.60/man/en_US/slattach.8 @@ -1,4 +1,4 @@ -.TH SLATTACH 8 "12 Feb 1994" "" "" +.TH SLATTACH 8 "4 Sep 2005" "" "" .SH NAME slattach \- attach a network interface to a serial line .SH SYNOPSIS @@ -41,7 +41,7 @@ .TP .B "[-e]" Exit right after initializing device, instead of waiting for the -line to hangup. +line to hang up. .TP .B "[-L]" Enable 3 wire operation. The terminal is moved into CLOCAL mode, --- net-tools-1.60.orig/man/en_US/mii-tool.8 +++ net-tools-1.60/man/en_US/mii-tool.8 @@ -1,7 +1,7 @@ .\" Copyright (C) 2000 David A. Hinds -- dhinds@pcmcia.sourceforge.org .\" mii-tool.8 1.5 2000/04/25 22:58:19 .\" -.TH MII-TOOL 8 "2000/04/25 22:58:19" "net-tools" +.TH MII-TOOL 8 "2004/03/28 23:30:00" "net-tools" .SH NAME mii-tool \- view, manipulate media-independent interface status @@ -72,7 +72,24 @@ commas. Valid media are \fB100baseT4\fR, \fB100baseTx-FD\fR, \fB100baseTx-HD\fR, \fB10baseT-FD\fR, and \fB10baseT-HD\fR. +.SH DIAGNOSTICS +.TP +SIOCGMIIPHY on 'eth?' failed: Invalid argument +If the interface is not running (up), kernel will refuse to report its link state. +.TP +SIOCGMIIPHY on 'eth?' failed: Operation not permitted +Most kernels restrict access to root. +.TP +SIOCGMIIPHY on 'eth?' failed: No such device +This error is shown, if the kernel does not know about the named device. +.TP +SIOCGMIIPHY on 'eth?' failed: Operation not supported +The interface in question does not support MII queries. Most likely, it does not have +MII transceivers, at all. + .SH AUTHORS David Hinds \- dhinds@pcmcia.sourceforge.org .br Donald Becker \- becker@scyld.com +.br +Bernd Eckenfels \- ecki@debian.org --- net-tools-1.60.orig/man/de_DE/netstat.8 +++ net-tools-1.60/man/de_DE/netstat.8 @@ -9,7 +9,7 @@ .\" Modified: Tuan Hoang tuan@optimus.mitre.org .\" .\" -.TH NETSTAT 8 "6. M\(:arz 1999" "net-tools" "Handbuch f\(:ur Linuxprogrammierer" +.TH NETSTAT 8 "24. November 2001" "net-tools" "Handbuch f\(:ur Linuxprogrammierer" .SH NAME netstat \- Anzeige von Netzwerksverbindungen, Routentabellen, Schnittstellenstatistiken, maskierten Verbindungen, Netlink-Nachrichten und Mitgliedschaft in Multicastgruppen @@ -44,7 +44,6 @@ .B netstat .RB [ \-veenpac ] .RB { \-\-interfaces | \-i } -.RI [ Schnittstelle ] .PP @@ -103,11 +102,10 @@ Wegen Details siehe .BR route (8). -.SS "\-i, \-\-interface \fISchnittstelle\fI" +.SS "\-i, \-\-interface" Wird die .BR -i ", " --interfaces -Option verwendet, so wird eine Tabelle aller (oder der angegebenen -.IR Schnittstellen ) +Option verwendet, so wird eine Tabelle aller Schnittstellen ausgedruckt. Die Ausgabe ist im Format von .B "ifconfig -e" und wird in --- net-tools-1.60.orig/po/Makefile +++ net-tools-1.60/po/Makefile @@ -3,7 +3,7 @@ INSTALL_DATA= ${INSTALL} -m 644 INSTALLNLSDIR=${BASEDIR}/usr/share/locale -TUPDATE = tupdate +TUPDATE = msgmerge NLSPACKAGE = net-tools @@ -49,7 +49,7 @@ lang=`echo $$cat | sed 's/.mo//'`; \ mv $$lang.po $$lang.old.po; \ echo "$$lang:"; \ - if $(TUPDATE) $(NLSPACKAGE).pot $$lang.old.po > $$lang.po; then \ + if $(TUPDATE) $$lang.old.po $(NLSPACKAGE).pot > $$lang.po; then \ rm -f $$lang.old.po; \ else \ echo "tupdate for $$cat failed!"; \ --- net-tools-1.60.orig/po/de.po +++ net-tools-1.60/po/de.po @@ -1,4 +1,4 @@ -# $Id: de.po,v 1.10 2000/08/01 03:19:48 ecki Exp $ +# $Id: de.po,v 1.11 2003/10/25 21:15:09 ecki Exp $ # German translation for net-tools 1.51 # Copyright (C) 1999 Ralf Bächle msgid "" @@ -64,7 +64,7 @@ #: ../arp.c:467 msgid "(incomplete)" -msgstr "(unvollsändig)" +msgstr "(unvollständig)" #: ../arp.c:484 #, c-format --- net-tools-1.60.orig/po/net-tools.pot +++ net-tools-1.60/po/net-tools.pot @@ -1,263 +1,285 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Free Software Foundation, Inc. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2001-04-15 15:40+0100\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2005-05-16 05:18+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: ENCODING\n" +"Content-Transfer-Encoding: 8bit\n" -#: ../arp.c:111 ../arp.c:270 +#: ../arp.c:111 ../arp.c:276 +#, c-format msgid "arp: need host name\n" msgstr "" -#: ../arp.c:208 ../arp.c:222 +#: ../arp.c:213 ../arp.c:228 #, c-format msgid "No ARP entry for %s\n" msgstr "" -#: ../arp.c:240 +#: ../arp.c:246 #, c-format msgid "arp: cant get HW-Address for `%s': %s.\n" msgstr "" -#: ../arp.c:244 +#: ../arp.c:250 +#, c-format msgid "arp: protocol type mismatch.\n" msgstr "" -#: ../arp.c:253 +#: ../arp.c:259 #, c-format msgid "arp: device `%s' has HW address %s `%s'.\n" msgstr "" -#: ../arp.c:283 +#: ../arp.c:289 +#, c-format msgid "arp: need hardware address\n" msgstr "" -#: ../arp.c:291 +#: ../arp.c:297 +#, c-format msgid "arp: invalid hardware address\n" msgstr "" -#: ../arp.c:388 +#: ../arp.c:394 #, c-format msgid "arp: cannot open etherfile %s !\n" msgstr "" -#: ../arp.c:404 +#: ../arp.c:410 #, c-format msgid "arp: format error on line %u of etherfile %s !\n" msgstr "" -#: ../arp.c:417 +#: ../arp.c:423 #, c-format msgid "arp: cannot set entry on line %u of etherfile %s !\n" msgstr "" -#: ../arp.c:438 +#: ../arp.c:444 +#, c-format msgid "" "Address HWtype HWaddress Flags Mask " "Iface\n" msgstr "" -#: ../arp.c:468 +#: ../arp.c:472 +msgid "" +msgstr "" + +#: ../arp.c:474 msgid "(incomplete)" msgstr "" -#: ../arp.c:485 +#: ../arp.c:491 #, c-format msgid "%s (%s) at " msgstr "" -#: ../arp.c:491 +#: ../arp.c:497 +#, c-format msgid " " msgstr "" -#: ../arp.c:497 +#: ../arp.c:503 #, c-format msgid "netmask %s " msgstr "" -#: ../arp.c:514 +#: ../arp.c:520 #, c-format msgid "on %s\n" msgstr "" -#: ../arp.c:593 +#: ../arp.c:599 #, c-format msgid "Entries: %d\tSkipped: %d\tFound: %d\n" msgstr "" -#: ../arp.c:597 +#: ../arp.c:603 #, c-format msgid "%s (%s) -- no entry\n" msgstr "" -#: ../arp.c:599 +#: ../arp.c:605 #, c-format msgid "arp: in %d entries no match found.\n" msgstr "" -#: ../arp.c:614 +#: ../arp.c:620 +#, c-format msgid "" "Usage:\n" " arp [-vn] [] [-i ] [-a] [] <-Display ARP " "cache\n" msgstr "" -#: ../arp.c:615 +#: ../arp.c:621 +#, c-format msgid "" " arp [-v] [-i ] -d [pub][nopub] <-Delete ARP " "entry\n" msgstr "" -#: ../arp.c:616 +#: ../arp.c:622 +#, c-format msgid "" -" arp [-vnD] [] [-i ] -f [] <-Add entry from " +" arp [-vnD] [] [-i ] -f [] <-Add entry from " "file\n" msgstr "" -#: ../arp.c:617 +#: ../arp.c:623 +#, c-format msgid "" " arp [-v] [] [-i ] -s [temp][nopub] <-Add " "entry\n" msgstr "" -#: ../arp.c:618 -msgid "" -" arp [-v] [] [-i ] -s [netmask ] pub " -"<-''-\n" -msgstr "" - -#: ../arp.c:619 +#: ../arp.c:624 +#, c-format msgid "" " arp [-v] [] [-i ] -Ds [netmask ] pub " "<-''-\n" "\n" msgstr "" -#: ../arp.c:621 +#: ../arp.c:626 +#, c-format msgid "" " -a display (all) hosts in alternative (BSD) " "style\n" msgstr "" -#: ../arp.c:622 +#: ../arp.c:627 +#, c-format msgid " -s, --set set a new ARP entry\n" msgstr "" -#: ../arp.c:623 +#: ../arp.c:628 +#, c-format msgid " -d, --delete delete a specified entry\n" msgstr "" -#: ../arp.c:624 ../netstat.c:1490 ../route.c:86 +#: ../arp.c:629 ../netstat.c:1503 ../route.c:86 +#, c-format msgid " -v, --verbose be verbose\n" msgstr "" -#: ../arp.c:625 ../netstat.c:1491 ../route.c:87 +#: ../arp.c:630 ../netstat.c:1504 ../route.c:87 +#, c-format msgid " -n, --numeric don't resolve names\n" msgstr "" -#: ../arp.c:626 +#: ../arp.c:631 +#, c-format msgid "" " -i, --device specify network interface (e.g. eth0)\n" msgstr "" -#: ../arp.c:627 +#: ../arp.c:632 +#, c-format msgid " -D, --use-device read from given device\n" msgstr "" -#: ../arp.c:628 +#: ../arp.c:633 +#, c-format msgid " -A, -p, --protocol specify protocol family\n" msgstr "" -#: ../arp.c:629 +#: ../arp.c:634 +#, c-format 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 "" -#: ../arp.c:631 ../rarp.c:182 +#: ../arp.c:636 ../rarp.c:182 #, c-format msgid " =Use '-H ' to specify hardware address type. Default: %s\n" msgstr "" -#: ../arp.c:632 ../rarp.c:183 +#: ../arp.c:637 ../rarp.c:183 +#, c-format msgid " List of possible hardware types (which support ARP):\n" msgstr "" -#: ../arp.c:666 ../arp.c:751 +#: ../arp.c:671 ../arp.c:756 #, c-format msgid "%s: hardware type not supported!\n" msgstr "" -#: ../arp.c:670 +#: ../arp.c:675 #, c-format msgid "%s: address family not supported!\n" msgstr "" -#: ../arp.c:705 +#: ../arp.c:710 +#, c-format msgid "arp: -N not yet supported.\n" msgstr "" -#: ../arp.c:715 +#: ../arp.c:720 #, c-format msgid "arp: %s: unknown address family.\n" msgstr "" -#: ../arp.c:724 +#: ../arp.c:729 #, c-format msgid "arp: %s: unknown hardware type.\n" msgstr "" -#: ../arp.c:743 +#: ../arp.c:748 #, c-format msgid "arp: %s: kernel only supports 'inet'.\n" msgstr "" -#: ../arp.c:756 +#: ../arp.c:761 #, c-format msgid "arp: %s: hardware type without ARP support.\n" msgstr "" -#: ../hostname.c:70 +#: ../hostname.c:71 #, c-format msgid "Setting nodename to `%s'\n" msgstr "" -#: ../hostname.c:75 +#: ../hostname.c:76 #, c-format msgid "%s: you must be root to change the node name\n" msgstr "" -#: ../hostname.c:78 ../hostname.c:98 ../hostname.c:117 +#: ../hostname.c:79 ../hostname.c:100 ../hostname.c:118 #, c-format msgid "%s: name too long\n" msgstr "" -#: ../hostname.c:90 +#: ../hostname.c:92 #, c-format msgid "Setting hostname to `%s'\n" msgstr "" -#: ../hostname.c:95 +#: ../hostname.c:97 #, c-format msgid "%s: you must be root to change the host name\n" msgstr "" -#: ../hostname.c:109 +#: ../hostname.c:110 #, c-format msgid "Setting domainname to `%s'\n" msgstr "" -#: ../hostname.c:114 +#: ../hostname.c:115 #, c-format msgid "%s: you must be root to change the domain name\n" msgstr "" @@ -282,83 +304,99 @@ msgid "Result: h_addr_list=`%s'\n" msgstr "" -#: ../hostname.c:210 +#: ../hostname.c:209 #, c-format msgid "%s: can't open `%s'\n" msgstr "" -#: ../hostname.c:224 +#: ../hostname.c:223 +#, c-format msgid "Usage: hostname [-v] {hostname|-F file} set hostname (from file)\n" msgstr "" -#: ../hostname.c:225 +#: ../hostname.c:224 +#, c-format msgid "" " domainname [-v] {nisdomain|-F file} set NIS domainname (from file)\n" msgstr "" -#: ../hostname.c:227 +#: ../hostname.c:226 +#, c-format msgid "" " nodename [-v] {nodename|-F file} set DECnet node name (from " "file)\n" msgstr "" -#: ../hostname.c:229 +#: ../hostname.c:228 +#, c-format msgid " hostname [-v] [-d|-f|-s|-a|-i|-y|-n] display formatted name\n" msgstr "" -#: ../hostname.c:230 +#: ../hostname.c:229 +#, c-format msgid "" " hostname [-v] display hostname\n" "\n" msgstr "" -#: ../hostname.c:231 +#: ../hostname.c:230 +#, c-format msgid "" " hostname -V|--version|-h|--help print info and exit\n" "\n" msgstr "" -#: ../hostname.c:232 +#: ../hostname.c:231 +#, c-format msgid "" " dnsdomainname=hostname -d, {yp,nis,}domainname=hostname -y\n" "\n" msgstr "" -#: ../hostname.c:233 +#: ../hostname.c:232 +#, c-format msgid " -s, --short short host name\n" msgstr "" -#: ../hostname.c:234 +#: ../hostname.c:233 +#, c-format msgid " -a, --alias alias names\n" msgstr "" -#: ../hostname.c:235 +#: ../hostname.c:234 +#, c-format msgid " -i, --ip-address addresses for the hostname\n" msgstr "" -#: ../hostname.c:236 +#: ../hostname.c:235 +#, c-format msgid " -f, --fqdn, --long long host name (FQDN)\n" msgstr "" -#: ../hostname.c:237 +#: ../hostname.c:236 +#, c-format msgid " -d, --domain DNS domain name\n" msgstr "" -#: ../hostname.c:238 +#: ../hostname.c:237 +#, c-format msgid " -y, --yp, --nis NIS/YP domainname\n" msgstr "" -#: ../hostname.c:240 +#: ../hostname.c:239 +#, c-format msgid " -n, --node DECnet node name\n" msgstr "" -#: ../hostname.c:242 +#: ../hostname.c:241 +#, c-format msgid "" " -F, --file read hostname or NIS domainname from given file\n" "\n" msgstr "" -#: ../hostname.c:244 +#: ../hostname.c:243 +#, c-format msgid "" " This command can read or set the hostname or the NIS domainname. You can\n" " also read the DNS domain or the FQDN (fully qualified domain name).\n" @@ -373,12 +411,14 @@ msgstr "" #: ../hostname.c:341 +#, c-format msgid "" "\n" "Unless you are using bind or NIS for host lookups you can change the DNS\n" msgstr "" #: ../hostname.c:342 +#, c-format msgid "domain name (which is part of the FQDN) in the /etc/hosts file.\n" msgstr "" @@ -397,557 +437,697 @@ msgid "getnodename()=`%s'\n" msgstr "" -#: ../ifconfig.c:108 +#: ../ifconfig.c:107 ../netstat.c:1465 +#, c-format msgid "" -"Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR " +"Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR " "Flg\n" msgstr "" -#: ../ifconfig.c:130 ../ifconfig.c:162 +#: ../ifconfig.c:129 ../ifconfig.c:161 #, c-format -msgid "%s: unknown interface: %s\n" +msgid "%s: ERROR while getting interface flags: %s\n" msgstr "" -#: ../ifconfig.c:154 ../ifconfig.c:734 ../ifconfig.c:825 ../ifconfig.c:936 +#: ../ifconfig.c:153 ../ifconfig.c:185 ../ifconfig.c:791 ../ifconfig.c:884 +#: ../ifconfig.c:997 +#, c-format msgid "No support for INET on this system.\n" msgstr "" -#: ../ifconfig.c:177 +#: ../ifconfig.c:193 +#, c-format +msgid "%s: ERROR while testing interface flags: %s\n" +msgstr "" + +#: ../ifconfig.c:202 +#, c-format msgid "" "Usage:\n" -" ifconfig [-a] [-i] [-v] [-s] [[]
]\n" +" ifconfig [-a] [-v] [-s] [[]
]\n" msgstr "" -#: ../ifconfig.c:179 +#: ../ifconfig.c:204 +#, c-format msgid " [add
[/]]\n" msgstr "" -#: ../ifconfig.c:180 +#: ../ifconfig.c:205 +#, c-format msgid " [del
[/]]\n" msgstr "" -#: ../ifconfig.c:181 +#: ../ifconfig.c:206 +#, c-format msgid " [[-]broadcast [
]] [[-]pointopoint [
]]\n" msgstr "" -#: ../ifconfig.c:182 +#: ../ifconfig.c:207 +#, c-format msgid " [netmask
] [dstaddr
] [tunnel
]\n" msgstr "" -#: ../ifconfig.c:185 +#: ../ifconfig.c:210 +#, c-format msgid " [outfill ] [keepalive ]\n" msgstr "" -#: ../ifconfig.c:187 +#: ../ifconfig.c:212 +#, c-format msgid " [hw
] [metric ] [mtu ]\n" msgstr "" -#: ../ifconfig.c:188 +#: ../ifconfig.c:213 +#, c-format msgid " [[-]trailers] [[-]arp] [[-]allmulti]\n" msgstr "" -#: ../ifconfig.c:189 +#: ../ifconfig.c:214 +#, c-format msgid " [multicast] [[-]promisc]\n" msgstr "" -#: ../ifconfig.c:190 +#: ../ifconfig.c:215 +#, c-format msgid " [mem_start ] [io_addr ] [irq ] [media ]\n" msgstr "" -#: ../ifconfig.c:192 +#: ../ifconfig.c:217 +#, c-format msgid " [txqueuelen ]\n" msgstr "" -#: ../ifconfig.c:195 +#: ../ifconfig.c:220 +#, c-format msgid " [[-]dynamic]\n" msgstr "" -#: ../ifconfig.c:197 +#: ../ifconfig.c:222 +#, c-format msgid "" " [up|down] ...\n" "\n" msgstr "" -#: ../ifconfig.c:199 +#: ../ifconfig.c:224 +#, c-format msgid " =Hardware Type.\n" msgstr "" -#: ../ifconfig.c:200 +#: ../ifconfig.c:225 +#, c-format msgid " List of possible hardware types:\n" msgstr "" #. 1 = ARPable -#: ../ifconfig.c:202 +#: ../ifconfig.c:227 #, c-format msgid " =Address family. Default: %s\n" msgstr "" -#: ../ifconfig.c:203 +#: ../ifconfig.c:228 +#, c-format msgid " List of possible address families:\n" msgstr "" -#: ../ifconfig.c:278 +#: ../ifconfig.c:304 #, c-format msgid "ifconfig: option `%s' not recognised.\n" msgstr "" -#: ../ifconfig.c:280 ../ifconfig.c:925 +#: ../ifconfig.c:306 ../ifconfig.c:987 +#, c-format msgid "ifconfig: `--help' gives usage information.\n" msgstr "" -#: ../ifconfig.c:355 +#: ../ifconfig.c:381 +#, c-format msgid "Unknown media type.\n" msgstr "" -#: ../ifconfig.c:647 +#: ../ifconfig.c:418 +#, c-format +msgid "" +"Warning: Interface %s still in promisc mode... maybe other application is " +"running?\n" +msgstr "" + +#: ../ifconfig.c:430 +#, c-format +msgid "Warning: Interface %s still in MULTICAST mode.\n" +msgstr "" + +#: ../ifconfig.c:442 +#, c-format +msgid "Warning: Interface %s still in ALLMULTI mode.\n" +msgstr "" + +#: ../ifconfig.c:466 +#, c-format +msgid "Warning: Interface %s still in DYNAMIC mode.\n" +msgstr "" + +#: ../ifconfig.c:524 +#, c-format +msgid "Warning: Interface %s still in BROADCAST mode.\n" +msgstr "" + +#: ../ifconfig.c:535 +#, c-format +msgid "ifconfig: Error resolving '%s' for broadcast\n" +msgstr "" + +#: ../ifconfig.c:560 +#, c-format +msgid "ifconfig: Error resolving '%s' for dstaddr\n" +msgstr "" + +#: ../ifconfig.c:583 +#, c-format +msgid "ifconfig: Error resolving '%s' for netmask\n" +msgstr "" + +#: ../ifconfig.c:662 +#, c-format +msgid "Warning: Interface %s still in POINTOPOINT mode.\n" +msgstr "" + +#: ../ifconfig.c:673 +#, c-format +msgid "ifconfig: Error resolving '%s' for pointopoint\n" +msgstr "" + +#: ../ifconfig.c:697 #, c-format msgid "hw address type `%s' has no handler to set address. failed.\n" msgstr "" -#: ../ifconfig.c:656 +#: ../ifconfig.c:706 #, c-format msgid "%s: invalid %s address.\n" msgstr "" -#: ../ifconfig.c:700 ../ifconfig.c:790 ../ifconfig.c:876 +#: ../ifconfig.c:746 +#, c-format +msgid "ifconfig: Error resolving '%s' for add\n" +msgstr "" + +#: ../ifconfig.c:757 ../ifconfig.c:847 ../ifconfig.c:935 +#, c-format msgid "No support for INET6 on this system.\n" msgstr "" -#: ../ifconfig.c:743 ../ifconfig.c:834 +#: ../ifconfig.c:800 ../ifconfig.c:893 #, c-format msgid "Interface %s not initialized\n" msgstr "" -#: ../ifconfig.c:755 ../ifconfig.c:845 +#: ../ifconfig.c:812 ../ifconfig.c:904 +#, c-format msgid "Bad address.\n" msgstr "" -#: ../ifconfig.c:848 +#: ../ifconfig.c:907 +#, c-format msgid "Address deletion not supported on this system.\n" msgstr "" -#: ../ifconfig.c:920 +#: ../ifconfig.c:979 +#, c-format msgid "ifconfig: Cannot set address for this protocol family.\n" msgstr "" -#: ../ifconfig.c:946 +#: ../ifconfig.c:986 +#, c-format +msgid "ifconfig: error resolving '%s' to set address for af=%s\n" +msgstr "" + +#: ../ifconfig.c:1007 +#, c-format msgid "No support for ECONET on this system.\n" msgstr "" -#: ../ifconfig.c:954 +#: ../ifconfig.c:1015 #, c-format msgid "Don't know how to set addresses for family %d.\n" msgstr "" -#: ../netstat.c:430 +#: ../ifconfig.c:1050 +#, c-format +msgid "WARNING: at least one error occured. (%d)\n" +msgstr "" + +#: ../netstat.c:434 #, c-format msgid "" "(No info could be read for \"-p\": geteuid()=%d but you should be root.)\n" msgstr "" -#: ../netstat.c:434 +#: ../netstat.c:438 +#, c-format 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:445 ../netstat.c:1189 ../netstat.c:1266 msgid "LISTENING" msgstr "" -#: ../netstat.c:442 +#: ../netstat.c:446 msgid "CONN SENT" msgstr "" -#: ../netstat.c:443 ../netstat.c:1255 +#: ../netstat.c:447 ../netstat.c:1268 msgid "DISC SENT" msgstr "" -#: ../netstat.c:444 ../netstat.c:511 ../netstat.c:894 ../netstat.c:1256 +#: ../netstat.c:448 ../netstat.c:515 ../netstat.c:904 ../netstat.c:1269 msgid "ESTABLISHED" msgstr "" -#: ../netstat.c:466 +#: ../netstat.c:470 +#, c-format msgid "Active NET/ROM sockets\n" msgstr "" -#: ../netstat.c:467 +#: ../netstat.c:471 +#, c-format 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:481 ../netstat.c:1308 #, c-format msgid "Problem reading data from %s\n" msgstr "" -#: ../netstat.c:512 +#: ../netstat.c:516 msgid "SYN_SENT" msgstr "" -#: ../netstat.c:513 +#: ../netstat.c:517 msgid "SYN_RECV" msgstr "" -#: ../netstat.c:514 +#: ../netstat.c:518 msgid "FIN_WAIT1" msgstr "" -#: ../netstat.c:515 +#: ../netstat.c:519 msgid "FIN_WAIT2" msgstr "" -#: ../netstat.c:516 +#: ../netstat.c:520 msgid "TIME_WAIT" msgstr "" -#: ../netstat.c:517 +#: ../netstat.c:521 msgid "CLOSE" msgstr "" -#: ../netstat.c:518 +#: ../netstat.c:522 msgid "CLOSE_WAIT" msgstr "" -#: ../netstat.c:519 +#: ../netstat.c:523 msgid "LAST_ACK" msgstr "" -#: ../netstat.c:520 +#: ../netstat.c:524 msgid "LISTEN" msgstr "" -#: ../netstat.c:521 +#: ../netstat.c:525 msgid "CLOSING" msgstr "" -#: ../netstat.c:592 +#: ../netstat.c:596 #, 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:601 ../netstat.c:639 ../netstat.c:763 ../netstat.c:898 +#: ../netstat.c:1032 ../netstat.c:1037 #, c-format msgid "netstat: unsupported address family %d !\n" msgstr "" -#: ../netstat.c:610 ../netstat.c:615 ../netstat.c:623 ../netstat.c:630 +#: ../netstat.c:614 ../netstat.c:619 ../netstat.c:627 ../netstat.c:634 #, c-format msgid "warning, got bogus igmp line %d.\n" msgstr "" -#: ../netstat.c:673 +#: ../netstat.c:677 +#, c-format msgid "Active X.25 sockets\n" msgstr "" #. IMHO, Vr/Vs is not very usefull --SF -#: ../netstat.c:675 +#: ../netstat.c:679 +#, c-format 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:759 +#, c-format msgid "warning, got bogus tcp line.\n" msgstr "" -#: ../netstat.c:793 ../netstat.c:943 ../netstat.c:1062 +#: ../netstat.c:800 ../netstat.c:953 ../netstat.c:1075 #, c-format msgid "off (0.00/%ld/%d)" msgstr "" -#: ../netstat.c:797 +#: ../netstat.c:804 #, c-format msgid "on (%2.2f/%ld/%d)" msgstr "" -#: ../netstat.c:802 +#: ../netstat.c:809 #, c-format msgid "keepalive (%2.2f/%ld/%d)" msgstr "" -#: ../netstat.c:807 +#: ../netstat.c:814 #, c-format msgid "timewait (%2.2f/%ld/%d)" msgstr "" -#: ../netstat.c:812 ../netstat.c:952 ../netstat.c:1072 +#: ../netstat.c:819 ../netstat.c:962 ../netstat.c:1085 #, c-format msgid "unkn-%d (%2.2f/%ld/%d)" msgstr "" -#: ../netstat.c:884 +#: ../netstat.c:894 +#, c-format msgid "warning, got bogus udp line.\n" msgstr "" -#: ../netstat.c:902 ../netstat.c:1162 ../netstat.c:1195 +#: ../netstat.c:912 ../netstat.c:1175 ../netstat.c:1208 msgid "UNKNOWN" msgstr "" -#: ../netstat.c:948 ../netstat.c:1067 +#: ../netstat.c:958 ../netstat.c:1080 #, c-format msgid "on%d (%2.2f/%ld/%d)" msgstr "" -#: ../netstat.c:1033 +#: ../netstat.c:1046 +#, c-format msgid "warning, got bogus raw line.\n" msgstr "" -#: ../netstat.c:1115 +#: ../netstat.c:1128 +#, c-format msgid "warning, got bogus unix line.\n" msgstr "" -#: ../netstat.c:1142 +#: ../netstat.c:1155 msgid "STREAM" msgstr "" -#: ../netstat.c:1146 +#: ../netstat.c:1159 msgid "DGRAM" msgstr "" -#: ../netstat.c:1150 +#: ../netstat.c:1163 msgid "RAW" msgstr "" -#: ../netstat.c:1154 +#: ../netstat.c:1167 msgid "RDM" msgstr "" -#: ../netstat.c:1158 +#: ../netstat.c:1171 msgid "SEQPACKET" msgstr "" -#: ../netstat.c:1167 +#: ../netstat.c:1180 msgid "FREE" msgstr "" -#: ../netstat.c:1183 +#: ../netstat.c:1196 msgid "CONNECTING" msgstr "" -#: ../netstat.c:1187 +#: ../netstat.c:1200 msgid "CONNECTED" msgstr "" -#: ../netstat.c:1191 +#: ../netstat.c:1204 msgid "DISCONNECTING" msgstr "" -#: ../netstat.c:1222 +#: ../netstat.c:1235 +#, c-format msgid "Active UNIX domain sockets " msgstr "" -#: ../netstat.c:1224 ../netstat.c:1735 +#: ../netstat.c:1237 ../netstat.c:1756 +#, c-format msgid "(servers and established)" msgstr "" -#: ../netstat.c:1227 ../netstat.c:1738 +#: ../netstat.c:1240 ../netstat.c:1759 +#, c-format msgid "(only servers)" msgstr "" -#: ../netstat.c:1229 ../netstat.c:1740 +#: ../netstat.c:1242 ../netstat.c:1761 +#, c-format msgid "(w/o servers)" msgstr "" -#: ../netstat.c:1232 +#: ../netstat.c:1245 +#, c-format msgid "" "\n" "Proto RefCnt Flags Type State I-Node" msgstr "" -#: ../netstat.c:1234 +#: ../netstat.c:1247 +#, c-format msgid " Path\n" msgstr "" -#: ../netstat.c:1254 +#: ../netstat.c:1267 msgid "SABM SENT" msgstr "" -#: ../netstat.c:1257 +#: ../netstat.c:1270 msgid "RECOVERY" msgstr "" -#: ../netstat.c:1271 +#: ../netstat.c:1284 +#, c-format msgid "Active AX.25 sockets\n" msgstr "" -#: ../netstat.c:1272 +#: ../netstat.c:1285 +#, c-format msgid "Dest Source Device State Vr/Vs Send-Q Recv-Q\n" msgstr "" -#: ../netstat.c:1315 +#: ../netstat.c:1328 #, c-format msgid "problem reading data from %s\n" msgstr "" -#: ../netstat.c:1366 +#: ../netstat.c:1379 +#, c-format msgid "" "Active IPX sockets\n" "Proto Recv-Q Send-Q Local Address Foreign Address " "State" msgstr "" -#: ../netstat.c:1368 +#: ../netstat.c:1381 +#, c-format msgid " User" msgstr "" -#: ../netstat.c:1402 +#: ../netstat.c:1415 msgid "ESTAB" msgstr "" -#: ../netstat.c:1410 +#: ../netstat.c:1423 msgid "UNK." msgstr "" -#: ../netstat.c:1448 +#: ../netstat.c:1461 +#, c-format msgid "Kernel Interface table\n" msgstr "" -#: ../netstat.c:1452 -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:1469 msgid "missing interface information" msgstr "" -#: ../netstat.c:1479 +#: ../netstat.c:1492 +#, c-format 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:1493 +#, c-format msgid " netstat [-vnNcaeol] [ ...]\n" msgstr "" -#: ../netstat.c:1481 +#: ../netstat.c:1494 +#, c-format msgid "" " netstat { [-veenNac] -i | [-cnNe] -M | -s }\n" "\n" msgstr "" -#: ../netstat.c:1483 +#: ../netstat.c:1496 +#, c-format msgid " -r, --route display routing table\n" msgstr "" -#: ../netstat.c:1484 +#: ../netstat.c:1497 +#, c-format msgid " -i, --interfaces display interface table\n" msgstr "" -#: ../netstat.c:1485 +#: ../netstat.c:1498 +#, c-format msgid " -g, --groups display multicast group memberships\n" msgstr "" -#: ../netstat.c:1486 +#: ../netstat.c:1499 +#, c-format msgid "" " -s, --statistics display networking statistics (like SNMP)\n" msgstr "" -#: ../netstat.c:1488 +#: ../netstat.c:1501 +#, c-format msgid "" " -M, --masquerade display masqueraded connections\n" "\n" msgstr "" -#: ../netstat.c:1492 +#: ../netstat.c:1505 +#, c-format msgid " --numeric-hosts don't resolve host names\n" msgstr "" -#: ../netstat.c:1493 +#: ../netstat.c:1506 +#, c-format msgid " --numeric-ports don't resolve port names\n" msgstr "" -#: ../netstat.c:1494 +#: ../netstat.c:1507 +#, c-format msgid " --numeric-users don't resolve user names\n" msgstr "" -#: ../netstat.c:1495 +#: ../netstat.c:1508 +#, c-format msgid " -N, --symbolic resolve hardware names\n" msgstr "" -#: ../netstat.c:1496 ../route.c:88 +#: ../netstat.c:1509 ../route.c:88 +#, c-format msgid " -e, --extend display other/more information\n" msgstr "" -#: ../netstat.c:1497 +#: ../netstat.c:1510 +#, c-format msgid " -p, --programs display PID/Program name for sockets\n" msgstr "" -#: ../netstat.c:1498 +#: ../netstat.c:1511 +#, c-format msgid "" " -c, --continuous continuous listing\n" "\n" msgstr "" -#: ../netstat.c:1499 +#: ../netstat.c:1512 +#, c-format msgid " -l, --listening display listening server sockets\n" msgstr "" -#: ../netstat.c:1500 +#: ../netstat.c:1513 +#, c-format msgid "" " -a, --all, --listening display all sockets (default: connected)\n" msgstr "" -#: ../netstat.c:1501 +#: ../netstat.c:1514 +#, c-format msgid " -o, --timers display timers\n" msgstr "" -#: ../netstat.c:1502 ../route.c:89 +#: ../netstat.c:1515 ../route.c:89 +#, c-format msgid "" " -F, --fib display Forwarding Information Base " "(default)\n" msgstr "" -#: ../netstat.c:1503 ../route.c:90 +#: ../netstat.c:1516 ../route.c:90 +#, c-format msgid "" " -C, --cache display routing cache instead of FIB\n" "\n" msgstr "" -#: ../netstat.c:1505 +#: ../netstat.c:1518 +#, c-format 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:1519 #, c-format -msgid " =Use '-A ' or '--'; default: %s\n" +msgid " =Use '-6|-4' or '-A ' or '--'; default: %s\n" msgstr "" -#: ../netstat.c:1507 ../route.c:93 +#: ../netstat.c:1520 ../route.c:93 +#, c-format msgid " List of possible address families (which support routing):\n" msgstr "" -#: ../netstat.c:1732 +#: ../netstat.c:1753 +#, c-format msgid "Active Internet connections " msgstr "" -#: ../netstat.c:1742 +#: ../netstat.c:1763 +#, c-format 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:1765 +#, c-format msgid " User Inode " msgstr "" -#: ../netstat.c:1747 +#: ../netstat.c:1768 +#, c-format msgid " Timer" msgstr "" -#: ../netstat.c:1777 +#: ../netstat.c:1798 +#, c-format msgid "IPv4 Group Memberships\n" msgstr "" -#: ../netstat.c:1778 +#: ../netstat.c:1799 +#, c-format msgid "Interface RefCnt Group\n" msgstr "" @@ -986,23 +1166,28 @@ msgstr "" #: ../rarp.c:176 +#, c-format msgid "Usage: rarp -a list entries in cache.\n" msgstr "" #: ../rarp.c:177 +#, c-format msgid " rarp -d delete entry from cache.\n" msgstr "" #: ../rarp.c:178 +#, c-format msgid " rarp [] -s add entry to cache.\n" msgstr "" #: ../rarp.c:179 +#, c-format msgid "" " rarp -f add entries from /etc/ethers.\n" msgstr "" #: ../rarp.c:180 +#, c-format msgid "" " rarp -V display program version.\n" "\n" @@ -1019,38 +1204,50 @@ msgstr "" #: ../route.c:80 +#, c-format msgid "" "Usage: route [-nNvee] [-FC] [] List kernel routing tables\n" msgstr "" #: ../route.c:81 +#, c-format msgid "" " route [-v] [-FC] {add|del|flush} ... Modify routing table for AF.\n" "\n" msgstr "" #: ../route.c:83 +#, c-format msgid "" " route {-h|--help} [] Detailed usage syntax for " "specified AF.\n" msgstr "" #: ../route.c:84 +#, c-format msgid "" " route {-V|--version} Display version/author and " "exit.\n" "\n" msgstr "" +#: ../route.c:92 +#, c-format +msgid " =Use '-A ' or '--'; default: %s\n" +msgstr "" + #: ../plipconfig.c:66 +#, c-format msgid "Usage: plipconfig [-a] [-i] [-v] interface\n" msgstr "" #: ../plipconfig.c:67 +#, c-format msgid " [nibble NN] [trigger NN]\n" msgstr "" #: ../plipconfig.c:68 +#, c-format msgid " plipconfig -V | --version\n" msgstr "" @@ -1060,61 +1257,75 @@ msgstr "" #: ../iptunnel.c:85 +#, c-format msgid "Usage: iptunnel { add | change | del | show } [ NAME ]\n" msgstr "" #: ../iptunnel.c:86 +#, c-format msgid "" " [ mode { ipip | gre | sit } ] [ remote ADDR ] [ local ADDR ]\n" msgstr "" #: ../iptunnel.c:87 +#, c-format msgid " [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ]\n" msgstr "" #: ../iptunnel.c:88 +#, c-format msgid " [ ttl TTL ] [ tos TOS ] [ nopmtudisc ] [ dev PHYS_DEV ]\n" msgstr "" #: ../iptunnel.c:89 +#, c-format msgid "" " iptunnel -V | --version\n" "\n" msgstr "" #: ../iptunnel.c:90 +#, c-format msgid "Where: NAME := STRING\n" msgstr "" #: ../iptunnel.c:91 +#, c-format msgid " ADDR := { IP_ADDRESS | any }\n" msgstr "" #: ../iptunnel.c:92 +#, c-format msgid " TOS := { NUMBER | inherit }\n" msgstr "" #: ../iptunnel.c:93 +#, c-format msgid " TTL := { 1..255 | inherit }\n" msgstr "" #: ../iptunnel.c:94 +#, c-format msgid " KEY := { DOTTED_QUAD | NUMBER }\n" msgstr "" #: ../iptunnel.c:332 +#, c-format msgid "Keys are not allowed with ipip and sit.\n" msgstr "" #: ../iptunnel.c:352 +#, c-format msgid "Broadcast tunnel requires a source address.\n" msgstr "" #: ../iptunnel.c:367 +#, c-format msgid "ttl != 0 and noptmudisc are incompatible\n" msgstr "" #: ../iptunnel.c:379 +#, c-format msgid "cannot determine tunnel mode (ipip, gre or sit)\n" msgstr "" @@ -1128,22 +1339,27 @@ msgstr "" #: ../iptunnel.c:453 +#, c-format msgid " Drop packets out of sequence.\n" msgstr "" #: ../iptunnel.c:455 +#, c-format msgid " Checksum in received packet is required.\n" msgstr "" #: ../iptunnel.c:457 +#, c-format msgid " Sequence packets on output.\n" msgstr "" #: ../iptunnel.c:459 +#, c-format msgid " Checksum output packets.\n" msgstr "" #: ../iptunnel.c:487 +#, c-format msgid "Wrong format of /proc/net/dev. Sorry.\n" msgstr "" @@ -1153,10 +1369,12 @@ msgstr "" #: ../iptunnel.c:516 +#, c-format msgid "RX: Packets Bytes Errors CsumErrs OutOfSeq Mcasts\n" msgstr "" #: ../iptunnel.c:519 +#, c-format msgid "TX: Packets Bytes Errors DeadLoop NoRoute NoBufs\n" msgstr "" @@ -1323,287 +1541,487 @@ #: ../statistics.c:99 #, c-format -msgid "address mask request: %u" +msgid "address mask request: %u" +msgstr "" + +#. ? +#: ../statistics.c:100 ../statistics.c:113 +#, c-format +msgid "address mask replies: %u" +msgstr "" + +#. ? +#: ../statistics.c:101 +#, c-format +msgid "%u ICMP messages sent" +msgstr "" + +#: ../statistics.c:102 +#, c-format +msgid "%u ICMP messages failed" +msgstr "" + +#: ../statistics.c:104 +#, c-format +msgid "time exceeded: %u" +msgstr "" + +#. ? +#: ../statistics.c:106 +#, c-format +msgid "source quench: %u" +msgstr "" + +#: ../statistics.c:107 +#, c-format +msgid "redirect: %u" +msgstr "" + +#: ../statistics.c:108 +#, c-format +msgid "echo request: %u" +msgstr "" + +#: ../statistics.c:110 +#, c-format +msgid "timestamp requests: %u" +msgstr "" + +#: ../statistics.c:111 +#, c-format +msgid "timestamp replies: %u" +msgstr "" + +#: ../statistics.c:112 +#, c-format +msgid "address mask requests: %u" +msgstr "" + +#: ../statistics.c:118 +#, c-format +msgid "RTO algorithm is %s" +msgstr "" + +#: ../statistics.c:122 +#, c-format +msgid "%u active connections openings" +msgstr "" + +#: ../statistics.c:123 +#, c-format +msgid "%u passive connection openings" +msgstr "" + +#: ../statistics.c:124 +#, c-format +msgid "%u failed connection attempts" +msgstr "" + +#: ../statistics.c:125 +#, c-format +msgid "%u connection resets received" +msgstr "" + +#: ../statistics.c:126 +#, c-format +msgid "%u connections established" +msgstr "" + +#: ../statistics.c:127 +#, c-format +msgid "%u segments received" +msgstr "" + +#: ../statistics.c:128 +#, c-format +msgid "%u segments send out" +msgstr "" + +#: ../statistics.c:129 +#, c-format +msgid "%u segments retransmited" +msgstr "" + +#: ../statistics.c:130 +#, c-format +msgid "%u bad segments received." +msgstr "" + +#: ../statistics.c:131 +#, c-format +msgid "%u resets sent" +msgstr "" + +#: ../statistics.c:136 +#, c-format +msgid "%u packets received" +msgstr "" + +#: ../statistics.c:137 +#, c-format +msgid "%u packets to unknown port received." +msgstr "" + +#: ../statistics.c:138 +#, c-format +msgid "%u packet receive errors" +msgstr "" + +#: ../statistics.c:139 +#, c-format +msgid "%u packets sent" +msgstr "" + +#: ../statistics.c:144 +#, c-format +msgid "%u SYN cookies sent" +msgstr "" + +#: ../statistics.c:145 +#, c-format +msgid "%u SYN cookies received" +msgstr "" + +#: ../statistics.c:146 +#, c-format +msgid "%u invalid SYN cookies received" +msgstr "" + +#: ../statistics.c:148 +#, c-format +msgid "%u resets received for embryonic SYN_RECV sockets" +msgstr "" + +#: ../statistics.c:150 +#, c-format +msgid "%u packets pruned from receive queue because of socket buffer overrun" +msgstr "" + +#. obsolete: 2.2.0 doesn't do that anymore +#: ../statistics.c:153 +#, c-format +msgid "%u packets pruned from receive queue" +msgstr "" + +#: ../statistics.c:154 +#, c-format +msgid "" +"%u packets dropped from out-of-order queue because of socket buffer overrun" +msgstr "" + +#: ../statistics.c:156 +#, c-format +msgid "%u ICMP packets dropped because they were out-of-window" +msgstr "" + +#: ../statistics.c:158 +#, c-format +msgid "%u ICMP packets dropped because socket was locked" +msgstr "" + +#: ../statistics.c:160 +#, c-format +msgid "%u TCP sockets finished time wait in fast timer" +msgstr "" + +#: ../statistics.c:161 +#, c-format +msgid "%u time wait sockets recycled by time stamp" +msgstr "" + +#: ../statistics.c:162 +#, c-format +msgid "%u TCP sockets finished time wait in slow timer" +msgstr "" + +#: ../statistics.c:163 +#, c-format +msgid "%u passive connections rejected because of time stamp" +msgstr "" + +#: ../statistics.c:165 +#, c-format +msgid "%u active connections rejected because of time stamp" +msgstr "" + +#: ../statistics.c:167 +#, c-format +msgid "%u packets rejects in established connections because of timestamp" msgstr "" -#. ? -#: ../statistics.c:100 ../statistics.c:113 +#: ../statistics.c:169 #, c-format -msgid "address mask replies: %u" +msgid "%u delayed acks sent" msgstr "" -#. ? -#: ../statistics.c:101 +#: ../statistics.c:170 #, c-format -msgid "%u ICMP messages sent" +msgid "%u delayed acks further delayed because of locked socket" msgstr "" -#: ../statistics.c:102 +#: ../statistics.c:172 #, c-format -msgid "%u ICMP messages failed" +msgid "Quick ack mode was activated %u times" msgstr "" -#: ../statistics.c:104 +#: ../statistics.c:173 #, c-format -msgid "time exceeded: %u" +msgid "%u times the listen queue of a socket overflowed" msgstr "" -#. ? -#: ../statistics.c:106 +#: ../statistics.c:175 #, c-format -msgid "source quench: %u" +msgid "%u SYNs to LISTEN sockets dropped" msgstr "" -#: ../statistics.c:107 +#: ../statistics.c:176 #, c-format -msgid "redirect: %u" +msgid "%u packets directly queued to recvmsg prequeue." msgstr "" -#: ../statistics.c:108 +#: ../statistics.c:178 #, c-format -msgid "echo request: %u" +msgid "%u bytes directly in process context from backlog" msgstr "" -#: ../statistics.c:110 +#: ../statistics.c:179 #, c-format -msgid "timestamp requests: %u" +msgid "%u bytes directly received in process context from prequeue" msgstr "" -#: ../statistics.c:111 +#: ../statistics.c:181 #, c-format -msgid "timestamp replies: %u" +msgid "%u packets dropped from prequeue" msgstr "" -#: ../statistics.c:112 +#: ../statistics.c:182 #, c-format -msgid "address mask requests: %u" +msgid "%u packet headers predicted" msgstr "" -#: ../statistics.c:118 +#: ../statistics.c:183 #, c-format -msgid "RTO algorithm is %s" +msgid "%u packets header predicted and directly queued to user" msgstr "" -#: ../statistics.c:122 +#: ../statistics.c:185 #, c-format -msgid "%u active connections openings" +msgid "Ran %u times out of system memory during packet sending" msgstr "" -#: ../statistics.c:123 +#: ../statistics.c:187 #, c-format -msgid "%u passive connection openings" +msgid "%u acknowledgments not containing data payload received" msgstr "" -#: ../statistics.c:124 +#: ../statistics.c:188 #, c-format -msgid "%u failed connection attempts" +msgid "%u predicted acknowledgments" msgstr "" -#: ../statistics.c:125 +#: ../statistics.c:189 #, c-format -msgid "%u connection resets received" +msgid "%u times recovered from packet loss due to fast retransmit" msgstr "" -#: ../statistics.c:126 +#: ../statistics.c:190 #, c-format -msgid "%u connections established" +msgid "%u times recovered from packet loss by selective acknowledgements" msgstr "" -#: ../statistics.c:127 +#: ../statistics.c:191 #, c-format -msgid "%u segments received" +msgid "%u bad SACK blocks received" msgstr "" -#: ../statistics.c:128 +#: ../statistics.c:192 #, c-format -msgid "%u segments send out" +msgid "Detected reordering %u times using FACK" msgstr "" -#: ../statistics.c:129 +#: ../statistics.c:193 #, c-format -msgid "%u segments retransmited" +msgid "Detected reordering %u times using SACK" msgstr "" -#: ../statistics.c:130 +#: ../statistics.c:194 #, c-format -msgid "%u bad segments received." +msgid "Detected reordering %u times using time stamp" msgstr "" -#: ../statistics.c:131 +#: ../statistics.c:195 #, c-format -msgid "%u resets sent" +msgid "Detected reordering %u times using reno fast retransmit" msgstr "" -#: ../statistics.c:136 +#: ../statistics.c:196 #, c-format -msgid "%u packets received" +msgid "%u congestion windows fully recovered without slow start" msgstr "" -#: ../statistics.c:137 +#: ../statistics.c:197 #, c-format -msgid "%u packets to unknown port received." +msgid "%u congestion windows partially recovered using Hoe heuristic" msgstr "" -#: ../statistics.c:138 +#: ../statistics.c:198 #, c-format -msgid "%u packet receive errors" +msgid "%u congestion window recovered without slow start using DSACK" msgstr "" -#: ../statistics.c:139 +#: ../statistics.c:199 #, c-format -msgid "%u packets sent" +msgid "%u congestion windows recovered without slow start after partial ack" msgstr "" -#: ../statistics.c:144 +#: ../statistics.c:200 #, c-format -msgid "%u SYN cookies sent" +msgid "%u retransmits lost" msgstr "" -#: ../statistics.c:145 +#: ../statistics.c:201 #, c-format -msgid "%u SYN cookies received" +msgid "%u timeouts after reno fast retransmit" msgstr "" -#: ../statistics.c:146 +#: ../statistics.c:202 #, c-format -msgid "%u invalid SYN cookies received" +msgid "%u timeouts after SACK recovery" msgstr "" -#: ../statistics.c:148 +#: ../statistics.c:203 #, c-format -msgid "%u resets received for embryonic SYN_RECV sockets" +msgid "%u timeouts in loss state" msgstr "" -#: ../statistics.c:150 +#: ../statistics.c:204 #, c-format -msgid "%u packets pruned from receive queue because of socket buffer overrun" +msgid "%u fast retransmits" msgstr "" -#. obsolete: 2.2.0 doesn't do that anymore -#: ../statistics.c:153 +#: ../statistics.c:205 #, c-format -msgid "%u packets pruned from receive queue" +msgid "%u forward retransmits" msgstr "" -#: ../statistics.c:154 +#: ../statistics.c:206 #, c-format -msgid "" -"%u packets dropped from out-of-order queue because of socket buffer overrun" +msgid "%u retransmits in slow start" msgstr "" -#: ../statistics.c:156 +#: ../statistics.c:207 #, c-format -msgid "%u ICMP packets dropped because they were out-of-window" +msgid "%u other TCP timeouts" msgstr "" -#: ../statistics.c:158 +#: ../statistics.c:208 #, c-format -msgid "%u ICMP packets dropped because socket was locked" +msgid "%u reno fast retransmits failed" msgstr "" -#: ../statistics.c:160 +#: ../statistics.c:209 #, c-format -msgid "%u TCP sockets finished time wait in fast timer" +msgid "%u SACK retransmits failed" msgstr "" -#: ../statistics.c:161 +#: ../statistics.c:210 #, c-format -msgid "%u time wait sockets recycled by time stamp" +msgid "%u times receiver scheduled too late for direct processing" msgstr "" -#: ../statistics.c:162 +#: ../statistics.c:211 #, c-format -msgid "%u TCP sockets finished time wait in slow timer" +msgid "%u packets collapsed in receive queue due to low socket buffer" msgstr "" -#: ../statistics.c:163 +#: ../statistics.c:212 #, c-format -msgid "%u passive connections rejected because of time stamp" +msgid "%u DSACKs sent for old packets" msgstr "" -#: ../statistics.c:165 +#: ../statistics.c:213 #, c-format -msgid "%u active connections rejected because of time stamp" +msgid "%u DSACKs sent for out of order packets" msgstr "" -#: ../statistics.c:167 +#: ../statistics.c:214 #, c-format -msgid "%u packets rejects in established connections because of timestamp" +msgid "%u DSACKs received" msgstr "" -#: ../statistics.c:169 +#: ../statistics.c:215 #, c-format -msgid "%u delayed acks sent" +msgid "%u DSACKs for out of order packets received" msgstr "" -#: ../statistics.c:170 +#: ../statistics.c:216 #, c-format -msgid "%u delayed acks further delayed because of locked socket" +msgid "%u connections reset due to unexpected SYN" msgstr "" -#: ../statistics.c:172 +#: ../statistics.c:217 #, c-format -msgid "Quick ack mode was activated %u times" +msgid "%u connections reset due to unexpected data" msgstr "" -#: ../statistics.c:173 +#: ../statistics.c:218 #, c-format -msgid "%u times the listen queue of a socket overflowed" +msgid "%u connections reset due to early user close" msgstr "" -#: ../statistics.c:175 +#: ../statistics.c:219 #, c-format -msgid "%u SYNs to LISTEN sockets ignored" +msgid "%u connections aborted due to memory pressure" msgstr "" -#: ../statistics.c:176 +#: ../statistics.c:220 #, c-format -msgid "%u packets directly queued to recvmsg prequeue." +msgid "%u connections aborted due to timeout" msgstr "" -#: ../statistics.c:178 +#: ../statistics.c:221 #, c-format -msgid "%u packets directly received from backlog" +msgid "%u connections aborted after user close in linger timeout" msgstr "" -#: ../statistics.c:180 +#: ../statistics.c:222 #, c-format -msgid "%u packets directly received from prequeue" +msgid "%u times unabled to send RST due to no memory" msgstr "" -#: ../statistics.c:182 +#: ../statistics.c:223 #, c-format -msgid "%u packets dropped from prequeue" +msgid "TCP ran low on memory %u times" msgstr "" -#: ../statistics.c:183 +#: ../statistics.c:224 #, c-format -msgid "%u packets header predicted" +msgid "%u TCP data loss events" msgstr "" -#: ../statistics.c:184 +#: ../statistics.c:225 #, c-format -msgid "%u packets header predicted and directly queued to user" +msgid "%u congestion windows recovered without slow start by DSACK" msgstr "" -#: ../statistics.c:186 +#: ../statistics.c:227 #, c-format -msgid "Ran %u times out of system memory during packet sending" +msgid "%u classic Reno fast retransmits failed" msgstr "" -#: ../statistics.c:253 +#: ../statistics.c:294 msgid "enabled" msgstr "" -#: ../statistics.c:253 +#: ../statistics.c:294 msgid "disabled" msgstr "" -#: ../statistics.c:336 +#: ../statistics.c:377 msgid "error parsing /proc/net/snmp" msgstr "" -#: ../statistics.c:349 +#: ../statistics.c:390 msgid "cannot open /proc/net/snmp" msgstr "" @@ -1617,7 +2035,7 @@ msgid "Cannot change line discipline to `%s'.\n" msgstr "" -#: ../lib/af.c:153 ../lib/hw.c:156 +#: ../lib/af.c:153 ../lib/hw.c:161 msgid "UNSPEC" msgstr "" @@ -1633,11 +2051,11 @@ msgid "IPv6" msgstr "" -#: ../lib/af.c:164 ../lib/hw.c:177 +#: ../lib/af.c:164 ../lib/hw.c:182 msgid "AMPR AX.25" msgstr "" -#: ../lib/af.c:167 ../lib/hw.c:183 +#: ../lib/af.c:167 ../lib/hw.c:188 msgid "AMPR NET/ROM" msgstr "" @@ -1649,7 +2067,7 @@ msgid "Appletalk DDP" msgstr "" -#: ../lib/af.c:176 ../lib/hw.c:218 +#: ../lib/af.c:176 ../lib/hw.c:223 msgid "Econet" msgstr "" @@ -1657,19 +2075,21 @@ msgid "CCITT X.25" msgstr "" -#: ../lib/af.c:182 ../lib/hw.c:180 +#: ../lib/af.c:182 ../lib/hw.c:185 msgid "AMPR ROSE" msgstr "" -#: ../lib/af.c:185 ../lib/hw.c:168 +#: ../lib/af.c:185 ../lib/hw.c:173 msgid "Ash" msgstr "" #: ../lib/af.c:243 +#, c-format msgid "Please don't supply more than one address family.\n" msgstr "" #: ../lib/af.c:304 +#, c-format msgid "Too much address family arguments.\n" msgstr "" @@ -1694,11 +2114,12 @@ msgstr "" #: ../lib/ash.c:81 +#, c-format msgid "Malformed Ash address" msgstr "" #: ../lib/ax25.c:75 ../lib/ddp.c:50 ../lib/econet.c:52 ../lib/inet.c:244 -#: ../lib/inet.c:259 ../lib/inet6.c:129 ../lib/ipx.c:81 ../lib/netrom.c:78 +#: ../lib/inet.c:259 ../lib/inet6.c:145 ../lib/ipx.c:81 ../lib/netrom.c:78 #: ../lib/rose.c:71 ../lib/unix.c:56 ../lib/unix.c:76 msgid "[NONE SET]" msgstr "" @@ -1712,22 +2133,21 @@ msgstr "" #: ../lib/ax25_gr.c:47 +#, c-format msgid "AX.25 not configured in this system.\n" msgstr "" #: ../lib/ax25_gr.c:50 +#, c-format msgid "Kernel AX.25 routing table\n" msgstr "" #. xxx #: ../lib/ax25_gr.c:51 ../lib/rose_gr.c:55 +#, c-format msgid "Destination Iface Use\n" msgstr "" -#: ../lib/ddp_gr.c:21 -msgid "Routing table for `ddp' not yet supported.\n" -msgstr "" - #: ../lib/ether.c:74 ../lib/ether.c:91 #, c-format msgid "in_ether(%s): invalid ether address!\n" @@ -1783,225 +2203,260 @@ msgid "in_hippi(%s): trailing junk!\n" msgstr "" -#: ../lib/hw.c:155 +#: ../lib/hw.c:160 msgid "Local Loopback" msgstr "" -#: ../lib/hw.c:158 +#: ../lib/hw.c:163 msgid "Serial Line IP" msgstr "" -#: ../lib/hw.c:159 +#: ../lib/hw.c:164 msgid "VJ Serial Line IP" msgstr "" -#: ../lib/hw.c:160 +#: ../lib/hw.c:165 msgid "6-bit Serial Line IP" msgstr "" -#: ../lib/hw.c:161 +#: ../lib/hw.c:166 msgid "VJ 6-bit Serial Line IP" msgstr "" -#: ../lib/hw.c:162 +#: ../lib/hw.c:167 msgid "Adaptive Serial Line IP" msgstr "" -#: ../lib/hw.c:165 +#: ../lib/hw.c:170 msgid "Ethernet" msgstr "" -#: ../lib/hw.c:171 +#: ../lib/hw.c:176 msgid "Fiber Distributed Data Interface" msgstr "" -#: ../lib/hw.c:174 +#: ../lib/hw.c:179 msgid "HIPPI" msgstr "" -#: ../lib/hw.c:186 +#: ../lib/hw.c:191 msgid "generic X.25" msgstr "" -#: ../lib/hw.c:189 +#: ../lib/hw.c:194 msgid "IPIP Tunnel" msgstr "" -#: ../lib/hw.c:192 +#: ../lib/hw.c:197 msgid "Point-to-Point Protocol" msgstr "" -#: ../lib/hw.c:195 +#: ../lib/hw.c:200 msgid "(Cisco)-HDLC" msgstr "" -#: ../lib/hw.c:196 +#: ../lib/hw.c:201 msgid "LAPB" msgstr "" -#: ../lib/hw.c:199 +#: ../lib/hw.c:204 msgid "ARCnet" msgstr "" -#: ../lib/hw.c:202 +#: ../lib/hw.c:207 msgid "Frame Relay DLCI" msgstr "" -#: ../lib/hw.c:203 +#: ../lib/hw.c:208 msgid "Frame Relay Access Device" msgstr "" -#: ../lib/hw.c:206 +#: ../lib/hw.c:211 msgid "IPv6-in-IPv4" msgstr "" -#: ../lib/hw.c:209 +#: ../lib/hw.c:214 msgid "IrLAP" msgstr "" -#: ../lib/hw.c:212 +#: ../lib/hw.c:217 msgid "16/4 Mbps Token Ring" msgstr "" -#: ../lib/hw.c:214 +#: ../lib/hw.c:219 msgid "16/4 Mbps Token Ring (New)" msgstr "" -#: ../lib/inet.c:153 ../lib/inet6.c:79 +#: ../lib/hw.c:226 +msgid "Generic EUI-64" +msgstr "" + +#: ../lib/inet.c:153 ../lib/inet6.c:94 #, c-format msgid "rresolve: unsupport address family %d !\n" msgstr "" -#: ../lib/inet6.c:131 +#: ../lib/inet6.c:147 msgid "[UNKNOWN]" msgstr "" #: ../lib/inet6_gr.c:71 +#, c-format msgid "INET6 (IPv6) not configured in this system.\n" msgstr "" -#: ../lib/inet6_gr.c:74 +#: ../lib/inet6_gr.c:76 +#, c-format +msgid "Kernel IPv6 routing cache\n" +msgstr "" + +#: ../lib/inet6_gr.c:78 +#, c-format msgid "Kernel IPv6 routing table\n" msgstr "" -#: ../lib/inet6_gr.c:76 +#: ../lib/inet6_gr.c:80 +#, c-format msgid "" -"Destination Next Hop " -" Flags Metric Ref Use Iface\n" +"Destination Next Hop Flag Met Ref Use " +"If\n" msgstr "" -#: ../lib/inet6_gr.c:150 +#: ../lib/inet6_gr.c:174 +#, c-format msgid "Kernel IPv6 Neighbour Cache\n" msgstr "" -#: ../lib/inet6_gr.c:153 +#: ../lib/inet6_gr.c:177 +#, c-format msgid "" "Neighbour HW Address Iface Flags " "Ref State\n" msgstr "" -#: ../lib/inet6_gr.c:157 +#: ../lib/inet6_gr.c:181 +#, c-format msgid "" "Neighbour HW Address Iface Flags " "Ref State Stale(sec) Delete(sec)\n" msgstr "" #: ../lib/inet6_sr.c:46 +#, c-format msgid "Usage: inet6_route [-vF] del Target\n" msgstr "" #: ../lib/inet6_sr.c:47 +#, c-format msgid " inet6_route [-vF] add Target [gw Gw] [metric M] [[dev] If]\n" msgstr "" #: ../lib/inet6_sr.c:48 +#, c-format msgid " inet6_route [-FC] flush NOT supported\n" msgstr "" #: ../lib/inet6_sr.c:188 +#, c-format msgid "Flushing `inet6' routing table not supported\n" msgstr "" #: ../lib/inet_gr.c:50 ../lib/inet_gr.c:220 +#, c-format msgid "INET (IPv4) not configured in this system.\n" msgstr "" #: ../lib/inet_gr.c:53 +#, c-format msgid "Kernel IP routing table\n" msgstr "" #: ../lib/inet_gr.c:56 +#, c-format msgid "" "Destination Gateway Genmask Flags Metric Ref Use " "Iface\n" msgstr "" #: ../lib/inet_gr.c:59 +#, c-format msgid "" "Destination Gateway Genmask Flags MSS Window irtt " "Iface\n" msgstr "" #: ../lib/inet_gr.c:62 +#, c-format msgid "" "Destination Gateway Genmask Flags Metric Ref Use " "Iface MSS Window irtt\n" msgstr "" #: ../lib/inet_gr.c:237 +#, c-format msgid "Kernel IP routing cache\n" msgstr "" #: ../lib/inet_gr.c:258 +#, c-format msgid "" "Source Destination Gateway Flags Metric Ref Use " "Iface\n" msgstr "" #: ../lib/inet_gr.c:261 +#, c-format msgid "" "Source Destination Gateway Flags MSS Window irtt " "Iface\n" msgstr "" #: ../lib/inet_gr.c:266 +#, c-format msgid "" "Source Destination Gateway Flags Metric Ref Use " "Iface MSS Window irtt HH Arp\n" msgstr "" #: ../lib/inet_gr.c:290 +#, c-format msgid "" "Source Destination Gateway Flags Metric Ref Use " "Iface MSS Window irtt TOS HHRef HHUptod SpecDst\n" msgstr "" -#: ../lib/inet_sr.c:50 +#: ../lib/inet_sr.c:51 +#, c-format msgid "" "Usage: inet_route [-vF] del {-host|-net} Target[/prefix] [gw Gw] [metric M] " "[[dev] If]\n" msgstr "" -#: ../lib/inet_sr.c:51 +#: ../lib/inet_sr.c:52 +#, c-format msgid "" " inet_route [-vF] add {-host|-net} Target[/prefix] [gw Gw] [metric M]\n" msgstr "" -#: ../lib/inet_sr.c:52 +#: ../lib/inet_sr.c:53 +#, c-format msgid "" " [netmask N] [mss Mss] [window W] [irtt I]\n" msgstr "" -#: ../lib/inet_sr.c:53 +#: ../lib/inet_sr.c:54 +#, c-format msgid " [mod] [dyn] [reinstate] [[dev] If]\n" msgstr "" -#: ../lib/inet_sr.c:54 +#: ../lib/inet_sr.c:55 +#, c-format msgid "" " inet_route [-vF] add {-host|-net} Target[/prefix] [metric M] reject\n" msgstr "" -#: ../lib/inet_sr.c:55 +#: ../lib/inet_sr.c:56 +#, c-format msgid " inet_route [-FC] flush NOT supported\n" msgstr "" @@ -2011,14 +2466,17 @@ msgstr "" #: ../lib/inet_sr.c:174 +#, c-format msgid "route: Invalid MSS/MTU.\n" msgstr "" #: ../lib/inet_sr.c:187 +#, c-format msgid "route: Invalid window.\n" msgstr "" #: ../lib/inet_sr.c:203 +#, c-format msgid "route: Invalid initial rtt.\n" msgstr "" @@ -2033,73 +2491,90 @@ msgstr "" #: ../lib/inet_sr.c:270 +#, c-format msgid "route: netmask doesn't match route address\n" msgstr "" #: ../lib/inet_sr.c:306 +#, c-format msgid "Flushing `inet' routing table not supported\n" msgstr "" #: ../lib/inet_sr.c:310 +#, c-format msgid "Modifying `inet' routing cache not supported\n" msgstr "" #: ../lib/ipx_gr.c:52 +#, c-format msgid "IPX not configured in this system.\n" msgstr "" #: ../lib/ipx_gr.c:56 +#, c-format msgid "Kernel IPX routing table\n" msgstr "" #. xxx #: ../lib/ipx_gr.c:57 +#, c-format msgid "Destination Router Net Router Node\n" msgstr "" #: ../lib/ipx_sr.c:33 +#, c-format msgid "IPX: this needs to be written\n" msgstr "" #: ../lib/masq_info.c:198 +#, c-format msgid "IP masquerading entries\n" msgstr "" #: ../lib/masq_info.c:201 +#, c-format msgid "prot expire source destination ports\n" msgstr "" #: ../lib/masq_info.c:204 +#, c-format 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 +#, c-format msgid "NET/ROM not configured in this system.\n" msgstr "" #: ../lib/netrom_gr.c:51 +#, c-format msgid "Kernel NET/ROM routing table\n" msgstr "" #: ../lib/netrom_gr.c:52 +#, c-format msgid "Destination Mnemonic Quality Neighbour Iface\n" msgstr "" #: ../lib/netrom_sr.c:34 +#, c-format msgid "netrom usage\n" msgstr "" #: ../lib/netrom_sr.c:44 +#, c-format msgid "NET/ROM: this needs to be written\n" msgstr "" #: ../lib/ppp.c:44 +#, c-format msgid "You cannot start PPP with this program.\n" msgstr "" #: ../lib/ppp_ac.c:38 +#, c-format msgid "Sorry, use pppd!\n" msgstr "" @@ -2108,287 +2583,314 @@ msgstr "" #: ../lib/rose_gr.c:51 +#, c-format msgid "ROSE not configured in this system.\n" msgstr "" #: ../lib/rose_gr.c:54 +#, c-format msgid "Kernel ROSE routing table\n" msgstr "" -#: ../lib/tr.c:70 ../lib/tr.c:85 +#: ../lib/tr.c:86 ../lib/tr.c:101 #, c-format msgid "in_tr(%s): invalid token ring address!\n" msgstr "" -#: ../lib/tr.c:97 +#: ../lib/tr.c:113 #, c-format msgid "in_tr(%s): trailing : ignored!\n" msgstr "" -#: ../lib/tr.c:109 +#: ../lib/tr.c:125 #, c-format msgid "in_tr(%s): trailing junk!\n" msgstr "" -#: ../lib/interface.c:164 +#: ../lib/interface.c:174 #, c-format msgid "warning: no inet socket available: %s\n" msgstr "" -#: ../lib/interface.c:316 +#: ../lib/interface.c:323 #, c-format msgid "Warning: cannot open %s (%s). Limited output.\n" msgstr "" #. Give better error message for this case. -#: ../lib/interface.c:556 +#: ../lib/interface.c:570 msgid "Device not found" msgstr "" -#: ../lib/interface.c:560 +#: ../lib/interface.c:574 #, c-format msgid "%s: error fetching interface information: %s\n" msgstr "" -#: ../lib/interface.c:593 +#: ../lib/interface.c:607 msgid " - no statistics available -" msgstr "" -#: ../lib/interface.c:597 +#: ../lib/interface.c:611 +#, c-format msgid "[NO FLAGS]" msgstr "" -#: ../lib/interface.c:673 +#: ../lib/interface.c:687 #, c-format msgid "%-9.9s Link encap:%s " msgstr "" -#: ../lib/interface.c:678 +#: ../lib/interface.c:692 #, c-format msgid "HWaddr %s " msgstr "" -#: ../lib/interface.c:681 +#: ../lib/interface.c:695 #, c-format msgid "Media:%s" msgstr "" -#: ../lib/interface.c:683 +#: ../lib/interface.c:697 +#, c-format msgid "(auto)" msgstr "" -#: ../lib/interface.c:690 +#: ../lib/interface.c:704 #, c-format msgid " %s addr:%s " msgstr "" -#: ../lib/interface.c:693 +#: ../lib/interface.c:707 #, c-format msgid " P-t-P:%s " msgstr "" -#: ../lib/interface.c:696 +#: ../lib/interface.c:710 #, c-format msgid " Bcast:%s " msgstr "" -#: ../lib/interface.c:698 +#: ../lib/interface.c:712 #, c-format msgid " Mask:%s\n" msgstr "" -#: ../lib/interface.c:715 +#: ../lib/interface.c:729 #, c-format msgid " inet6 addr: %s/%d" msgstr "" -#: ../lib/interface.c:717 +#: ../lib/interface.c:731 +#, c-format msgid " Scope:" msgstr "" -#: ../lib/interface.c:720 +#: ../lib/interface.c:734 +#, c-format msgid "Global" msgstr "" -#: ../lib/interface.c:723 +#: ../lib/interface.c:737 +#, c-format msgid "Link" msgstr "" -#: ../lib/interface.c:726 +#: ../lib/interface.c:740 +#, c-format msgid "Site" msgstr "" -#: ../lib/interface.c:729 +#: ../lib/interface.c:743 +#, c-format msgid "Compat" msgstr "" -#: ../lib/interface.c:732 +#: ../lib/interface.c:746 +#, c-format msgid "Host" msgstr "" -#: ../lib/interface.c:735 +#: ../lib/interface.c:749 +#, c-format msgid "Unknown" msgstr "" -#: ../lib/interface.c:750 +#: ../lib/interface.c:764 #, c-format msgid " IPX/Ethernet II addr:%s\n" msgstr "" -#: ../lib/interface.c:753 +#: ../lib/interface.c:767 #, c-format msgid " IPX/Ethernet SNAP addr:%s\n" msgstr "" -#: ../lib/interface.c:756 +#: ../lib/interface.c:770 #, c-format msgid " IPX/Ethernet 802.2 addr:%s\n" msgstr "" -#: ../lib/interface.c:759 +#: ../lib/interface.c:773 #, c-format msgid " IPX/Ethernet 802.3 addr:%s\n" msgstr "" -#: ../lib/interface.c:769 +#: ../lib/interface.c:783 #, c-format msgid " EtherTalk Phase 2 addr:%s\n" msgstr "" -#: ../lib/interface.c:778 +#: ../lib/interface.c:792 #, c-format msgid " econet addr:%s\n" msgstr "" -#: ../lib/interface.c:785 +#: ../lib/interface.c:799 +#, c-format msgid "[NO FLAGS] " msgstr "" -#: ../lib/interface.c:787 +#: ../lib/interface.c:801 +#, c-format msgid "UP " msgstr "" -#: ../lib/interface.c:789 +#: ../lib/interface.c:803 +#, c-format msgid "BROADCAST " msgstr "" -#: ../lib/interface.c:791 +#: ../lib/interface.c:805 +#, c-format msgid "DEBUG " msgstr "" -#: ../lib/interface.c:793 +#: ../lib/interface.c:807 +#, c-format msgid "LOOPBACK " msgstr "" -#: ../lib/interface.c:795 +#: ../lib/interface.c:809 +#, c-format msgid "POINTOPOINT " msgstr "" -#: ../lib/interface.c:797 +#: ../lib/interface.c:811 +#, c-format msgid "NOTRAILERS " msgstr "" -#: ../lib/interface.c:799 +#: ../lib/interface.c:813 +#, c-format msgid "RUNNING " msgstr "" -#: ../lib/interface.c:801 +#: ../lib/interface.c:815 +#, c-format msgid "NOARP " msgstr "" -#: ../lib/interface.c:803 +#: ../lib/interface.c:817 +#, c-format msgid "PROMISC " msgstr "" -#: ../lib/interface.c:805 +#: ../lib/interface.c:819 +#, c-format msgid "ALLMULTI " msgstr "" -#: ../lib/interface.c:807 +#: ../lib/interface.c:821 +#, c-format msgid "SLAVE " msgstr "" -#: ../lib/interface.c:809 +#: ../lib/interface.c:823 +#, c-format msgid "MASTER " msgstr "" -#: ../lib/interface.c:811 +#: ../lib/interface.c:825 +#, c-format msgid "MULTICAST " msgstr "" -#: ../lib/interface.c:814 +#: ../lib/interface.c:828 +#, c-format msgid "DYNAMIC " msgstr "" #. DONT FORGET TO ADD THE FLAGS IN ife_print_short -#: ../lib/interface.c:817 +#: ../lib/interface.c:831 #, c-format msgid " MTU:%d Metric:%d" msgstr "" -#: ../lib/interface.c:821 +#: ../lib/interface.c:835 #, c-format msgid " Outfill:%d Keepalive:%d" msgstr "" -#: ../lib/interface.c:835 +#: ../lib/interface.c:849 #, c-format msgid "RX packets:%llu errors:%lu dropped:%lu overruns:%lu frame:%lu\n" msgstr "" -#: ../lib/interface.c:840 +#: ../lib/interface.c:854 #, c-format msgid " compressed:%lu\n" msgstr "" -#: ../lib/interface.c:852 +#: ../lib/interface.c:894 #, c-format msgid "TX packets:%llu errors:%lu dropped:%lu overruns:%lu carrier:%lu\n" msgstr "" -#: ../lib/interface.c:856 +#: ../lib/interface.c:898 #, c-format msgid " collisions:%lu " msgstr "" -#: ../lib/interface.c:858 +#: ../lib/interface.c:900 #, c-format msgid "compressed:%lu " msgstr "" -#: ../lib/interface.c:860 +#: ../lib/interface.c:902 #, c-format msgid "txqueuelen:%d " msgstr "" -#: ../lib/interface.c:862 +#: ../lib/interface.c:904 #, c-format msgid "RX bytes:%llu (%lu.%lu %s) TX bytes:%llu (%lu.%lu %s)\n" msgstr "" -#: ../lib/interface.c:873 +#: ../lib/interface.c:915 #, c-format msgid "Interrupt:%d " msgstr "" #. Only print devices using it for #. I/O maps -#: ../lib/interface.c:876 +#: ../lib/interface.c:918 #, c-format msgid "Base address:0x%x " msgstr "" -#: ../lib/interface.c:878 +#: ../lib/interface.c:920 #, c-format msgid "Memory:%lx-%lx " msgstr "" -#: ../lib/interface.c:881 +#: ../lib/interface.c:923 #, c-format msgid "DMA chan:%x " msgstr "" #: ../lib/sockets.c:63 +#, c-format msgid "No usable address families found.\n" msgstr "" @@ -2413,14 +2915,17 @@ msgstr "" #: ../ipmaddr.c:61 +#, c-format msgid "Usage: ipmaddr [ add | del ] MULTIADDR dev STRING\n" msgstr "" #: ../ipmaddr.c:62 +#, c-format msgid " ipmaddr show [ dev STRING ] [ ipv4 | ipv6 | link | all ]\n" msgstr "" #: ../ipmaddr.c:63 +#, c-format msgid " ipmaddr -V | -version\n" msgstr "" @@ -2449,6 +2954,7 @@ msgstr "" #: ../slattach.c:192 +#, c-format msgid "slattach: cannot write PID file\n" msgstr "" @@ -2468,18 +2974,22 @@ msgstr "" #: ../slattach.c:468 +#, c-format msgid "slattach: tty name too long\n" msgstr "" #: ../slattach.c:498 +#, c-format msgid "slattach: tty_open: cannot get current state!\n" msgstr "" #: ../slattach.c:505 +#, c-format msgid "slattach: tty_open: cannot get current line disc!\n" msgstr "" #: ../slattach.c:513 +#, c-format msgid "slattach: tty_open: cannot set RAW mode!\n" msgstr "" @@ -2489,6 +2999,7 @@ msgstr "" #: ../slattach.c:530 +#, c-format msgid "slattach: tty_open: cannot set 8N1 mode!\n" msgstr "" --- net-tools-1.60.orig/nameif.c +++ net-tools-1.60/nameif.c @@ -3,7 +3,7 @@ * Writen 2000 by Andi Kleen. * Subject to the Gnu Public License, version 2. * TODO: make it support token ring etc. - * $Id: nameif.c,v 1.1 2000/10/18 17:26:29 ak Exp $ + * $Id: nameif.c,v 1.4 2003/09/11 03:46:49 ak Exp $ */ #ifndef _GNU_SOURCE #define _GNU_SOURCE @@ -117,7 +117,8 @@ } struct change { - struct change *next,**pprev; + struct change *next; + int found; char ifname[IFNAMSIZ+1]; unsigned char mac[6]; }; @@ -139,10 +140,7 @@ ch->ifname, pos); if (parsemac(p,ch->mac) < 0) complain(_("cannot parse MAC `%s' at %s"), p, pos); - if (clist) - clist->pprev = &ch->next; ch->next = clist; - ch->pprev = &clist; clist = ch; return 0; } @@ -177,7 +175,7 @@ if (*p == '\0') continue; n = strcspn(p, " \t"); - if (n > IFNAMSIZ) + if (n > IFNAMSIZ-1) complain(_("interface name too long at line %d"), line); memcpy(ch->ifname, p, n); ch->ifname[n] = 0; @@ -200,7 +198,7 @@ void usage(void) { - fprintf(stderr, _("usage: nameif [-c configurationfile] [-s] {ifname macaddress}")); + fprintf(stderr, _("usage: nameif [-c configurationfile] [-s] {ifname macaddress}\n")); exit(1); } @@ -277,21 +275,21 @@ ch = lookupmac(mac); if (!ch) continue; - - *ch->pprev = ch->next; + + ch->found = 1; if (strcmp(p, ch->ifname)) { if (setname(p, ch->ifname) < 0) complain(_("cannot change name of %s to %s: %s"), p, ch->ifname, strerror(errno)); } - free(ch); } fclose(ifh); while (clist) { struct change *ch = clist; clist = clist->next; - warning(_("interface '%s' not found"), ch->ifname); + if (!ch->found) + warning(_("interface '%s' not found"), ch->ifname); free(ch); } --- net-tools-1.60.orig/mii-tool.c +++ net-tools-1.60/mii-tool.c @@ -166,7 +166,7 @@ s = strtok(arg, ", "); do { for (i = 0; i < NMEDIA; i++) - if (strcasecmp(media[i].name, s) == 0) break; + if (s && strcasecmp(media[i].name, s) == 0) break; if (i == NMEDIA) goto failed; mask |= media[i].value; } while ((s = strtok(NULL, ", ")) != NULL); @@ -302,6 +302,7 @@ printf("\n link partner:%s", media_list(lkpar, 0)); printf("\n"); } + fflush(stdout); return 0; } @@ -329,7 +330,7 @@ printf("resetting the transceiver...\n"); mdio_write(skfd, MII_BMCR, MII_BMCR_RESET); } - if (nway_advertise) { + if (nway_advertise > 0) { mdio_write(skfd, MII_ANAR, nway_advertise | 1); opt_restart = 1; } @@ -378,18 +379,17 @@ /*--------------------------------------------------------------------*/ -const char *usage = -"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...] - -V, --version display version information - -v, --verbose more verbose output - -R, --reset reset MII to poweron state - -r, --restart restart autonegotiation - -w, --watch monitor for link status changes - -l, --log with -w, write events to syslog - -A, --advertise=media,... advertise only specified media - -F, --force=media force specified media technology -media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD, - (to advertise both HD and FD) 100baseTx, 10baseT\n"; +const char *usage = "usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...]\n" +" -V, --version display version information\n" +" -v, --verbose more verbose output\n" +" -R, --reset reset MII to poweron state\n" +" -r, --restart restart autonegotiation\n" +" -w, --watch monitor for link status changes\n" +" -l, --log with -w, write events to syslog\n" +" -A, --advertise=media,... advertise only specified media\n" +" -F, --force=media force specified media technology\n" +"media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,\n" +" (to advertise both HD and FD) 100baseTx, 10baseT\n"; int main(int argc, char **argv) { @@ -411,6 +411,10 @@ } /* Check for a few inappropriate option combinations */ if (opt_watch) verbose = 0; + + if ((nway_advertise < 0) || (fixed_speed < 0)) + return 2; + if (errflag || (fixed_speed & (fixed_speed-1)) || (fixed_speed && (opt_restart || nway_advertise))) { fprintf(stderr, usage, argv[0]); @@ -425,6 +429,9 @@ perror("socket"); exit(-1); } + + if (verbose > 1) + printf("Using SIOCGMIIPHY=0x%x\n", SIOCGMIIPHY); /* No remaining args means show all interfaces. */ if (optind == argc) { --- net-tools-1.60.orig/debian/changelog +++ net-tools-1.60/debian/changelog @@ -0,0 +1,251 @@ +net-tools (1.60-16ubuntu1) dapper; urgency=low + + * Merge with Debian + - Forward-port fix written by Ian Jackson to not truncate IPv6 + addresses. + + -- Tollef Fog Heen Fri, 11 Nov 2005 11:04:12 +0100 + +net-tools (1.60-16) unstable; urgency=low + + * spelling fix to slattach(8) (Closes: Bug#326124 (patch by A.Costa) + * inet.c: portability fix for 64bit. + * comment cleanups to aliagn with 1.65 cvs + * net-support.h, inet_sr.c, nstrcmp.c, arp.c, ether.h + + -- Bernd Eckenfels Mon, 24 Oct 2005 22:05:38 +0200 + +net-tools (1.60-15ubuntu2) breezy; urgency=low + + * Look up TCP/UDP protocol numbers using correct protocol, not + always UDP. (Bug introduced in 1.60-15ubuntu1.) + Ubuntu 7294, Debian #254243. + + -- Ian Jackson Thu, 29 Sep 2005 18:02:23 +0100 + +net-tools (1.60-15ubuntu1) breezy; urgency=low + + * Do not truncate numeric IPv6 addresses in netstat TCP and UDP. + The new output format is not parseable with the same algorithms as + before because it will be flexible about field widths, but it will not + be used unless it is necessary to avoid truncating numeric addresses, + so no existing non-broken netstat-output parsing code will be broken. + (Also: made 4 copies(!) of endpoint formatting code into one + common function. Urgh.) Ubuntu 7294, Debian #254243. + + -- Ian Jackson Tue, 20 Sep 2005 15:28:53 +0100 + +net-tools (1.60-15) unstable; urgency=low + + * minor formating fix to ifconfig(8) + + -- Bernd Eckenfels Thu, 30 Jun 2005 21:49:52 +0200 + +net-tools (1.60-14) unstable; urgency=low + + * added iptables(8) in ifconfig(8) (thanks Toralf Förster) + * more usage updates in ifconfig.8 (used upstream HEAD=1.11) + + -- Bernd Eckenfels Thu, 30 Jun 2005 20:51:18 +0200 + +net-tools (1.60-13) unstable; urgency=low Thu, 30 Jun 2005 20:49:57 +0200 + + * X25 code compiles with 2.4 and 2.6 kernel headers (Closes: Bug#271678) + * IMPORTANT: make ifconfig show alias interfaces in 2.6 again. + * resort media type array to match kernel (Closes: Bug#199920) + + -- Bernd Eckenfels Tue, 17 May 2005 01:28:51 +0200 + +net-tools (1.60-12) unstable; urgency=low + + * make TR hw address type work for new kernel (Closes: Bug #79462, #203400) + * update-po uses msgmerge, new net-tools.pot (Closes: Bug: 271426) + * de-support dontpub option in arp -? und arp.8 (Closes: Bug #203396) + + -- Bernd Eckenfels Mon, 16 May 2005 06:33:48 +0200 + +net-tools (1.60-11) unstable; urgency=low + + * spelling fixes (Closes: Bug #305640, #305638, 305637) + * nameif.c avoid overflow by malicious kernel + * avoid overflow of the TX-OK Column (Closes: Bug #308922) + + -- Bernd Eckenfels Sat, 14 May 2005 01:48:45 +0200 + +net-tools (1.60-10) unstable; urgency=low + + * typo fix in po/de.po for german arp command output (Closes: Bug #176151) + * added diagnostics messages to mii-tool.8 (Closes: Bug #239229) + * new version of nstrcmp (Closes: Bug #226503) + * enable EUI64 support + * stadanrds version 3.6.1 (no changes) + + -- Bernd Eckenfels Fri, 23 Apr 2004 00:57:20 +0200 + +net-tools (1.60-9) unstable; urgency=medium + + * debian/changelog: fixed in last entry fixed bug from 197925 to 197924 + * include linux/sockios.h for SIOCGMIIPHY definition (new style) + which will fix MII reporting on 2.4 kernels. (Closes: Bug #133648) + NOTE: this will now require root to work, it will also not work on + older kernels. + * Rene Engelhard's patch to make AF X25 compile with 2.6 headers (Closes: Bug #223091) + + -- Bernd Eckenfels Mon, 29 Dec 2003 13:42:20 +0100 + +net-tools (1.60-8) unstable; urgency=medium + + * lib/interface.c: backed off change which skipped reading ioctl + interfacelist, if _proc interfacelist was ok, which does not work, + because alias interfaces are only in ioctl list available. It is + also falling back to the original lib/nstrcml.c because the + comparision if : is present does not work. + (Closes: bug #197924, #197582, #197269) + * bumped standards version (no changes) + + -- Bernd Eckenfels Sat, 28 Jun 2003 02:56:38 +0200 + +net-tools (1.60-7) unstable; urgency=low + + * interfaces.c: cvs version fixes Connectiva Bug #5711 (Closes: #149576) + from Eduardo Pereira Habkost + * netstat.c: cvs version adds support for tcp6,udp6,icmp6 protocols + * netstat.c: cvs version adds support for -4 or -6 cmd line shortcut + * netstat.c: cvs version adds fix for inode + signedness (Closes: #134600, #78932) + * ifconfig: removed -i from usage (Closes: #181528) + * make gcc 3.3 happy: added ull unsigned long long prefix to constant + * lib/ddp_gr.c+pathnames.h: first support for appletalk routing from cvs + * lib/eui64.c+hw.c+Makefile: forst support for new hw type from cvs + * lib/interface.c: cvs fix for column run-into (Closes: #161080) + * lib/irda.c,lib/ipx.c: cvs update + * lib/nstrcmp.c: new, faster version, fixes b-lookups for ifconfig + * hostanme.c: gcc 3.3 fix from cvs (not compiled in net-tools.deb) + * lib/interface: fixed memory globbering + (Closes: #135744, #149579, #185187) + + -- Bernd Eckenfels Thu, 12 Jun 2003 05:44:38 +0200 + +net-tools (1.60-6) unstable; urgency=low + + * took route.c from upstream cvs: allow -6 and -4 option + * took statistics.c from upstream cvs: more complete netstat -S + * took README from upstream cvs: fix COPYING file title and removed + the line (Closes: #102139) + * took arp.c from upstream: fixed name "PUB", better not found handling, + implicite proxy arp mac changed from '*' to '', + usage line made shorter + * added mii-tool in control file (Closes: #172473) + * fixed description of binary multiple in man page (Closes: #182487) + * fixed interpunctation in netstat(8) (Closes: #191660) + * fixed compile warning in inet_sr.c by removing empty default: label in + switch + + -- Bernd Eckenfels Wed, 28 May 2003 22:35:12 +0200 + +net-tools (1.60-5) unstable; urgency=low + + * thanks Andrew for the 4.1 NMU + * NMU: Apply nameif patch from Matt Domsch. (Closes: #178209) + * Fix FTB bug (string concatenation in gcc 3.3) (Closes: #194995) + * Fix segfault in mii-tool by using cvs version (Closes: #139027) + * fixed plural of authors to make lintian happy (I JOIN YOU :) + + -- Bernd Eckenfels Wed, 28 May 2003 22:04:14 +0200 + +net-tools (1.60-4.1) unstable; urgency=low + + * NMU + * Apply nameif patch from Matt Domsch. (Closes: #178209) + + -- Andrew Suffield Wed, 9 Apr 2003 21:44:09 +0100 + +net-tools (1.60-4) unstable; urgency=medium + + * fixed (upstream) spurious newline in ifconfig + Thanks Jonathen, Closes: Bug #109379 + * fixed SI-Units printout in ifconfig (Closes: Bug #110629, #97029, #100167) + * this is done by including lib/interfaces.c from upstream cvs + * also added ifconfig man page from upstream cvs + * fixed (upstream) man page about netstat's --interface opt. (Closes: Bug#120475) + + -- Bernd Eckenfels Sat, 24 Nov 2001 06:26:37 +0100 + +net-tools (1.60-3) unstable; urgency=medium + + * fixed upstream error where counters in ifconfig/netstat -i are 0 + + -- Bernd Eckenfels Sat, 10 Nov 2001 18:12:13 +0100 + +net-tools (1.60-2) unstable; urgency=low + + * Fixed the following bug: (Closes: #117837) + * inserted ifconfig.c from upstream cvs to do this + * bumped debian Standard 3.1.1 -> 3.5.6 and removed -g from linking + + -- Bernd Eckenfels Thu, 1 Nov 2001 02:51:33 +0100 + +net-tools (1.60-1) unstable; urgency=low + + * New upstream + * Phil fixed the following Bugs upstream: (Closes: #91919, #93048, #90282) + + -- Bernd Eckenfels Mon, 16 Apr 2001 02:28:12 +0200 + +net-tools (1.59-1) unstable; urgency=low + + * added Build Dependencies (closes bug: #89083) + * new upstream version + * removed dh_suidregister and a few comments from rules file + + -- Bernd Eckenfels Sun, 18 Mar 2001 03:00:33 +0100 + +net-tools (1.58-2) unstable; urgency=low + + * backported ifconfig change from 1.59 to avoid closing socket too early + on some systems (depending on the protocols installed). + Closes Bug: #85688, #85743 + + -- Bernd Eckenfels Tue, 13 Feb 2001 01:39:59 +0100 + +net-tools (1.58-1) unstable; urgency=low + + * new upstream version + * removed local man pages for now (Closes: bug #83894) + * install nameif in /sbin + + -- Bernd Eckenfels Sat, 10 Feb 2001 21:50:30 +0100 + +net-tools (1.57-2) unstable; urgency=high + + * rebuild, this is believed to closes: #75825 + + -- Bernd Eckenfels Sat, 30 Dec 2000 22:43:01 +0100 + +net-tools (1.57-1) unstable; urgency=low + + * new debian maintainer (thanks Anthony for the Work!) + * new upstream version + + -- Bernd Eckenfels Mon, 14 Aug 2000 02:40:13 +0200 + +net-tools (1.54-3) unstable; urgency=low + + * Argggh. Don't use that horrible dh_installmanpages hack. (Closes: + Bug#68925, Bug#68879) + + -- Anthony Towns Sun, 13 Aug 2000 00:12:05 +1000 + +net-tools (1.54-2) unstable; urgency=low + + * Reapply slattach patch from netbase 3.16-3. + + -- Anthony Towns Thu, 10 Aug 2000 11:32:58 +1000 + +net-tools (1.54-1) unstable; urgency=low + + * Split from netbase. + + -- Anthony Towns Mon, 17 Jul 2000 07:34:12 +1000 + + --- net-tools-1.60.orig/debian/copyright +++ net-tools-1.60/debian/copyright @@ -0,0 +1,18 @@ +This debian package is maintained by Bernd Eckenfels since +Mon, 14 Aug 2000 02:42:13 +0200. Debian Informations will be uploaded +upstream, too. + +This package was debianized by Anthony Towns on +Mon, 17 Jul 2000 07:34:12 +1000. It was originally part of the netbase +package. + +It was downloaded from http://www.tazenda.demon.co.uk/phil/net-tools/ + +Upstream Authors: Phil Blundell , + Bernd Eckenfels + +Copyright: + +Distributed under the terms of the GNU General Public License version 2, +as published by the Free Software Foundation. On Debian systems you can +find a copy of this license in /usr/share/common-licenses/GPL. --- net-tools-1.60.orig/debian/dirs +++ net-tools-1.60/debian/dirs @@ -0,0 +1 @@ +usr/sbin --- net-tools-1.60.orig/debian/config.make +++ net-tools-1.60/debian/config.make @@ -0,0 +1,36 @@ +I18N=1 +HAVE_AFUNIX=1 +HAVE_AFINET=1 +HAVE_AFINET6=1 +HAVE_AFIPX=1 +HAVE_AFATALK=1 +HAVE_AFAX25=1 +HAVE_AFNETROM=1 +HAVE_AFROSE=1 +HAVE_AFX25=1 +HAVE_AFECONET=1 +HAVE_AFDECnet=1 +HAVE_AFASH=1 +HAVE_HWETHER=1 +HAVE_HWARC=1 +HAVE_HWSLIP=1 +HAVE_HWPPP=1 +HAVE_HWTUNNEL=1 +HAVE_HWSTRIP=1 +HAVE_HWTR=1 +HAVE_HWAX25=1 +HAVE_HWROSE=1 +HAVE_HWNETROM=1 +HAVE_HWX25=1 +HAVE_HWFR=1 +HAVE_HWSIT=1 +HAVE_HWFDDI=1 +HAVE_HWHIPPI=1 +HAVE_HWASH=1 +HAVE_HWHDLCLAPB=1 +HAVE_HWIRDA=1 +HAVE_HWEC=1 +HAVE_EUI64=1 +HAVE_FW_MASQUERADE=1 +HAVE_IP_TOOLS=1 +HAVE_MII=1 --- net-tools-1.60.orig/debian/control +++ net-tools-1.60/debian/control @@ -0,0 +1,20 @@ +Source: net-tools +Section: net +Priority: important +Build-Depends: debhelper, gettext +Maintainer: Bernd Eckenfels +Standards-Version: 3.6.1 + +Package: net-tools +Architecture: any +Depends: ${shlibs:Depends} +Replaces: netbase (<< 4.00) +Description: The NET-3 networking toolkit + This package includes the important tools for controlling the network + subsystem of the Linux kernel. This includes arp, ifconfig, netstat, + rarp, nameif and route. Additionally, this package contains utilities + relating to particular network hardware types (plipconfig, slattach, + mii-tool) and advanced aspects of IP configuration (iptunnel, ipmaddr). + . + In the upstream package 'hostname' and friends are included. Those are + not installed by this package, since there is a special "hostname*.deb". --- net-tools-1.60.orig/debian/rules +++ net-tools-1.60/debian/rules @@ -0,0 +1,74 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatability version to use. +export DH_COMPAT=1 + +configure: configure-stamp +configure-stamp: + dh_testdir + touch configure-stamp + +build: configure-stamp build-stamp +build-stamp: + dh_testdir + cp debian/config.h config.h + cp debian/config.make config.make + $(MAKE) + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + -$(MAKE) clobber + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + $(MAKE) update BASEDIR=`pwd`/debian/tmp + mv debian/tmp/sbin/arp debian/tmp/usr/sbin/arp + # we don't want man pages for domainname and friends... (yet) + rm -rf debian/tmp/usr/share/man/*/man1/ debian/tmp/usr/share/man/man1/ + # we don't install local manpages until policy is clear + rm -rf debian/tmp/usr/share/man/*_*/ + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install +# dh_testversion + dh_testdir + dh_testroot +# dh_installdebconf + dh_installdocs + dh_installexamples + dh_installmenu + dh_installcron +# dh_installmanpages + dh_installinfo +# dh_undocumented + dh_installchangelogs + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol -- -isp + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- net-tools-1.60.orig/debian/config.h +++ net-tools-1.60/debian/config.h @@ -0,0 +1,75 @@ +/* +* config.h Automatically generated configuration includefile +* +* NET-TOOLS A collection of programs that form the base set of the +* NET-3 Networking Distribution for the LINUX operating +* system. +* +* DO NOT EDIT DIRECTLY +* +*/ + +/* + * + * Internationalization + * + * The net-tools package has currently been translated to French, + * German and Brazilian Portugese. Other translations are, of + * course, welcome. Answer `n' here if you have no support for + * internationalization on your system. + * + */ +#define I18N 1 + +/* + * + * Protocol Families. + * + */ +#define HAVE_AFUNIX 1 +#define HAVE_AFINET 1 +#define HAVE_AFINET6 1 +#define HAVE_AFIPX 1 +#define HAVE_AFATALK 1 +#define HAVE_AFAX25 1 +#define HAVE_AFNETROM 1 +#define HAVE_AFROSE 1 +#define HAVE_AFX25 1 +#define HAVE_AFECONET 1 +#define HAVE_AFDECnet 1 +#define HAVE_AFASH 1 + +/* + * + * Device Hardware types. + * + */ +#define HAVE_HWETHER 1 +#define HAVE_HWARC 1 +#define HAVE_HWSLIP 1 +#define HAVE_HWPPP 1 +#define HAVE_HWTUNNEL 1 +#define HAVE_HWSTRIP 1 +#define HAVE_HWTR 1 +#define HAVE_HWAX25 1 +#define HAVE_HWROSE 1 +#define HAVE_HWNETROM 1 +#define HAVE_HWX25 1 +#define HAVE_HWFR 1 +#define HAVE_HWSIT 1 +#define HAVE_HWFDDI 1 +#define HAVE_HWHIPPI 1 +#define HAVE_HWASH 1 +#define HAVE_HWHDLCLAPB 1 +#define HAVE_HWIRDA 1 +#define HAVE_HWEC 1 +#define HAVE_HWEUI64 1 + +/* + * + * Other Features. + * + */ +#define HAVE_FW_MASQUERADE 1 +#define HAVE_IP_TOOLS 1 +#define HAVE_MII 1 --- net-tools-1.60.orig/debian/docs +++ net-tools-1.60/debian/docs @@ -0,0 +1,3 @@ +README +README.ipv6 +TODO