Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Mar 2000 09:07:59 -0600 (CST)
From:      Joe <joe@team7.cba.ualr.edu>
To:        Yoshinobu Inoue <shin@nd.net.fujitsu.co.jp>
Cc:        dnelson@emsphone.com, freebsd-questions@FreeBSD.ORG
Subject:   Re: sockstat not reporting all
Message-ID:  <Pine.BSF.4.10.10003050900180.386-100000@njal.ualr.edu>
In-Reply-To: <20000305160547N.shin@nd.net.fujitsu.co.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks for your help, I'll try this out.

_joe 

On Sun, 5 Mar 2000, Yoshinobu Inoue wrote:

> > bash-2.03$ perl -w sockstat.pl
> > USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS
> > Use of uninitialized value at sockstat.pl line 40, <FSTAT> chunk 34.
> > Use of uninitialized value at sockstat.pl line 40, <FSTAT> chunk 34.
> > Use of uninitialized value at sockstat.pl line 40, <FSTAT> chunk 34.
> > root     sshd1    14580    5
> > 
> > Do you think I found the problem?
> > 
> > -Joe
> 
> Hi, I tried to fix it on an alpha machine,
> and the following patch seemd to fix it.
> (And as far as the compile warning showed, there seems to be
> also other several part where pointer printing format need to
> be fixed.)
> 
> Cheers,
> Yoshinobu Inoue
> 
> 
> --- fstat.c.orig        Mon Feb 21 03:06:01 2000
> +++ fstat.c     Sun Mar  5 14:57:50 2000
> @@ -696,11 +696,11 @@
>                                             (void *)so.so_pcb);
>                                         goto bad;
>                                 }
> -                               printf(" %x", (int)inpcb.inp_ppcb);
> +                               printf(" %8lx", (u_long)inpcb.inp_ppcb);
>                         }
>                 }
>                 else if (so.so_pcb)
> -                       printf(" %x", (int)so.so_pcb);
> +                       printf(" %8lx", (u_long)so.so_pcb);
>                 break;
>         case AF_UNIX:
>                 /* print address of pcb and connected pcb */
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
> 
> 



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.10003050900180.386-100000>