SCCS-vsn: usr.bin/netstat/ns.c 5.2
-static char sccsid[] = "@(#)ns.c 5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)ns.c 5.2 (Berkeley) %G%";
#endif not lint
#include <stdio.h>
#endif not lint
#include <stdio.h>
register struct nspcb *prev, *next;
int isspp;
register struct nspcb *prev, *next;
int isspp;
- if (off == 0) {
- printf("%s control block: symbol not in namelist\n", name);
isspp = strcmp(name, "spp") == 0;
klseek(kmem, off, 0);
read(kmem, &cb, sizeof (struct nspcb));
nspcb = cb;
prev = (struct nspcb *)off;
isspp = strcmp(name, "spp") == 0;
klseek(kmem, off, 0);
read(kmem, &cb, sizeof (struct nspcb));
nspcb = cb;
prev = (struct nspcb *)off;
+ if (nspcb.nsp_next == (struct nspcb *)off)
+ return;
if (first) {
printf("Active connections");
if (aflag)
if (first) {
printf("Active connections");
if (aflag)
{
struct spp_istat spp_istat;
{
struct spp_istat spp_istat;
- if (off == 0) {
- printf("%sstat: symbol not in namelist\n", name);
klseek(kmem, off, 0);
read(kmem, (char *)&spp_istat, sizeof (spp_istat));
printf("%s:\n", name);
klseek(kmem, off, 0);
read(kmem, (char *)&spp_istat, sizeof (spp_istat));
printf("%s:\n", name);
{
struct idpstat idpstat;
{
struct idpstat idpstat;
- if (off == 0) {
- printf("%sstat: symbol not in namelist\n", name);
klseek(kmem, off, 0);
read(kmem, (char *)&idpstat, sizeof (idpstat));
ANY(idpstat.idps_toosmall, "packet", " smaller than a header");
klseek(kmem, off, 0);
read(kmem, (char *)&idpstat, sizeof (idpstat));
ANY(idpstat.idps_toosmall, "packet", " smaller than a header");
register int histoprint = 1;
int z;
register int histoprint = 1;
int z;
- if (off == 0) {
- printf("%sstat: symbol not in namelist\n", name);
klseek(kmem, off, 0);
read(kmem, (char *)&ns_errstat, sizeof (ns_errstat));
printf("NS error statistics:\n");
klseek(kmem, off, 0);
read(kmem, (char *)&ns_errstat, sizeof (ns_errstat));
printf("NS error statistics:\n");