logoalt Hacker News

bryanlarsen11/07/20241 replyview on HN

But sometimes 127.1 means 127.1.0.0/16. For example in the output of `netstat -rn` on MacOS.


Replies

Jtsummers11/07/2024

Good to know.

I was also coming back in to edit my comment and write that my x -> 0.0.0.x was technically wrong and the same for the others. If you stick to only single-byte values then what I wrote was correct but if the values span multiple bytes they fill in the missing 0s appropriately, as in:

  256   -> 0.0.1.0
  1.256 -> 1.0.1.0