aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ppp/descriptor.h
Commit message (Collapse)AuthorAgeFilesLines
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326276
* To avoid namespace polution in NetBSD:Brian Somers2000-03-141-5/+5
| | | | | | | ``struct descriptor'' -> ``struct fdescriptor'' Notes: svn path=/head/; revision=58028
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50479
* When resending chap challenges, resend the same challengeBrian Somers1999-02-111-1/+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. Notes: svn path=/head/; revision=43888
* Decouple pap & chap output routines from the correspondingBrian Somers1999-02-061-1/+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 Notes: svn path=/head/; revision=43693
* o If we come out of select() with only write descriptors thatBrian Somers1998-06-241-2/+2
| | | | | | | | | | | | | | end up writing zero bytes, sleep for 1/10 of a second so that we don't end up using up too much cpu. This should only ever happen on systems that wrongly report a descriptor as writable despite the tty buffer being full. Discussed with: Jeff Evarts o Do an initial run-time check to see if select() alters the passed timeval. This knowledge isn't yet used, but will be soon. Notes: svn path=/head/; revision=37141
* o Move our prompt descriptor list outside of the bundle.Brian Somers1998-05-231-2/+1
| | | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=36314
* MFMP: Make ppp multilink capable.Brian Somers1998-05-211-1/+1
| | | | | | | See the file README.changes, and re-read the man page. Notes: svn path=/head/; revision=36285
* o Add the link name to modem diagnostics.Brian Somers1998-04-281-1/+2
| | | | | | | | | | | | | | | | | o Create struct mpserver as part of struct mp. mpserver creates a unix-domain socket based on the peers auth name and endpoint discriminator. If it already exists, ppp will ``pass the link'' over to the owner of the socket, joining it into the bundle of another ppp invocation, otherwise ppp waits for other invocations to pass it links through this socket. The final piece of code will be the code that flattens our datalink info and passes it down this channel (not yet implemented). Notes: svn path=/cvs2svn/branches/MP/; revision=35481
* o Move alias function pointers into loadalias.cBrian Somers1998-04-071-1/+3
| | | | | | | | | | | o Move Var*Version into command.c o Remove struct pppVars (and there was much rejoicing) ! o Forward-decl some structs in .h files to avoid include ordering requirements and remove a few more redundant #includes. Notes: svn path=/cvs2svn/branches/MP/; revision=35089
* Make struct bundle into a sort of `struct descriptor'.Brian Somers1998-03-201-2/+3
| | | | | | | | It does the fdsets/reads/writes for each of it's datalinks. Notes: svn path=/cvs2svn/branches/MP/; revision=34722
* o Remove the global CcpInfo. It's now part of the datalink.Brian Somers1998-02-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Struct bundle will have its own struct ccp in the future too. o The ``set stopped'' command now requires context and doesn't work on the IPCP FSM. o Check if it's time to break out of our top level loop before doing a select - otherwise, we'll select forever :-( o Remove `struct link'::ccp (a temporary hack). It turns out that IpStartOutput() calls link_Output() and link_Output() incorrectly calls StartOutput() (really modem_StartOutput) requiring the ccp knowledge so that it can call IpStartOutput()... The end result is that the whole IP output queue gets dumped into the modem output queue and a pile of physical writes are done prematurely. This makes the (original) code in main() actually work in that it would not bother selecting() on the tun descriptor when our modem queue length was 20 or greater. Instead, we now make that decision based on the overall queue length. This will need improvement later. Notes: svn path=/cvs2svn/branches/MP/; revision=33754
* Create struct datalink.Brian Somers1998-02-161-1/+2
| | | | | | | | | | | | | | | | | This is a type of physical link that can chat and talk LCP & CCP. A bundle contains a list of these (only one in the list for the moment). The datalink is a type of descriptor, and dials, enters LCP (& does CCP), kicks the bundle when its FSMs do something interesting and does the hangup chat script on the way down. It also handles redials and reconnects. There are lots of loose ends, and probably lots of bugs, but the data structures are getting there ! Notes: svn path=/cvs2svn/branches/MP/; revision=33415
* Update to version 2.0-betaBrian Somers1998-02-131-1/+2
| | | | | | | | | | | | | | | | | | | Allow for NULL fd_sets in descriptor_UpdateSet() Reimplement the entire chat module, creating `struct chat' - a `type' of struct descriptor. Remove CARRIER logging. CONNECT logging now only logs "CONNECT" lines. CHAT logging masks it with an entire log of the conversation. Modem dialing is now asynchronous, including pauses and timeouts :-) The hooks in DoLoop() in main.c are *very* messy ! I'll have to rewrite DoLoop fairly soon, so I don't care too much for the moment. This code is pretty raw. Notes: svn path=/cvs2svn/branches/MP/; revision=33305
* Move the terminal/diagnostic socket stuff out of main.cBrian Somers1998-02-101-2/+3
| | | | | | | | and into the new `prompt.c'. struct prompt is (of course) a `sort' of descriptor. Notes: svn path=/cvs2svn/branches/MP/; revision=33209
* Pass the fdset to descriptor_Read & descriptor_WriteBrian Somers1998-02-101-5/+5
| | | | | | | allowing support for the use of multiple file descriptors. Notes: svn path=/cvs2svn/branches/MP/; revision=33207
* Make the server descriptor into a `sort' of struct descriptor.Brian Somers1998-02-091-1/+2
| | | | Notes: svn path=/cvs2svn/branches/MP/; revision=33195
* o Introduce struct descriptor.Brian Somers1998-02-091-0/+44
This will ultimately be a member of a list of descriptors and their handler functions on which we need to select() in the main loop. o Make struct physical into a `sort' of struct descriptor. Notes: svn path=/cvs2svn/branches/MP/; revision=33194