summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/lcp.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Add ``ipcp'' as an optional argument to ``open'', and makebrian1998-06-251-1/+2
| | | | | | | | | open capable of re-negotiatiating the various layers. It is now possible to change various link options and then re-open the relevant layer, making the changes effective - for example, switching off VJ compression or starting ECHO LQRs on-the-fly.
* Fix a rather nasty use of `static'. This caused a SEGVbrian1998-06-151-2/+2
| | | | | when running ``link * load label'' as we ended up recursing back into command_Interpret after nuking our command arg list.
* Some documentation corrections & typo fixes....brian1998-05-291-2/+2
|
* MFMP: Make ppp multilink capable.brian1998-05-211-467/+522
| | | | See the file README.changes, and re-read the man page.
* Merge from MP branch:brian1998-02-041-2/+2
| | | | Correct magic number format string
* Remove unused #includes.brian1998-01-211-5/+3
| | | | | | Make various bits static. Remove unused variables. Submitted by: eivind
* Allow an optional delay when specifying "set openmode active".brian1998-01-201-6/+10
| | | | | | | | | | | | | | | | The delay defaults to 1 sec (as it always has) unless we've done a ~p in interactive mode or we've actually detected a HDLC frame. This is now cleanly implemented (via async timers) so that it is possible for LCP to come up despite the delay if an LCP REQ is received. This will hopefully solve situations with slow servers or slirp scenarios (where ECHO is left on the port for a second or so before the peer enters packet mode). Also, ~p in interactive mode no longer changes the value of the default openmode delay and -dedicated mode enters packet mode in the right state according to the value of openmode.
* Lose <net/if_var.h> !brian1998-01-111-4/+1
| | | | This'll require a `make installworld'.
* Make things work when sizeof(long) != 32 (hopefully)brian1998-01-111-28/+31
|
* Cosmetic (style):brian1997-12-241-5/+5
| | | | | | | sizeof(var) -> sizeof var sizeof type -> sizeof(type) Suggested by: J Wunsch <j@uriah.heep.sax.de>
* Fix PAP, CHAP & LQR req (I broke the byte ordering whenbrian1997-12-071-12/+51
| | | | | | | | I did the deflate re-org). Make PAP & CHAP negotiation prettier in the log file. If both PAP & CHAP are `enabled' and the peer NAKs CHAP suggesting PAP, be friendly and REQ PAP the next time. This is in line with the rfc.
* Abstract the CCP layer a level.brian1997-12-031-75/+153
| | | | Add DEFLATE support.
* Fix prototypes.brian1997-11-221-10/+12
| | | | | | | | | | | | | | 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 throughput logging (disabled by default).brian1997-11-181-2/+1
| | | | | Use "enable throughput" to see modem & IPCP throughput. Removed an extraneous prompt()
* Abstract data read from and written to the tun device,brian1997-11-161-2/+9
| | | | | | | | | | | | | | allowing for a possible header on the front of all packets. In OpenBSD, there's a structure containing the address family here. If we're building under OpenBSD, set up the ``flags'' part of struct tuninfo (not there under FreeBSD) so that we config the interface as POINTOPOINT. Prefix prototypes with ``extern'' in os.c for consistency. These changes are cosmetic under FreeBSD, but allow ppp to build & work under OpenBSD (bar the srandomdev() stuff, the inclusing of <net/if_var.h> and some Makefile symantecs).
* Update the cftypes arrays according to rfc1700.brian1997-11-141-16/+41
| | | | Log IPCP reqests as IPCP.
* Fix typo that causes CHAP RESPONSEs to *always*brian1997-11-111-2/+2
| | | | be damned M$ responses if you've got DES.
* Don't pass global vars as args.brian1997-11-081-13/+13
| | | | Remove local/global conflicts.
* o Bump version to 1.3 to reflect major changesbrian1997-10-291-11/+7
| | | | | | | | | | | | o Report modem connect time properly o Report bytes in/out over physical media o Fix phases (TERMINATE is *higher than* DEAD) o Do a LayerFinish from LcpDown o Bring down IPCP & CCP when we enter PHASE_TERMINATE o Give a new prompt when we go to PHASE_DEAD o Stop the modem timer properly when idle o Treat sig 15 like an exiting carrier loss o Log (DEBUG) offline & online transitions
* Cosmetic:brian1997-10-261-1/+2
| | | | Move prototypes into the correct headers.
* Cosmetic (no functional changes):brian1997-10-261-81/+43
| | | | | | | | | | | | | | | 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
* Initialise LCP, IPCP and CCP as soon as LCP is down.brian1997-10-151-1/+4
| | | | | | | | Without this, in -auto mode, we stay in ST_STOPPING and never check our dial filters to see if it's time to bring the line up again. This may make "set stopped" redundant.
* Change things around a bit when bringing down the layers.brian1997-10-051-3/+12
| | | | | | | | | | | | | | | | o LcpLayerDown() no longer does a NewPhase(PHASE_TERMINATE). Instead, it's done in LcpLayerFinish(). LayerFinish() gets called by the FSM after the LCP FSM goes through the Stopping and Stopped states. o -direct and -background mode exit at PHASE_TERMINATE, not PHASE_DEAD. The result is that LCP, CCP & IPCP are brought down cleanly on both sides of the link (not just our side). Killing ppp rather than just closing it still makes it get out after the LCP SendTerminateReq(). I'll have a look at that soon. We're probably not actually sending the REQ :-(
* If "set mtu" is used, *and* the mtu is less than thebrian1997-09-291-4/+7
| | | | | | value requested by the peer, NAK using this value rather than silently just changing the interface mtu.
* Don't depend on time.h including sys/types.hbrian1997-09-271-1/+2
|
* Allow Microsoft CHAP authentication.brian1997-09-251-3/+15
| | | | | This is a combination of MD4 & DES. Submitted by: Gabor Kincses <gabor@acm.org>
* Undo botched commit (local changes got in)brian1997-09-231-4/+3
|
* Don't allow accept/deny when it's not appropriate.brian1997-09-221-3/+4
| | | | | Log PAP/CHAP users in utmp & wtmp, allowing it to be avoided with "disable utmp"
* Don't pause for one second before starting LCPbrian1997-09-221-4/+12
| | | | | | | | | | | negotiation. Instead, incrementally pause after receiving LCPs with the same magic. We can now suffer a server that waits more than 1 second before responding. Pauses greater than a second get hopelessly confusing as when the server eventually starts, it sees a flood of Config Requests followed by config NAKs and changes of magic. This causes the server to change its magic over and over.....
* Sleep for a second before sending the first LCPbrian1997-09-211-1/+3
| | | | | | | config request. This stops us from squirting stuff down a line that still has ECHO turned on because the peer hasn't had a chance to start yet. Lead to the cause by: Greg Lehey <grog@lemis.com>
* Bring CCP and IPCP layers down properly when LCPbrian1997-09-031-2/+2
| | | | | comes down. Give a count of bytes sent/received in IPCP log.
* Allow the transition from an idle timeout valuebrian1997-09-031-4/+4
| | | | | | of zero (no timeout) while IPCP is up. Move some prototypes into .h files and re-order some includes.
* Cosmetic: Make LogPrintf() calls consistent.brian1997-08-311-2/+2
|
* Make the code format more in line with style(9).brian1997-08-251-105/+105
| | | | | Update loadalias to use the new libalias api. Update to version 1.1.
* Expand the "set stopped" command so that it canbrian1997-08-201-2/+3
| | | | | | | | idependently time out any of the FSMs. Split LCP logging into LCP, IPCP and CCP logging, and make room in "struct fsm" for the log level that the state machine should use.
* Remove extraneous prototypes.brian1997-08-011-3/+1
|
* Remove srandomdev fallback codeache1997-06-141-3/+2
|
* Overhaul ppp:brian1997-06-091-61/+56
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Remove initial startup printf's in -direct mode.brian1997-06-011-7/+11
| | | | Make "same magic" error send a NAK (as per rfc).
* De-couple ppp from libalias. If libalias isn't there, thebrian1997-05-261-1/+2
| | | | | | | | | alias commands simply won't work. Only root may specify the location of the alias lib (otherwise, it's hard-coded). Make logprintf silently fail if LogOpen hasn't been called. Suggested by: eivind
* Fix the reconnect option, and add an explanation to vars.hbrian1997-05-241-2/+2
|
* Mega update to sort out bad implementationsbrian1997-05-191-11/+4
| | | | | | | | | | | | | | | | | | of reconnect & -background. o Fix reconnect anomolies. o Make reconnect apply to failed LQR hangups (& mention in man page). o Make reconnect effective in -background mode. o Listen on socket in -background mode. o Try all phone numbers in -background mode. o Insist on system arg in -background mode. o Make a control-connection close command exit in -background mode. o Output status message to stdout on exit of parent in -background mode. o Don't notify parent of success too soon. o Describe termination EX_* code. o Miscelaneous diagnostic corrections. o Remove redundant connect_time from modem.c. o Don't repeatedly DownConnection().
* Cosmetiqueache1997-05-111-3/+3
|
* Print out reject masks on "show lcp"ache1997-05-111-5/+9
|
* Use random() for GenerateMagic()ache1997-05-111-9/+9
|
* Tidy up the code - bounds checking, returnbrian1997-05-101-4/+4
| | | | | | value checking etc. Submitted by: eivind
* Make ppp exit on loss of carrier in -background mode.brian1997-05-051-2/+2
| | | | Submitted by: Jim Carroll <jim@carroll.com>
* Closes pr 2711brian1997-03-131-1/+10
| | | | | | Fix -background option. Parent returns after the line is established (or not established). Definitely a candidate for 2.2
* 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.
OpenPOWER on IntegriCloud