David Douthitt wrote:
> 
> Matt Schalit wrote:
> 
> >   I got around to replacing the ipmask-0.30 shell script
> > with the 0.32 compiled version on the LEAF oxygen packages site.
> >
> > I don't get the logic of the -c option.  It says:
> >         -c      Display only CIDR
> >
> > So why would that output ip/cidr?
> >          # ipmask -c 10.2.3.4 -m 255.255.128.0
> >           10.2.0.0/17
> >
> > That can't be what you meant for it to do, can it?
> 
> Sure.  I had a choice of returning
> 
> /17
> 
> ...and of returning...
> 
> 10.2.0.0/17
> 
> ...and I chose the latter.  It seems to make more sense, since the idea
> of ipmask was to return all manner of determined info in a script.


Hey it's you're program, you can make it do whatever
you want and that's fine and dandy.  I like the program
a lot and don't have any problem coding for it's output,
but my brain says "Display only CIDR" would return 17, 
the same way the other "Display only" commands do:

  -b      Display only broadcast address        --> 10.2.3.255
  -C      Display only Cisco wildcard mask      --> 0.0.0.255
  -c      Display only CIDR                     --> 
  -i      Display only IP                       --> 10.2.3.4
  -n      Display only network address          --> 10.2.3.0
  -d      Display only decimal address          --> 167904004
  -s      Display subnet mask only              --> 255.255.255.0
  -x      Display only hexadecimal IP           --> 0A020304


> This, however, means that anything that used the ipmask shell script had
> to be changed, since it only returned the /17 instead of everything.

That, of course, would sux.  I see that makes
the difference.  --Matt

_______________________________________________
Leaf-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-devel

Reply via email to