curiouser and curiouser, at least some Go packages parse it that way:
rminnich@a300:~/go/src/github.com/u-root/u-root/cmds/core/ping$ cpu
-key ~/.ssh/cpu_rsa 192.168.16 date
Sat May 7 12:56:29 PM PDT 2022
rminnich@a300:~/go/src/github.com/u-root/u-root/cmds/core/ping$ cpu
-key ~/.ssh/cpu_rsa 192.168.0.16 date
Sat May 7 12:57:05 PM PDT 2022
rminnich@a300:~/go/src/github.com/u-root/u-root/cmds/core/ping$
[cpu is basically ssh with the plan 9 cpu command baked in, written in Go]
So as a convention, it's been out and about for close to 40 years,
many systems honor it, it seems not many people know of it, and not
everything interprets it the same way. Huh! Well, you learn something
new every day.
I found it a wonderful shorthand when somebody showed it to me, and
it's wired into my fingers at this point. I just assumed everyone else
used it too. I may dig around and try to figure out when Plan 9 picked
it up, that might give me some idea as to provenance.
On Sat, May 7, 2022 at 12:50 PM ron minnich <rminnich(a)gmail.com> wrote:
here's a simple example:
rminnich@a300:~/tamago/t9$ ping 127.1
PING 127.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.056 ms
telnet 127.1 22
Trying 127.0.0.1...
Connected to 127.1.
All plan 9 programs I try parse 127.1 as 127.0.0.1
I first learned to use this convention in a BSD world, later on sunos.
Interesting, the things you think are a standard, and are actually
just a convention!
On Sat, May 7, 2022 at 12:15 PM Warner Losh <imp(a)bsdimp.com> wrote:
>
>
>
> On Sat, May 7, 2022 at 10:23 AM ron minnich <rminnich(a)gmail.com> wrote:
>>
>> IP4 padding came up recently: the ip command interprets 10.2 as
>> 10.2.0.0, whereas most things (golang libraries, ping, ...) interpret
>> it as 10.0.0.2. The latter interpretation accords with what I learned
>> 40y ago.
>
>
> 10.2 is ambiguous. In a network context, it means, typically, 10.2.0.0/16 (though
your mileage may vary).
> In a host context, it means 10.0.0.2. It's this confusion that has lead to many
efforts
> to outright kill this notation.
>
>>
>> But, I find myself wondering: where was the first use of the IP4 zero
>> padding convention?
>
>
> I know that it was around in the late 80s on TOPS-20 TCP/IP at Stanford, and in
4.2BSD (4.1c?). It may have also been in use at MIT. It's usage pre-dates my 1984
joining of the internet...
>
> Warner