Re: Ping - error?

Horst von Brand (vonbrand@inf.utfsm.cl)
Fri, 12 Jun 1998 08:30:33 -0400


Brian Schau <bsc@fleggaard.dk> said:

[...]

> Now watch ... please notice the change in last octet:
>
> rlis6:/root # ping 192.168.33.036
> PING 192.168.33.036 (192.168.33.30): 56 data bytes
> ^^^^^^^^^^^^^
> 64 bytes from 192.168.33.30: icmp_seq=0 ttl=60 time=2.6 ms
> 64 bytes from 192.168.33.30: icmp_seq=1 ttl=60 time=1.5 ms
>
>
> It's the same on a Windows and a HP-UX box. I guess it's libc or the
> shell which is to blame, but why does it incorrectly parse 036 as 30?
> I know that 036 in octal is 30, but I didn't specify a backslash.

scanf(3), someone? ;-)

-- 
Dr. Horst H. von Brand                       mailto:vonbrand@inf.utfsm.cl
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu