Re: ifconfig output: ipv4 netmask format

2011-04-11 Thread Sergey Vinogradov
On 08.04.2011 16:08, Sergey Vinogradov wrote: Hi, hackers. I have a question: why ipv4 netmask is displayed by ifconfig in hex format? Isn't dot-decimal notation more human-readable? Will the attached patch break something in the very bad way? ___ fr

Re: ifconfig output: ipv4 netmask format

2011-04-11 Thread Sergey Vinogradov
On 09.04.2011 16:07, Damien Fleuriot wrote: On 4/9/11 7:33 AM, Garrett Cooper wrote: Although I see the value of your and Sergey's argument, the problem is that it may cause unexpected breakage for other third parties that depend on a particular behavior in FreeBSD as Bjoern and others have s

Re: ifconfig output: ipv4 netmask format

2011-04-09 Thread J. Hellenthal
On Sat, Apr 09, 2011 at 12:41:05PM -0400, dieter...@engineer.com wrote: >Paul Schenkeveld writes: >>Although non-contiguous netmasks are not legal anymore in IPv4, our >>ifconfig still allows to do something like: >> >> # ifconfig em0 inet 10.0.5.2 netmask 255.0.255.0 >> # ifconfig em0 >> em0

Re: ifconfig output: ipv4 netmask format

2011-04-09 Thread Mike Bristow
On Fri, Apr 08, 2011 at 11:43:16AM -0600, Warner Losh wrote: > > Non-contigous netmasks are legal in IPv4. What do you do if someone adds > > the CIDR flag but the netmask cannot be represented in CIDR notation? > > They have become illegal in the fullness of time. I'll rephrase my point, then:

Re: ifconfig output: ipv4 netmask format

2011-04-09 Thread dieterbsd
Paul Schenkeveld writes: Although non-contiguous netmasks are not legal anymore in IPv4, our ifconfig still allows to do something like: # ifconfig em0 inet 10.0.5.2 netmask 255.0.255.0 # ifconfig em0 em0: flags=8843 metric 0 mtu 1500 options=219b ether xx:xx:xx:xx:xx

Re: ifconfig output: ipv4 netmask format

2011-04-09 Thread Damien Fleuriot
On 4/9/11 7:33 AM, Garrett Cooper wrote: > > Although I see the value of your and Sergey's argument, the problem is > that it may cause unexpected breakage for other third parties that > depend on a particular behavior in FreeBSD as Bjoern and others have > suggested; I have a script at least th

Re: ifconfig output: ipv4 netmask format

2011-04-09 Thread perryh
Warner Losh wrote: > > Non-contigous netmasks are legal in IPv4 ... > > They have become illegal in the fullness of time. and/or the fullness of the address space, I suspect :) Even if they were legal, I have a hard time imagining a practical use case. __

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread J. Hellenthal
On Fri, Apr 08, 2011 at 10:33:17PM -0700, Garrett Cooper wrote: >On Fri, Apr 8, 2011 at 9:54 PM, J. Hellenthal wrote: >> On Fri, Apr 08, 2011 at 07:36:45PM +0400, Sergey Vinogradov wrote: >>>On 08.04.2011 19:23, Mike Oliver wrote: On Fri, Apr 8, 2011 at 08:08, Sergey Vinogradov   wrote: >>

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Garrett Cooper
On Fri, Apr 8, 2011 at 9:54 PM, J. Hellenthal wrote: > On Fri, Apr 08, 2011 at 07:36:45PM +0400, Sergey Vinogradov wrote: >>On 08.04.2011 19:23, Mike Oliver wrote: >>>On Fri, Apr 8, 2011 at 08:08, Sergey Vinogradov  wrote: Hi, hackers. I have a question: why ipv4 netmask is displayed by if

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread J. Hellenthal
On Fri, Apr 08, 2011 at 07:36:45PM +0400, Sergey Vinogradov wrote: >On 08.04.2011 19:23, Mike Oliver wrote: >>On Fri, Apr 8, 2011 at 08:08, Sergey Vinogradov wrote: >>>Hi, hackers. >>>I have a question: why ipv4 netmask is displayed by ifconfig in hex format? >>>Isn't dot-decimal notation more hum

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Bjoern A. Zeeb
On Fri, 8 Apr 2011, Warner Losh wrote: Non-contiguous netmasks are *not* legal anymore in IPv4. Just reference the RFC and everyone will agree... *oops* ;-) On the general thread: I'd seriously stop bothering with any decisions that will change the way IPv4 works or has worked or the output

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Matthew Seaman
On 08/04/2011 16:53, Garrett Cooper wrote: > One thing I've been curious about for a while that I haven't had an > opportunity to look into is: what does IPV6 look like? I understand > that the /netmask bit is added to the end of addresses, but what does > the netmask actually look like? Like this

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Paul Schenkeveld
On Fri, Apr 08, 2011 at 01:16:17PM -0600, Warner Losh wrote: > > On Apr 8, 2011, at 1:00 PM, Sergey Vinogradov wrote: > > > 08.04.2011 19:55, Mike Bristow пишет: > >> On Fri, Apr 08, 2011 at 07:40:56PM +0400, Sergey Vinogradov wrote: > >>> On 08.04.2011 19:23, Warner Losh wrote: > On Ap

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Warner Losh
On Apr 8, 2011, at 1:00 PM, Sergey Vinogradov wrote: > 08.04.2011 19:55, Mike Bristow пишет: >> On Fri, Apr 08, 2011 at 07:40:56PM +0400, Sergey Vinogradov wrote: >>> On 08.04.2011 19:23, Warner Losh wrote: On Apr 8, 2011, at 6:08 AM, Sergey Vinogradov wrote: If we really wanted to make

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Sergey Vinogradov
08.04.2011 19:55, Mike Bristow пишет: On Fri, Apr 08, 2011 at 07:40:56PM +0400, Sergey Vinogradov wrote: On 08.04.2011 19:23, Warner Losh wrote: On Apr 8, 2011, at 6:08 AM, Sergey Vinogradov wrote: If we really wanted to make it human readable, we'd output 10.2.3.4/24 So, maybe, while followi

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Sergey Vinogradov
[snip] So, maybe, while following the POLA, we should add an option, as Daniel mentioned above? To output the CIDR? Eh... I don't know if doing this would be wise because it might break some 3rd party mechanisms for parsing the output (as broken as you might think it is), in particular (for ex

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Warner Losh
On Apr 8, 2011, at 9:55 AM, Mike Bristow wrote: > On Fri, Apr 08, 2011 at 07:40:56PM +0400, Sergey Vinogradov wrote: >> On 08.04.2011 19:23, Warner Losh wrote: >>> On Apr 8, 2011, at 6:08 AM, Sergey Vinogradov wrote: >>> If we really wanted to make it human readable, we'd output 10.2.3.4/24 >> >

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Mike Oliver
On Fri, Apr 8, 2011 at 11:53, Garrett Cooper wrote: > > One thing I've been curious about for a while that I haven't had an > opportunity to look into is: what does IPV6 look like? I understand > that the /netmask bit is added to the end of addresses, but what does > the netmask actually look like

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Mike Bristow
On Fri, Apr 08, 2011 at 07:40:56PM +0400, Sergey Vinogradov wrote: > On 08.04.2011 19:23, Warner Losh wrote: > > On Apr 8, 2011, at 6:08 AM, Sergey Vinogradov wrote: > > If we really wanted to make it human readable, we'd output 10.2.3.4/24 > > So, maybe, while following the POLA, we should add an

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Garrett Cooper
On Fri, Apr 8, 2011 at 8:40 AM, Sergey Vinogradov wrote: > On 08.04.2011 19:23, Warner Losh wrote: >> >> On Apr 8, 2011, at 6:08 AM, Sergey Vinogradov wrote: >> >>> Hi, hackers. >>> I have a question: why ipv4 netmask is displayed by ifconfig in hex >>> format? Isn't dot-decimal notation more huma

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Mike Oliver
On Fri, Apr 8, 2011 at 08:08, Sergey Vinogradov wrote: > Hi, hackers. > I have a question: why ipv4 netmask is displayed by ifconfig in hex format? > Isn't dot-decimal notation more human-readable? Will the attached patch > break something in the very bad way? Who's using IPv4 anymore? ;-) Seri

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Damien Fleuriot
On 4/8/11 5:40 PM, Sergey Vinogradov wrote: > On 08.04.2011 19:23, Warner Losh wrote: >> >> On Apr 8, 2011, at 6:08 AM, Sergey Vinogradov wrote: >> >>> Hi, hackers. >>> I have a question: why ipv4 netmask is displayed by ifconfig in hex >>> format? Isn't dot-decimal notation more human-readable?

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Sergey Vinogradov
On 08.04.2011 19:23, Warner Losh wrote: On Apr 8, 2011, at 6:08 AM, Sergey Vinogradov wrote: Hi, hackers. I have a question: why ipv4 netmask is displayed by ifconfig in hex format? Isn't dot-decimal notation more human-readable? Will the attached patch break something in the very bad way?

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Sergey Vinogradov
On 08.04.2011 19:23, Mike Oliver wrote: On Fri, Apr 8, 2011 at 08:08, Sergey Vinogradov wrote: Hi, hackers. I have a question: why ipv4 netmask is displayed by ifconfig in hex format? Isn't dot-decimal notation more human-readable? Will the attached patch break something in the very bad way?

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Warner Losh
On Apr 8, 2011, at 6:08 AM, Sergey Vinogradov wrote: > Hi, hackers. > I have a question: why ipv4 netmask is displayed by ifconfig in hex format? > Isn't dot-decimal notation more human-readable? Will the attached patch break > something in the very bad way? This is a gratuitous change that wo

Re: ifconfig output: ipv4 netmask format

2011-04-08 Thread Daniel Gerzo
On Fri, 08 Apr 2011 16:08:38 +0400, Sergey Vinogradov wrote: Hi, hackers. I have a question: why ipv4 netmask is displayed by ifconfig in hex format? Isn't dot-decimal notation more human-readable? Will the attached patch break something in the very bad way? At least, it may break some scripts.