Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: linux-ipsec: apps/utils/libs that parse IP/netbits

From: Michael H. Warfield <mhw(at)alcove.wittsend.com>
Date: Tue Jul 21 1998 - 09:23:36 EDT


Hugh Daniel enscribed thusly:
> Oh, one thing that allways bothered me was systems that barfed when

        Should not barf on those addresses. They are legitimate addresses, although they probably are NOT what you want. Now this address would cause something to barf:

         192.168.008.095

> etc.
> so that address lined up visualy, often for simpler debugging and the
> like.

        The numbers like 045 are octal. So 045 is really 37. Like it or not, agree with it or not, that has been the convention for a long LONG time (read that as being as long as IP has been a standard). If you "fix" it, you are going to find A LOT of things that just flat out go broke. The inaddr() function behaves this way and if you do something contray just for esthetics, you'll be chasing screw-ups, where one program (or system) interprets an address one way and another interprets it another way, until it's a VERY COLD DAY in a VERY WARM PLACE! The random acts of terrorism this would commit far FAR outweigh making your lists of addresses "pretty" and lining them up...

        I've gotten into these debates before (at least once or twice a year I hear of someone calling support who doesn't understand why some application or another doesn't like the address 019 or such) and I haven't found anything in the RFC's which explicitly codifies this convention, but nothing explictily contradicts it and it is a DEEPLY intrenched convention. And to those who wonder, yes hexidecimal works too and you can put 0x0A for address 10.

> If would be nice if your library does not foul up on this sort of

        The results are not fouled up or strange once you understand what it is doing. It's also a function of the underlying support library functions such as inaddr() as well. It may be poorly documented, but it is NOT broken.

Do you need help?X

> ||ugh Daniel
> hugh@toad.com

> Systems Testing & Project mis-Management

        Mike

-- 
 Michael H. Warfield    |  (770) 985-6132   |  mhw@WittsEnd.com
  (The Mad Wizard)      |  (770) 925-8248   |  
http://www.wittsend.com/mhw/
  NIC whois:  MHW9      |  An optimist believes we live in the best of all
 PGP Key: 0xDF1DD471    |  possible worlds.  A pessimist is sure of it!
Received on Tue Jul 21 12:10:35 1998

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 12:59:24 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library