Add XNS statistics and control blocks; fix bug printing port numbers
authorKeith Sklower <sklower@ucbvax.Berkeley.EDU>
Sat, 17 Aug 1985 10:40:25 +0000 (02:40 -0800)
committerKeith Sklower <sklower@ucbvax.Berkeley.EDU>
Sat, 17 Aug 1985 10:40:25 +0000 (02:40 -0800)
SCCS-vsn: usr.bin/netstat/Makefile 5.2
SCCS-vsn: usr.bin/netstat/main.c 5.2
SCCS-vsn: usr.bin/netstat/route.c 5.3

usr/src/usr.bin/netstat/Makefile
usr/src/usr.bin/netstat/main.c
usr/src/usr.bin/netstat/route.c

index a83e3d1..1739da7 100644 (file)
@@ -3,9 +3,9 @@
 # All rights reserved.  The Berkeley software License Agreement
 # specifies the terms and conditions for redistribution.
 #
 # All rights reserved.  The Berkeley software License Agreement
 # specifies the terms and conditions for redistribution.
 #
-#      @(#)Makefile    5.1 (Berkeley) %G%
+#      @(#)Makefile    5.2 (Berkeley) %G%
 #
 #
-OBJS=  host.o inet.o if.o main.o mbuf.o route.o unix.o
+OBJS=  host.o inet.o if.o main.o mbuf.o route.o unix.o ns.o
 CFLAGS=-O
 DESTDIR=
 
 CFLAGS=-O
 DESTDIR=
 
index 1fb1540..aabb869 100644 (file)
@@ -11,7 +11,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char sccsid[] = "@(#)main.c     5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c     5.2 (Berkeley) %G%";
 #endif not lint
 
 #include <sys/param.h>
 #endif not lint
 
 #include <sys/param.h>
index 9584f2c..c331fd7 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)route.c    5.2 85/06/15";
+static char sccsid[] = "@(#)route.c    5.3 85/08/16";
 #endif
 
 #include <sys/types.h>
 #endif
 
 #include <sys/types.h>
@@ -250,7 +250,7 @@ struct sockaddr_ns *sns;
        register char *p = mybuf;
        short port = dna->x_port;
 
        register char *p = mybuf;
        short port = dna->x_port;
 
-       sprintf(p,"%ld:", net);
+       sprintf(p,"%lx:", net);
 
        while(*p)p++; /* find end of string */
 
 
        while(*p)p++; /* find end of string */
 
@@ -263,7 +263,7 @@ struct sockaddr_ns *sns;
                            dna->x_host.c_host[4], dna->x_host.c_host[5]);
        if (port) {
        while(*p)p++; /* find end of string */
                            dna->x_host.c_host[4], dna->x_host.c_host[5]);
        if (port) {
        while(*p)p++; /* find end of string */
-               printf(":%d",port);
+               sprintf(p,":%x",ntohs(port));
        }
        return(mybuf);
 }
        }
        return(mybuf);
 }