aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ppp/throughput.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-121-1/+1
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* 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
* Support radius accounting, and add a packet count to throughputBrian Somers2000-08-281-0/+2
| | | | | | | | | | | | statistics as a side effect. Submitted by: Marcin Cieslak <saper@system.pl> with some tweaks to RAD_ACCT_SESSION_ID and RAD_ACCT_MULTI_SESSION_ID generation by me. Notes: svn path=/head/; revision=65178
* Maintain input and output throughput averages and choose the highestBrian Somers2000-08-151-2/+4
| | | | | | | | | | | | | | | | | of the two when calculating the MP throughput average for the ``set autoload'' implementation. This makes more sense as all links I know of are full-duplex. This also means that people may need to adjust their autoload settings as 100% bandwidth is now the theoretical maximum rather than 200% (but of course, halfing the current settings is probably not the correct answer either!). This involves a ppp version bump as we need to pass an extra throughput array through the MP local domain socket. Notes: svn path=/head/; revision=64670
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50479
* o Obsolete the undocumented ``set weight'' command.Brian Somers1999-08-051-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | 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). Notes: svn path=/head/; revision=49434
* o Redesign the layering mechanism and make the aliasing code part ofBrian Somers1999-05-081-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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''. Notes: svn path=/head/; revision=46686
* Add the ``clear'' function.Brian Somers1998-06-121-1/+8
| | | | | | | Mostly submitted by: "Stephane E. Potvin" <sepotvin@videotron.ca> Notes: svn path=/head/; revision=36934
* Show the time that we reached maximum throughput.Brian Somers1998-06-091-1/+2
| | | | | | | Submitted by: "Stephane E. Potvin" <sepotvin@videotron.ca> Notes: svn path=/head/; revision=36819
* MFMP: Make ppp multilink capable.Brian Somers1998-05-211-3/+4
|\ | | | | | | | | | | | | See the file README.changes, and re-read the man page. Notes: svn path=/head/; revision=36285
| * o Move the accept/deny/disable/enable globals either to theBrian Somers1998-04-161-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bundle (non-negotiated vars) or to their respective IPCP, LCP or CCP. o Enable rolling throughput statistics by default. o Remove the `display' command. These values now appear in `show bundle', `show ipcp', `show ccp' and `show lcp'. o Initialise auth name & key at bundle create time (oops). o Rename pppd-deflate (the id-24 hack) to deflate24. o Don't send both a REJ and a NAK to an IPCP or LCP REQ. Favour the REJ (already done at the CCP level). o Recurse in datalink_UpdateSet() when we change state, otherwise we end up setting no descriptors and getting jammed in the imminent select() instead of doing the dial/login/hangup. o Display our CHAP encryption method despite being built with DES. o Display VJ as not negotiated in ``show ipcp'' when necessary. Notes: svn path=/cvs2svn/branches/MP/; revision=35219
| * Deglobalise `struct prompt':Brian Somers1998-04-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Our diagnostic socket has its password set in the `set socket' line only (not in ppp.secret). o Passwords are per server socket (*VarAuthKey are gone) o Authority is per prompt (VarLocalAuth is gone). o Local logging is per prompt. o Add a `show who' command to see who's connected. No identd routine - just a `where the connection came from' display. o SIGUSR1 is disabled for now - we have no way of choosing a password for the socket created :-( Prompts are attached as a list of `struct descriptor's in struct bundle, and serviced under the bundles descriptor service routines. Ultimately, everything should be done like this. Cosmetic: o alphabeticalise SRCS in Makefile. o Add a few comments in command.h TODO: Start checking that we don't overflow the descriptor sets in select() now that we can have any number of descriptors. Notes: svn path=/cvs2svn/branches/MP/; revision=35016
| * o Move struct lcp and struct ccp into struct link.Brian Somers1998-04-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Remove bundle2lcp(), bundle2ccp() and bundle2link(). They're too resource-hungry and we have `owner pointers' to do their job. o Make our FSM understand LCPs that are always ST_OPENED (with a minimum code that != 1). o Send FSM code rejects for invalid codes. o Make our bundle fsm_parent deal with multiple links. o Make timer diagnostics pretty and allow access via ~t in `term' mode (not just when logging debug) and `show timers'. Only show timers every second in debug mode, otherwise we get too many diagnostics to be useful (we probably still do). Also, don't restrict ~m in term mode to depend on debug logging. o Rationalise our bundles' phases. o Create struct mp (multilink protocol). This is both an NCP and a type of struct link. It feeds off other NCPs for output, passing fragmented packets into the queues of available datalinks. It also gets PROTO_MP input, reassembles the fragments into ppp frames, and passes them back to the HDLC layer that the fragments were passed from. ** It's not yet possible to enter multilink mode :-( ** o Add `set weight' (requires context) for deciding on a links weighting in multilink mode. Weighting is simplistic (and probably badly implemented) for now. o Remove the function pointers in struct link. They ended up only applying to physical links. o Configure our tun device with an MTU equal to the MRU from struct mp's LCP and a speed equal to the sum of our link speeds. o `show {lcp,ccp,proto}' and `set deflate' now have optional context and use ChooseLink() to decide on which `struct link' to use. This allows behaviour as before when in non-multilink mode, and allows access to the MP logical link in multilink mode. o Ignore reconnect and redial values when in -direct mode and when cleaning up. Always redial when in -ddial or -dedicated mode (unless cleaning up). o Tell our links to `staydown' when we close them due to a signal. o Remove remaining `#ifdef SIGALRM's (ppp doesn't function without alarms). o Don't bother strdup()ing our physical link name. o Various other cosmetic changes. Notes: svn path=/cvs2svn/branches/MP/; revision=35009
| * Move the terminal/diagnostic socket stuff out of main.cBrian Somers1998-02-101-2/+2
| | | | | | | | | | | | | | | | and into the new `prompt.c'. struct prompt is (of course) a `sort' of descriptor. Notes: svn path=/cvs2svn/branches/MP/; revision=33209
| * This commit was manufactured by cvs2svn to create branch 'MP'.cvs2svn1998-01-291-0/+48
| | | | Notes: svn path=/cvs2svn/branches/MP/; revision=32861
* Add (BSD) copyright headers.Brian Somers1997-12-211-2/+26
| | | | Notes: svn path=/head/; revision=31921
* Add throughput logging (disabled by default).Brian Somers1997-11-181-0/+24
Use "enable throughput" to see modem & IPCP throughput. Removed an extraneous prompt() Notes: svn path=/head/; revision=31272