J. Peng wrote:
On Thu, Feb 21, 2008 at 3:29 PM, John W. Krahn <[EMAIL PROTECTED]> wrote:
J. Peng wrote:
 > how to translate this mask to clear text form with perl?
 > netmask 0xffffffff

 If you mean an IP address netmask then 0xffffffff is an invalid netmask
 because all the bits are 1.


John,

all 1 means 255.255.255.255, is it?
it's also a valid netmask I think.

I dont know how to translate that,:)

According to the RFC's

<QUOTE>
    ipAdEntNetMask OBJECT-TYPE
              SYNTAX  IpAddress
              ACCESS  read-only
              STATUS  mandatory
              DESCRIPTION
                      "The subnet mask associated with the IP address of
                      this entry.  The value of the mask is an IP
                      address with all the network bits set to 1 and all
                      the hosts bits set to 0."
              ::= { ipAddrEntry 3 }
</QUOTE>

So 0xffffffff would indicate a network with no hosts on it and thus it is not a valid netmask.



John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to