summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/datalink.h
Commit message (Collapse)AuthorAgeFilesLines
* Add a bunch of malloc() return checksbrian2004-10-111-1/+0
| | | | | PR: 71592 Submitted by: Dan Lukes <dan@obluda.cz> with further changes
* Make ppp WARNS=5 cleanbrian2004-09-051-1/+1
|
* Merge the NETGRAPH branch into HEAD. tty devices now use netgraph's linebrian2002-03-301-1/+2
| | | | | | | | discipline to do the async escaping, but no other benefits are available yet. Change ``ifdef HAVE_DES'' to ``ifndef NODES'' for consistency. Make the Makefile a little more sane WRT RELEASE_CRUNCH.
* To avoid namespace polution in NetBSD:brian2000-03-141-1/+1
| | | | ``struct descriptor'' -> ``struct fdescriptor''
* Rewrite the link descriptor transfer code in MP mode.brian1999-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, ppp attempted to bind() to a local domain tcp socket based on the peer authname & enddisc. If it succeeded, it listen()ed and became MP server. If it failed, it connect()ed and became MP client. The server then select()ed on the descriptor, accept()ed it and wrote its pid to it then read the link data & link file descriptor, and finally sent an ack (``!''). The client would read() the server pid, transfer the link lock to that pid, send the link data & descriptor and read the ack. It would then close the descriptor and clean up. There was a race between the bind() and listen() where someone could attempt to connect() and fail. This change removes the race. Now ppp makes the RCVBUF big enough on a socket descriptor and attempts to bind() to a local domain *udp* socket (same name as before). If it succeeds, it becomes MP server. If it fails, it sets the SNDBUF and connect()s, becoming MP client. The server select()s on the descriptor and recvmsg()s the message, insisting on at least two descriptors (plus the link data). It uses the second descriptor to write() its pid then read()s an ack (``!''). The client creates a socketpair() and sendmsg()s the link data, link descriptor and one of the socketpair descriptors. It then read()s the server pid from the other socketpair descriptor, transfers any locks and write()s an ack. Now, there can be no race, and a connect() failure indicates a stale socket file. This also fixes MP ppp over ethernet, where the struct msghdr was being misconstructed when transferring the control socket descriptor. Also, if we fail to send the link, don't hang around in a ``session owner'' state, just do the setsid() and fork() if it's required to disown a tty. UDP idea suggested by: Chris Bennet from Mindspring at FreeBSDCon
* Support PPPoEbrian1999-11-061-2/+3
| | | | | Help (lots) from: julian, archie Facilities from: ahebert@pubnix.net
* Introduce ``set logout''; another chat script. This is in preparationbrian1999-10-251-10/+12
| | | | for the abstraction of ``set dial'' and ``set hangup''.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Add ISDN support via isdnd & i4b. This requires versionbrian1999-08-061-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | 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 !) :-]
* Extend the ``set redial'' command to allow incrementalbrian1999-03-041-5/+11
| | | | redial timeouts.
* Decouple pap & chap output routines from the correspondingbrian1999-02-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | input routines and take advantage of the new init/continue interface in libradius. This allows a timely response on other links in an MP setup while RADIUS requests are in progress as well as the ability to handle other data from the peer in parallel. It should also make the future addition of PAM support trivial. While I'm in there, validate pap & chap header IDs if ``idcheck'' is enabled (the default) for other FSM packet types. NOTE: This involved integrating the generation of chap challenges and the validation of chap responses (and commenting what's going on in those routines). I currently have no way of testing ppps ability to respond to M$Chap CHALLENGEs correctly, so if someone could do the honours, it'd be much appreciated (it *looks* ok!). Sponsored by: Internet Business Solutions Ltd., Switzerland
* o Support callback types NONE, E.164, AUTH and CBCP.brian1998-08-071-3/+11
| | | | | | | | | | | | | | (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.
* Make `close lcp' just close the LCP layer and not hangup. This isbrian1998-06-151-2/+9
| | | | | | useful for slirp users that wish to get their shell back after the ppp session. `close' with no args still hangs up as expected. Required by: jmz
* o Don't forget to close our transfer socket if we cannotbrian1998-05-281-2/+2
| | | | | | | generate the data to transfer. o Transfer uucp lock ownership for the transferred device. o Don't assume we know the correct values of dev_is_modem and mbits after the transfer.
* MFMP: Make ppp multilink capable.brian1998-05-211-0/+130
See the file README.changes, and re-read the man page.
OpenPOWER on IntegriCloud