summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/defs.h
Commit message (Collapse)AuthorAgeFilesLines
* o Obsolete the undocumented ``set weight'' command.brian1999-08-051-2/+1
| | | | | | | | | | | | | | | | | | | | | | | 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).
* Increase the length of an individual device name to LINE_LEN.brian1999-06-011-3/+4
| | | | | Adjust the base physical device name correctly after a link transfer (allowing correct multilink callbacks).
* o Redesign the layering mechanism and make the aliasing code part ofbrian1999-05-081-1/+4
| | | | | | | | | | | | | | | | | | | | | 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-4/+5
| | | | | | | | | | 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.
* Allow control over the number of ConfigREQ & TermREQ attemptsbrian1999-02-261-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that are made in each of the FSMs (LCP, CCP & IPCP) and the number of REQs/Challenges for PAP/CHAP by accepting more arguments in the ``set {c,ip,l}cpretry'' and ``set {ch,p}apretry'' commands. Change the non-convergence thresholds to 3 times the number of configured REQ tries (rather than the previous fixed ``10''). We now notice repeated NAKs and REJs rather than just REQs. Don't suggest that CHAP 0x05 isn't supported when it's not configured. Fix some bugs that expose themselves with smaller numbers of retries: o Handle instantaneous disconnects (set device /dev/null) correctly by stopping all fsm timers in fsm2initial. o Don't forget to uu_unlock() devices that are files but are not ttys (set device /dev/zero). Fix a *HORRENDOUS* bug in RFC1661 (already fixed for an Open event in state ``Closed''): According to the state transition table, a RCR+ or RCR- received in the ``Stopped'' state are supposed to InitRestartCounter, SendConfigReq and SendConfig{Ack,Nak}. However, in ``Stopped'', we haven't yet done a TLS (or the last thing we did is a TLF). We must therefore do the TLS at this point ! This was never noticed before because LCP and CCP used not use LayerStart() for anything interesting, and IPCP tends to go into Stopped then get a Down because of an LCP RTR rather than getting a RCR again.
* Parse IP addresses more securely - specifically, don't allowbrian1999-02-251-1/+2
| | | | | | | | a bum name to return as 0.0.0.0... we don't want ``delete xxx'' to delete the default route when xxx doesn't resolve. Support IP number specifications as the host when specifying a tcp-style device (rather than *just* hostnames).
* Wait by default for one second after the login scriptbrian1999-02-161-1/+2
| | | | | | | | | | | | | | | | | is complete before checking carrier. If it's there, the device supports carrier. If it's not it doesn't. Add the ``set cd'' command for deciding how soon to check for carrier, and for deciding if carrier is REQUIRED. The default has changed: Pre 2.0 versions of ppp waited for 1 second. Version 2 didn't wait, but this causes problems with some (few?) modems that don't assert carrier immediately on reporting CONNECT. The one second delay is back now and can be removed with ``set cd 0''. Bump the ppp version number in case this needs to be changed again....
* When resending chap challenges, resend the same challengebrian1999-02-111-2/+2
| | | | | | | | | | | | | | | | | | | each time rather than making up a new one. Increase the authname/authkey max sizes to 100 characters. Allow ``authkey'' specifications beginning with ``!''. When a challenge is received, the text following the ``!'' is executed as a program (expanding stuff in the same way that ``sh'' and ``!bg'' do). The program is passed the peer name, peer challenge and local ``authname'' on standard input and is expected to output the name/key combination that should be used to build the CHAP response. This provides support for Secure ID cards (guess what I was given at work recently!) using CHAP. Examples will follow.
* Initial RADIUS support (using libradius). See the man page forbrian1999-01-281-1/+4
| | | | | | | | | | | | | | | | | | | details. Compiling with -DNORADIUS (the default for `release') removes support. TODO: The functionality in libradius::rad_send_request() needs to be supplied as a set of routines so that ppp doesn't have to wait indefinitely for the radius server(s). Instead, we need to get a descriptor back, select() on the descriptor, and ask libradius to service it when necessary. For now, ppp blocks SIGALRM while in rad_send_request(), so it misses PAP/CHAP retries & timeouts if they occur. Only PAP is functional. When CHAP is attempted, libradius complains that no User-Password has been specified... rfc2138 says that it *mustn't* be used for CHAP :-( Sponsored by: Internet Business Solutions Ltd., Switzerland
* If we've got a full output buffer queue and cannot sendbrian1998-08-251-2/+3
| | | | | | | | 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-1/+2
| | | | | | | | | | | | | | (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.
* Change MIN_LQRPERIOD from 5 to 2.brian1998-07-111-3/+3
|
* o Fix remaining sizeof problems for 64 bit machines.brian1998-06-271-1/+3
| | | | | | | | | | o Allow ``set ....'' when we have multiple links but aren't in multilink mode. o Do a TLS when we receive a ``Open'' event in ``Closed'' state, despite the rfc state transition table. This is clearly an error in the RFC as TLS cannot have yet been called (without TLF) in the ``Closed'' state. I've posted a message to comp.protocols.ppp for confirmation.
* o Make modes consistent throughout ppp. The same strings are usedbrian1998-05-291-9/+9
| | | | | | | | | | | | | | | in `set mode', `allow modes', on the command line and when outputting mode names. The strings are matched so that only enough characters to uniquely identify the string are required, so you can now ppp -a mylabel (for auto mode) ppp -b mylabel (for background mode) ppp -dd mylabel (for direct dial mode) etc. o Make -ddial dial when specified on the command line (oops). Pointed out by: Alex <garbanzo@hooked.net>
* o #define the name "tun" in defs.h against the future possibilitybrian1998-05-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | of supporting architectures with different device names. o Close /dev/tunX when destroying the bundle. o Don't forget to close the parent end of the pipe in the child process when exec'ing a program from a chat script. o If we close our controlling terminal, ditch the current session with it, allowing getty(8) (or whatever) to regain control. o After transferring our controlling terminal descriptor to another ppp instance, we now fork a new ppp to continue where we left off, transferring ownership of all uucp locks and the /var/run/tunX.pid file. Meanwhile the parent closes all file descriptors, defaults all signals and does a pause() to wait for a HUP after the transferred descriptor is finally closed. We don't run /bin/cat any more (again!). Suggested by: bde TODO: It seems clocal devices need their pause()d session leader to be given a manual HUP, as closing the last open descriptor doesn't do the job.
* MFMP: Make ppp multilink capable.brian1998-05-211-38/+30
| | | | See the file README.changes, and re-read the man page.
* Show who closes the diagnostic connection.brian1997-12-271-2/+2
| | | | | | Show the IP range (if specified) in "show ipcp". Close unused descriptors 0 and 2 in interactive mode. Pass (size_t *) rather than (int *) to sysctl().
* Fix prototypes.brian1997-11-221-1/+2
| | | | | | | | | | | | | | Remove extraneous decls. Add ``const'' to several places. Allow ``make NOALIAS=1'' to remove IP aliasing. Merge with OpenBSD - only the Makefiles vary. We can now survive a compile with -Wall -Wbad-function-cast -Wcast-align -Wcast-qual -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings -Wchar-subscripts (although the Makefile just contains -Wall).
* Add and use a DropClient() function for closing the diagnostic port.brian1997-11-181-1/+2
| | | | Call DropClient() from Cleanup() too.
* Add id strings to tun.[ch].brian1997-11-171-1/+2
| | | | Don't try to open ppp.secret if we're never going to use it.
* Finish the security improvements:brian1997-11-111-2/+6
| | | | | | | | | | | | | | | | | | | o Add "allow" command: "allow users a b c" gives access to users a, b and c. "allow modes auto" gives those users access to auto mode only. "allow users *" and "allow modes *" are accepted. No users and all modes are allowed by default. UID 0 can do anything. o Set the current label with the "load" and "dial" commands so that the call to ppp.linkdown makes sense. o Up the verison number. o Don't OR MODE_AUTO for -background and -ddial. o Don't OR MODE_INTER when we get a diagnostic connection. o Allow up to 40 args per line (was 20). o "set ifaddr" only changes the interface in AUTO mode (with other modes, it happens after IPCP negotiation). o Sort command descriptions in the man page. o Support -dedicated mode where we just talk ppp forever (no login etc).
* Increase chat script sizes to 512brian1997-11-091-1/+3
| | | | Requested by: Michael Reifenberger <root@totum.plaut.de>
* Cosmetic:brian1997-10-261-6/+1
| | | | Move prototypes into the correct headers.
* Cosmetic (no functional changes):brian1997-10-261-45/+23
| | | | | | | | | | | | | | | o Add missing $Id$s o Move extern decls from .c -> .h files o Staticize o Remove #includes from .h files o style(9)ify includes o bcopy -> memcpy bzero -> memset bcmp -> memcmp index -> strchr rindex -> strrchr o Move timeout.h -> timer.h (making it consistent w/ timer.c) o Add -Wmissing-prototypes
* sleep => nointr_sleepbrian1997-10-241-5/+3
| | | | | | usleep => nointr_usleep (not just a #define) Already done by: ache
* Restore back non-interruptable sleep/usleep just redefine them to notache1997-10-231-1/+9
| | | | mix with standard library functions
* Cosmetic: Remove unused variables and build on OpenBSD.brian1997-09-101-2/+7
|
* Make the code format more in line with style(9).brian1997-08-251-8/+8
| | | | | Update loadalias to use the new libalias api. Update to version 1.1.
* o Fix uptime for direct connections.brian1997-06-231-1/+2
| | | | | | | | | | | | o Style police o Make hangup abort the current connection, not necessarily exiting (-auto/-ddial). o Trap HUP and INT during DoChat and abort the connection attempt. This means you can now type "dial" and change your mind with ^C, or HUP the process to stop it dialing. Slapped into doing it by: Chuck Robey <chuckr@glue.umd.edu>
* Add ppp.linkdown file to compliment ppp.linkup.brian1997-06-131-3/+3
| | | | | | | | Submitted by: Forgotten Passed on by: Terry Dwyer 61 8 9491 5161 <tdwyer@io.telstra.com.au> Also remove extraneous setuid(0) - it's only undone by the subsequent call to SelectSystem().
* Overhaul ppp:brian1997-06-091-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | o Use syslog o Remove references to stdout/stderr (incl perror()) o Introduce VarTerm - the interactive terminal or zero o Allow "set timeout" to affect current session o Change "set debug" to "set log" o Allow "set log [+|-]flag" o Make MSEXT and PASSWDAUTH stuff the default o Move all #ifdef DEBUG stuff into the code - this shouldn't be too much overhead. It's now controlled with "set log +debug" o Add "set log command, debug, tun, warn, error, alert" o Remove cdefs.h, and assume an ansi compiler. o Improve all diagnostic output o Don't trap SIGSEGV o SIGHUP now terminates again (log files are controlled by syslog) o Call CloseModem() when changing devices o Fix parsing of third arg of "delete" I think this fixes the "magic is same" problems that some people have been experiencing. The man page is being rewritten. It'll follow soon.
* Add a ttyXX.if file in /var/run that points tobrian1997-05-101-1/+3
| | | | | | | the tunX.pid file. Change the ppp.tunX.pid name to tunX.pid Requested by: Daniel O Callaghan <danny@panda.hilink.com.au>
* Log each ppp line to separate /var/log/ppp.tunX.log instead mixing ofache1997-05-041-2/+2
| | | | all lines into single /var/log/ppp.log
* Add a reconnect capability directing ppp to re-establishbrian1997-04-211-1/+3
| | | | | | | | | | | the connection after an unexpected loss of carrier: set reconnect timer ntries The man page warns against using this command when your timeout value is slightly more than the other sides :{} Suggested by: burton@bsampley.vip.best.com (Burton Sampley)
* Make the next number redial ability configurable. Thebrian1997-04-141-3/+4
| | | | | | | | | "set redial pause [times]" command becomes "set redial end-pause[.next-pause] [times]" and next-pause defaults to 3 seconds. This keeps things backwards compatable. Suggested by: ache
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* For /usr/sbin/ppp, you must choose between running ppp in the background orjkh1996-12-221-1/+6
| | | | | | | | | | | | | | | | | | | | | | connecting to a host immediately in the foreground. I would like to be able to run ppp from a script so that my script can be sure that it is connected to the 'net before it continues running: # Dial up the internet. ppp -background myprovider || exit 1 do-some-net-command # Hang up the modem. kill -HUP `cat /var/run/ppp.tun0.pid` Another problem is that the current ppp calls its process id file `/var/run/PPP.server', which may conflict if you have more than one IP tunnel interface available. Closes PR#1469 Submitted by: Gord Matzigkeit <gord@enci.ucalgary.ca>
* Make CRTSTS selection a runtime option. Closes PR#1392jkh1996-12-221-1/+2
| | | | Submitted by: Mike McGaughey <mmcg@heraclitus.cs.monash.edu.au>
* The infamous IP aliasing code for ppp, modified to work as a runtime optionjkh1996-12-121-1/+2
| | | | | | | (otherwise ppp's behavior remains unchanged) and documented by myself, Steve Sims, Nate Williams, Martin Renters and god-only-knows who else. :-) Submitted by: nate Obtained from: Charles Mott <cmott@srv.net>
* Added my 'ddial' patches to user-PPP. The new mode tries it's darndestnate1996-12-031-1/+2
| | | | | | | to keep the link up, so it re-dials whenever it detects the link go down. This is useful for 'dedicated' links who use PPP. It's been used for over a year w/out problems at different sites.
* 1. Add a settable redial timer and logging of the process id in a file.amurai1995-10-081-2/+2
| | | | | | | | | | | | | | | A settable redial timer helps to avoid the problem where both ends of a link want to dial at the same time and the line winds up busy for both ends. The process id is logged in /var/run/PPP.system where system is the name of the called system. When both ends of a link are running in demand dial mode, you need an easy way to get the pid of the ppp on the called end so it can be killed and re-started with -direct or pppd started to handle the incoming ppp session. 2. Add secret description for "set timeout" to man. Reviewed by: Atsushi Murai <amurai@spec.co.jp> Submitted by: John Capo <jc@irbs.com>
* 1. Do not log the password itself to ppp.log ( Mr. Rich Murphey )amurai1995-09-021-2/+2
| | | | | | | | | 2. Add ability to execute shell commands and suspend back into invoking shell (Mr. J Wunsch) Reviewed by: amurai@spec.co.jp Submitted by: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) Rich Murphey <rich@lamprey.utmb.edu>
* New user Process PPP based on iij-ppp0.94beta2.amurai1995-02-261-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Supporting SYNC SIO device (But need a device driver) - add "set speed sync" o Fixing bug for Predictor-1 function. o Add new parameter that re-sent interval for set timeout commands. o Improving RTT (Round Trip Time) and reducing processor time. - Previous Timer service was using polling, and now using SIGALRM ;-) - A 0.94beta2 will not work correctly.... -- Follows are additinal feature not including 0.94beta2 o Support Proxy ARP - add "enable/disable proxy" commands o Marging common routine in CHAP/PAP. o Enhancing LCP/IPCP log information. o Support local Authfication connection on port 300x and tty. - You can set up pair of your "hostname -s" and password in ppp.secret. if either ppp.secret file nor your hostname line don't exist, It will notify a message and working as same as previous version.(Backword compatibility) - If you did set up them, It's allow connection but nothing to do except help and passwd command. - add "passwd yourpasswd" commands o Support afilter - keep Alive filter that a packet can send/receiving according to ifilter/ofilter but doesn't count it as preventing idle timer expires. - Same syntax of other filters. o Fixing bugs reported by current user for previous one. Thanks !! Reviewed by: Atsushi Murai (amurai@spec.co.jp)
* (no commit message)amurai1995-01-311-0/+77
OpenPOWER on IntegriCloud