Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 May 1996 12:02:27 -0600
From:      Nate Williams <nate@sri.MT.net>
To:        Gary Aitken <garya@ics.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: user ppp with dedicated line
Message-ID:  <199605151802.MAA19630@rocky.sri.MT.net>
In-Reply-To: <3199FF85.21E7@ics.com>
References:  <3199FF85.21E7@ics.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> 2. In order to get ppp to work on my dedicated line, I needed
> to make the following mods to force packet mode:
> 
> *** /cdrom/usr/src/usr.sbin/ppp/main.c  Thu Oct  5 14:24:42 1995
> --- main_new.c  Wed May  1 07:46:56 1996
> ***************
> *** 599,604 ****
> --- 599,610 ----
>     } else if (mode & MODE_DEDICATED) {
>       if (!modem)
>         modem = OpenModem(mode);
> +     /*
> +      * garya@dreamchaser.org
> +      * Force packet mode as for a direct connection
> +      */
> +     PacketMode();
>     }

I really didn't have time to look at this, but I was intrigued enough to
do it.  Apparently, in 'dedicated' mode PPP waits for the remote site to
initiate the connection.

main.c, starting at 796
        if (LcpFsm.state <= ST_CLOSED) {
          /*
           *  In dedicated mode, we just discard input until LCP is started.
           */
          if (!(mode & MODE_DEDICATED)) {
            cp = HdlcDetect(rbuff, n);
            if (cp) {
              /*
               * LCP packet is detected. Turn ourselves into packet mode.
               */
              if (cp != rbuff) {
                write(1, rbuff, cp - rbuff);
                write(1, "\r\n", 2);
              }
              PacketMode();

By starting packet mode earlier with your patch I think are essentially
'forcing' the remote site to respond to you.  If it's necessary to get
working then it's an acceptable hack, but I don't think it's generically
applicable.

> 3. I'm having trouble getting ppp.linkup to be read when used with a
> dedicated line.  It appears to be totally ignored when ppp is
> started as follows, with the above mods:

I think it might be ignored because of the above hack.  PPP.LINKUP is
called by OsLinkup in IpcpLayerUp, but I'd have to take more time to
figure out when that is called.



Nate



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