Skip to content

Commit

Permalink
ready for net-tools 1.54...
Browse files Browse the repository at this point in the history
  • Loading branch information
philb committed Nov 20, 1999
1 parent ba599ac commit caab055
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 37 deletions.
11 changes: 3 additions & 8 deletions INSTALLING
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,9 @@ First of all change into the net-tools directory.
Before you start with the Installation please have a look into the toplevel
Makefile. There are some configuration options with explanations.

To configure the compilation use "make config".

If you have a recent Kernel you can and SHOULD answer ALL the Configuration
Options with YES. You only have to decide about the NLS:

If you don't know whether GNU gettext is supported on your system or not, run
msgfmt. If it exists, there is every chance that GNU gettext is
supported.
To configure the compilation use "make config". The default answers should
be safe for all configurations. If you have kernel 2.2 and glibc 2.1 most
of the other options should work as well.


COMPILE
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ endif
# -------- end of user definitions --------

MAINTAINER = [email protected]
RELEASE = 1.53
RELEASE = 1.54

.EXPORT_ALL_VARIABLES:

Expand Down Expand Up @@ -147,7 +147,7 @@ cleanconfig:
rm -f config.h

clobber: clean
rm -f $(PROGS) config.h version.h config.status
rm -f $(PROGS) config.h version.h config.status config.make
@for i in $(SUBDIRS); do (cd $$i && $(MAKE) clobber) ; done


Expand Down
8 changes: 7 additions & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,18 @@ Contents:
Notes
-----

This is net-tools 1.53. Notable changes since 1.52 include:
This is net-tools 1.54. Notable changes since 1.53 include:

- Jiri Pavlovsky supplied a Czech translation
- various small bugs have been fixed

Notable changes since 1.52 include:

- a bunch of buffer overrun vulnerabilities are fixed (thanks to
David Wagner)
- Meelis Roos contributed an Estonian translation
- netstat recognizes ESP and GRE protocols, courtesy John D. Hardin.
- various other bugs have been fixed

Notable changes since 1.51 include:

Expand Down
15 changes: 12 additions & 3 deletions netstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* NET-3 Networking Distribution for the LINUX operating
* system.
*
* Version: $Id: netstat.c,v 1.30 1999/08/28 11:26:08 philip Exp $
* Version: $Id: netstat.c,v 1.31 1999/11/20 22:49:18 philip Exp $
*
* Authors: Fred Baumgarten, <[email protected]>
* Fred N. van Kempen, <[email protected]>
Expand Down Expand Up @@ -705,9 +705,18 @@ static void tcp_do_one(int lnr, const char *line)
break;

case 1:
snprintf(timers, sizeof(timers), _("on (%2.2f/%ld/%d)"),
(double) time_len / HZ, retr, timeout);
break;

case 2:
snprintf(timers, sizeof(timers), _("on%d (%2.2f/%ld/%d)"),
timer_run,(double) time_len / HZ, retr, timeout);
snprintf(timers, sizeof(timers), _("keepalive (%2.2f/%ld/%d)"),
(double) time_len / HZ, retr, timeout);
break;

case 3:
snprintf(timers, sizeof(timers), _("timewait (%2.2f/%ld/%d)"),
(double) time_len / HZ, retr, timeout);
break;

default:
Expand Down
42 changes: 19 additions & 23 deletions slattach.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@
#define DEF_PROTO "cslip"


char *Release = RELEASE,
*Version = "@(#) slattach 1.20 (1999-05-29)",
*Signature = "net-tools, Fred N. van Kempen et al.";
const char *Release = RELEASE,
*Version = "@(#) slattach 1.21 (1999-11-21)",
*Signature = "net-tools, Fred N. van Kempen et al.";


struct {
char *speed;
const char *speed;
int code;
} tty_speeds[] = { /* table of usable baud rates */
{ "50", B50 }, { "75", B75 },
Expand Down Expand Up @@ -222,7 +222,7 @@ tty_lock(char *path, int mode)

/* Find a serial speed code in the table. */
static int
tty_find_speed(char *speed)
tty_find_speed(const char *speed)
{
int i;

Expand Down Expand Up @@ -315,7 +315,7 @@ tty_set_parity(struct termios *tty, char *parity)

/* Set the line speed of a terminal line. */
static int
tty_set_speed(struct termios *tty, char *speed)
tty_set_speed(struct termios *tty, const char *speed)
{
int code;

Expand Down Expand Up @@ -410,8 +410,8 @@ static int
tty_get_name(char *name)
{
if (ioctl(tty_fd, SIOCGIFNAME, name) < 0) {
if (opt_q == 0) fprintf(stderr,
"slattach: tty_get_name: %s\n", strerror(errno));
if (opt_q == 0)
perror("tty_get_name");
return(-errno);
}
return(0);
Expand Down Expand Up @@ -454,7 +454,7 @@ tty_close(void)

/* Open and initialize a terminal line. */
static int
tty_open(char *name, char *speed)
tty_open(char *name, const char *speed)
{
char path[PATH_MAX];
register char *sp;
Expand Down Expand Up @@ -571,10 +571,9 @@ main(int argc, char *argv[])
{
char path[128];
char buff[128];
char *speed = NULL;
char *proto = DEF_PROTO;
char *extcmd = (char *)0;
struct hwtype *ht;
const char *speed = NULL;
const char *proto = DEF_PROTO;
const char *extcmd = NULL;
char *sp;
int s;
static struct option longopts[] = {
Expand Down Expand Up @@ -658,12 +657,8 @@ main(int argc, char *argv[])

activate_init();

/* Check the protocol. */
if ((ht = get_hwtype(proto)) == NULL && strcmp(proto, "tty")) {
if (opt_q == 0) fprintf(stderr, _("slattach: unsupported protocol %s\n"), proto);
return(2);
}
if (ht == NULL) opt_m++;
if (!strcmp(proto, "tty"))
opt_m++;

/* Is a terminal given? */
if (optind != (argc - 1)) usage();
Expand All @@ -679,14 +674,15 @@ main(int argc, char *argv[])
}

/* Start the correct protocol. */
if (ht == NULL) {
if (!strcmp(proto, "tty")) {
tty_sdisc = N_TTY;
tty_close();
return(0);
}
(*ht->activate)(tty_fd);
if (activate_ld(proto, tty_fd))
return(1);
if ((opt_v == 1) || (opt_d == 1)) {
tty_get_name(buff);
if (tty_get_name(buff)) { return(3); }
printf(_("%s started"), proto);
if (sp != NULL) printf(_(" on %s"), sp);
printf(_(" interface %s\n"), buff);
Expand Down Expand Up @@ -723,7 +719,7 @@ main(int argc, char *argv[])
};

tty_close();
if(extcmd!=(char *)0) /* external command on exit */
if(extcmd) /* external command on exit */
system(extcmd);
}
exit(0);
Expand Down

0 comments on commit caab055

Please sign in to comment.