I do not consider this to be an answer. Class A, Class B, and Class C addresses are methods of assigning network numbers. They have nothing to do with the format of the 'dotted decimal' form. The above describes an allocation scheme, it does not describe a syntax for dotted decimal notation. The words "dotted decimal notation" appear nowhere in the text.

To prove this to yourself, consider the wording of a Class C address: "21 bits of net, 8 bits of host". If this section was not speaking about an allocation scheme, and it was talking about the suggested decimal notation syntax, would it not be an indication that "a.b" should mean a=21bits, and b=8bits? Of course not. This section defines how the 32 bit address space is logically classified into different sized network partitions.

Now, I can believe that the BSD people assumed that they could extend the traditional 'quad dotted decimal' form, and 'enhance' inet_aton/inet_addr to allow nodes within a Class A allocation to be addressed using a single integer, however, nowhere have I found an official syntax (BNF or otherwise) that defines this method of accepting/parsing dotted decimal ip addresses as a requirement, or even a suggestion. Also, as I stated before, the email specifications seem to require that ip addresses are strictly checked, and that ip addresses used in email headers must be in quad form with values of 0-255 for each decimal integer.

The inet_aton/inet_addr implementation in GLIBC further extends 'decimal integer' form to allow base 8 and base 16 integers. I have not found a reference that defines this implementation as standard or portable either.


In reply to Re: Re: Re: Re: Re: Re: Re: gethostbyname("1.1.1") returns 1.1.0.1 ???? by MarkM
in thread gethostbyname("1.1.1") returns 1.1.0.1 ???? by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.