pptp called as:
 pptp hostname [[pptp options] --] [pppd options]

The pptp program does:

gethostbyname([hostname]) to get ip number.

Try to open unix domain socket at /var/run/pptp/ip.num.ber.here.  
If not found, launch call manager for that ip address.

Call manager opens unix domain socket at /var/run/pptp/ip.num.ber.here, does:
  1) Open connection to the ip address using port 1723 protocol.
  2) accept unix domain socket connection. 
     [wait for any pptp call request to this ip]
  3)  On receiving a connection, open CALL to ip.address using port 1723. 
  2)  send callID over unix domain socket for gre encapsulation.
  3)  Keepalive the socket.  When either side closes socket, send
      call-close message to ip.address using port 1723.
  4)  on close of last call, send connection close using port 1723, 
      close the unix domain socket at /var/run/pptp/ip.num.ber.here,
      and exit.

Once call manager is opened (fork when done to return status to parent),
the main process forks.
   Parent) launch gre-copy task. Holds call manager socket.  
   Child)  launch pppd with command-line options.

Killing any of the three threads should cleanly shutdown system. HOW?
Send pid of parent and child to call manager after fork over 
Unix-domain socket.

Alternatively pptp may be launched by pppd. One advantage is that
many existing tools for managing serial ppp connections can be used with
pptp connections as well. Another is some pppd options can only be used 
this way. In particular the options "persist" and "demand" may be of use.

Add the following option to your pppd options script:

pty "<insert.path.to>/pptp hostname --nolaunchpppd [--phone phone-nr]"

and start the connection like any other pppd connection. Note that
old versions of pppd may not support the pty option.

The following options are understood by pptp:

--phone phone-number
        Specify the phone number for the connection. This is required 
        by a number of ADSL services.

--nolaunchpppd
        Needed if pptp is to be launched by pppd. See above
        
        
