*BSD News Article 32587


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!ihnp4.ucsd.edu!swrinde!gatech!newsxfer.itd.umich.edu!zip.eecs.umich.edu!panix!not-for-mail
From: wpaul@panix.com (Bill Paul)
Newsgroups: comp.os.386bsd.questions
Subject: Re: ppp pseudo-device ?
Date: 10 Jul 1994 15:57:22 -0400
Organization: The M00se Illuminati (bl00p!)
Lines: 36
Message-ID: <2vpjr2$580@panix3.panix.com>
References: <2votr5$94d@uuneo.neosoft.com>
NNTP-Posting-Host: panix3.panix.com
X-Newsreader: TIN [version 1.2 PL2]

Daring to challenge the will of the almighty Leviam00se,
Thuy Mai (thuy@starbase.neosoft.com) had the courage to say:

: I am running FreeBSD 1.1.  When I configure SLIP connection, I 
: just defined "pseudo-device sl <number>" & "netstat -i" will
: show exact number of slip devices that  I have.
: I trying to do the same with the PPP connection, it seems like
: it doesn't matter what number that I try to configure:
: pseudo-device ppp <number>.  It shows that I only have one ppp0.

: Any ideas,
: thuy

This is the result of a small bug in FreeBSD 1.1. Go to /usr/src/sys/net
and you will see a file called ppp.h. Rename this file to something else
(pppdefs.h, for instance) and recompile.

The problem is that the 'config' command creates a file in your kernel
compilation tree (/usr/src/sys/compile/CONFIGFILE) called ppp.h which
contains the line: #define NPPP N (where N is the number of ppp devices
you specified in your configuration). /usr/src/sys/net/ppp.h also
contains a #definition for NPPP, which happens to be hard-coded to 1.
The name conflict causes the wrong ppp.h to be read, and the end result
is that if_ppp.c always sees #define NPPP 1.

Strange, but thue.

-Bill

--
 _      /\      _            Join the
/ \_/\_/  \_/\_/ \  .----.   M00se Illuminati   Bill Paul 
\_____/ () \_____/ (bl00p!)  Face it: wouldn't  <Big City M00se>
     /      \       `----'   you feel much      wpaul@panix.com   -or-
    /  \__/  \    --'        safer?             ghod@drycas.club.cc.cmu.edu
   /__________\