summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/physical.c
Commit message (Collapse)AuthorAgeFilesLines
* o Add the -foreground switch. This switch behaves like -background exceptbrian1999-08-191-4/+4
| | | | | | | | | that ppp stays in the foreground. o Add the -quiet switch to quieten ppps startup o Add the -nat flag and discourage the use of the -alias flag. Both do the same thing. o Correct some nat usage strings. o Change the internal ``alias'' command to ``nat''.
* Add ISDN support via isdnd & i4b. This requires versionbrian1999-08-061-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | 0.81.1 of the i4b code - namely support of the I4B_VR_REQ ioctl via the i4brbchX device. Ppp controls the phone number, but idle timers and SYNC/RAW decisions are still made by isdnd (in isdnd.rc). This involves a new datalink state machine phase. The ``wait for carrier'' phase happens after dialing but before logging in. The whole dial state should really be abstracted so that each device type can deal with it in its own way (thinking about PPPoE) - but that'll have to wait. The ``set cd'' symantics remain the same for tty devices, but we now delay until we either get CD or timeout waiting (at which time we drop the link if we require CD). For i4b devices we always insist on carrier. Thanks to hm@ for his help, and especially for pointing out that I *don't* need to re-implement isdnd (that was a huge waste of time !) :-]
* o Obsolete the undocumented ``set weight'' command.brian1999-08-051-8/+17
| | | | | | | | | | | | | | | | | | | | | | | o If we're using RADIUS and the RADIUS mtu is less than our peers mru/mrru, reduce our mtu to this value for NetBSD too. o Make struct throughput's sample period dynamic and tweak the ppp version number to reflect the extra stuff being passed through the local domain socket as a result (MP mode). o Measure the current throughput based on the number of samples actually taken rather than on the full sample period. o Keep the throughput statisics persistent while being passed to another ppp invocation through the local domain socket. o When showing throughput statistics after the timer has stopped, use the stopped time for overall calculations, not the current time. Also show the stopped time and how long the current throughput has been sampled for. o Use time() consistently in throughput.c o Tighten up the ``show bundle'' output. o Introduce the ``set bandwidth'' command. o Rewrite the ``set autoload'' command. It now takes three arguments and works based on a rolling bundle throughput average compared against the theoretical bundle bandwidth over a given period (read: it's now functional).
* Show the correct error if we fail to open a device.brian1999-06-111-7/+17
|
* Correct the way ppp transfers links on the server side in MPbrian1999-06-051-15/+66
| | | | | | | | | mode by padding out the ``struct device'' to the maximum device size. Bump the ppp version number to indicate the transfer format change. This should make MP over tty and udp devices functional again.
* Introduce the ``keep-session'' option. Refer to the manbrian1999-06-021-3/+6
| | | | | | page for details. This allows MP over non-tty devices where the original ppp process must not exit (such as sshd-spawned ppp sessions).
* Increase the length of an individual device name to LINE_LEN.brian1999-06-011-5/+7
| | | | | Adjust the base physical device name correctly after a link transfer (allowing correct multilink callbacks).
* Correct the ``ignoring sync/async'' warnings so that they showbrian1999-05-241-7/+6
| | | | | | up with the correct device type. Reassign the correct tcpdevice or execdevice after transfering a link in MP server mode.
* Move the tty locking stuff back out to physical.c sobrian1999-05-181-43/+100
| | | | | | that we lock the device *before* we open it. We still open the device only once - and then ask all our handlers if they know how to handle it.
* Initialise the struct device part of struct ttydevice.brian1999-05-131-5/+4
|
* Allow ``host:port/udp'' devices and support ``host:port/tcp'' asbrian1999-05-121-51/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | being the same as the previous (still supported) ``host:port'' syntax for tcp socket devices. A udp device uses synchronous ppp rather than async, and avoids the double-retransmit overhead that comes with ppp over tcp (it's usually a bad idea to transport IP over a reliable transport that itself is using an unreliable transport). PPP over UDP provides througput of ** 1.5Mb per second ** with all compression disabled, maxing out a PPro/200 when running ppp twice, back-to-back. This proves that PPPoE is plausable in userland.... This change adds a few more handler functions to struct device and allows derivations of struct device (which may contain their own data etc) to pass themselves through the unix domain socket for MP. ** At last **, struct physical has lost all the tty crud ! iov2physical() is now smart enough to restore the correct stack of layers so that MP servers will work again. The version number has bumped as our MP link transfer contents have changed (they now may contain a `struct device'). Don't extract the protocol twice in MP mode (resulting in protocol rejects for every MP packet). This was broken with my original layering changes. Add ``Physical'' and ``Sync'' log levels for logging the relevent raw packets and add protocol-tracking LogDEBUG stuff in various LayerPush & LayerPull functions. Assign our physical device name for incoming tcp connections by calling getpeername(). Assign our physical device name for incoming udp connections from the address retrieved by the first recvfrom().
* Revert to the previous behaviour of only doing a utmpbrian1999-05-091-2/+2
| | | | login if we're -direct on a tty device.
* o Redesign the layering mechanism and make the aliasing code part ofbrian1999-05-081-64/+676
| | | | | | | | | | | | | | | | | | | | | the layering. We now ``stack'' layers as soon as we open the device (when we figure out what we're dealing with). A static set of `dispatch' routines are also declared for dealing with incoming packets after they've been `pulled' up through the stacked layers. Physical devices are now assigned handlers based on the device type when they're opened. For the moment there are three device types; ttys, execs and tcps. o Increment version number to 2.2 o Make an entry in [uw]tmp for non-tty -direct invocations (after pap/chap authentication). o Make throughput counters quad_t's o Account for the absolute number of mbuf malloc()s and free()s in ``show mem''. o ``show modem'' becomes ``show physical''.
* Change ``set device'' so that it parses its arguments as onebrian1999-04-271-2/+3
| | | | | | | | | | device per argument rather than the old way of concatenating everything then splitting the result at commas and whitespace. Old syntax of ``set device /dev/cuaa0, /dev/cuaa1'' may no longer contain the comma, but syntax such as ``set device "!ssh host ppp -direct label"'' is now possible.
* Only call isatty() when we open our descriptor, and rememberbrian1999-01-101-7/+2
| | | | | | | | | | | the answer. If we later get a descriptor exception from select(), we know that it's a tty (isatty() returns 0 after the exception on a tty) and remember to call modem_LogicalClose(). The upshot of it all is that descriptor exceptions dont leave the tty locked any more.
* If we've got a full output buffer queue and cannot sendbrian1998-08-251-1/+11
| | | | | | | | anything for two mintues (see ``set choked'' and ``show bundle''), nuke the ip, mp and link level buffer queues. This should fix problems where ``ppp -auto'' seems to stop responding after failing to connect to the peer a few times.
* o Support callback types NONE, E.164, AUTH and CBCP.brian1998-08-071-3/+4
| | | | | | | | | | | | | | (see the new ``set callback'' and ``set cbcp'' commands) o Add a ``cbcp'' log level and mbuf type. o Don't dump core when \T is given in ``set login'' or ``set hangup''. o Allow ``*'' and blanks as placeholders in ppp.secret and allow a fifth field for specifying auth/cbcp dialback parameters. o Remove a few extraneous #includes o Define the default number of REQs (restart counter) in defs.h rather than hardcoding ``5'' all over the place. o Fix a few man page inconsistencies.
* Remove redundant includesbrian1998-06-271-3/+1
|
* o Move our prompt descriptor list outside of the bundle.brian1998-05-231-2/+2
| | | | | | | | | | | | | | | | | | | | It's now dealt with by the `server' object. This simplifies things as we only have one list of prompt descriptors and the log_ routines check prompt::logactive to determine whether it should be used for output. o Include the MP socket UpdateSet() result in bundle::UpdateSet(). o Don't select on the tun device unless we're in NETWORK phase or AUTO mode. o Stop the idle timer when we go to DEAD phase. We may have transferred a link and not had a chance to kill it. o Don't fail when trying to unlink our transferred datalink from our descriptor lists just before the transfer. o Add our link descriptor to the write set if we got a short write the last time (physical::out is set). o Log the connection source address when a connection is closed. o Remove descriptor::next field. Descriptor lists are not required any more.
* MFMP: Make ppp multilink capable.brian1998-05-211-0/+230
See the file README.changes, and re-read the man page.
OpenPOWER on IntegriCloud