/usr/share/doc/pptp-linux/DESIGN.CALLMGR is in pptp-linux 1.7.2-7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | Call Manager is a single-threaded application.
It's easier that way.
Nothing blocks except a select() call.
The pptp code provides an fd_set for us to watch, and a function
to call to see if a given event pertains to the pptp code.
Each CALL connection goes in the exceptions set, and is watched for close.
We need a separate list of these, to check against the fd_set when
an event happens.
Writes get copied in a queue, and are only written if the select says we
can.
Reads go in another queue -- non-blocking! -- and messages are made from
the queue as we are able.
We register callbacks on significant events (any and all of them, if
we please) which can trigger a close on a user unix socket, for
example.
Nomenclature:
inet_read|write ... TCP port 1723 PPTP control connection
unix_read|write ... Call manager Unix socket to pppd/gre.
|