Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Aug 1995 02:51:49 -0700 (PDT)
From:      "Rodney W. Grimes" <rgrimes@gndrsh.aac.dev.com>
To:        jkh@freefall.FreeBSD.org (Jordan K. Hubbard)
Cc:        freebsd-bugs@freebsd.org, joerg_wunsch@uriah.heep.sax.de
Subject:   Re: 950726-SNAP lp0/nfs install bug ?
Message-ID:  <199508120951.CAA05606@gndrsh.aac.dev.com>
In-Reply-To: <8860.808173419@freefall.FreeBSD.org> from "Jordan K. Hubbard" at Aug 11, 95 01:36:59 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> > Jordan, speaking at this part of the installation, it would be nice to
> > either pre-allocate the netmask field with the proper default netmask
> > (similar to the `domain') or omit the `netmask' keyword from the
> > ifconfig command line if no netmask has been provided.  Otherwise,
> 
> Yeek!  I thought I did!  I will look at the code..
> 
> Hmmm.  Anyone willing to give me a little formula to calculate
> netmask based on IP address?  Then I could also fill it in.. :-)

See the ifconfig code that does this now based upon the class of network
address.  It is rather simply.  For inet address with the high order
2 bits 0 the standard class A netmask of 0xff00000000 applies, for
inet address starting 10 a class B netmask of 0xffff0000 applies, and
finally for an inet address starting 11 a class C netmask of 0xffffff00
applies.



-- 
Rod Grimes                                      rgrimes@gndrsh.aac.dev.com
Accurate Automation Company                 Reliable computers for FreeBSD



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199508120951.CAA05606>