aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ppp/mbuf.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
* Make ppp WARNS=5 cleanBrian Somers2004-09-051-5/+5
| | | | Notes: svn path=/head/; revision=134789
* Re-implement LQM, this time according to the rfc.Brian Somers2004-06-301-0/+1
| | | | | | | | PR: 11293 MFC after: 4 weeks Notes: svn path=/head/; revision=131327
* o Add ipv6 support, abstracting most NCP addresses into opaqueBrian Somers2001-08-141-37/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | structures (well, they're treated as opaque). It's now possible to manage IPv6 interface addresses and routing table entries and to filter IPV6 traffic whether encapsulated or not. IPV6CP support is crude for now, and hasn't been tested against any other implementations. RADIUS and IPv6 are independent of eachother for now. ppp.linkup/ppp.linkdown aren't currently used by IPV6CP o Understand all protocols(5) in filter rules rather than only a select few. o Allow a mask specification for the ``delete'' command. It's now possible to specifically delete one of two conflicting routes. o When creating and deleting proxy arp entries, do it for all IPv4 interface addresses rather than doing it just for the ``current'' peer address. o When iface-alias isn't in effect, don't blow away manually (via ``iface add'') added interface addresses. o When listening on a tcp server (diagnostic) socket, bind so that a tcp46 socket is created -- allowing both IPv4 and IPv6 connections. o When displaying ICMP traffic, don't display the icmp type twice. When display traffic, display at least some information about unrecognised traffic. o Bump version Inspired after filtering work by: Makoto MATSUSHITA <matusita@jp.FreeBSD.org> Notes: svn path=/head/; revision=81634
* Convert IIJ copyrights to BSD copyrights.Brian Somers2001-06-131-16/+24
| | | | | | | Approved by: Toshiharu OHNO <tohno@sirius.ocn.ne.jp> Notes: svn path=/head/; revision=78189
* Increase M_MAXBUF so that it's greater than HDLCSIZEBrian Somers2000-11-111-1/+1
| | | | Notes: svn path=/head/; revision=68596
* Ensure that there's a bit of extra space in our buffer when it'sBrian Somers2000-01-031-0/+1
| | | | | | | | | | passed to libalias. If there's not enough space, things like ftp PORT commands start failing.... Reported by: Gianmarco Giovannelli <gmarco@giovannelli.it> Notes: svn path=/head/; revision=55353
* Increase M_MAXLEN from 2048 - sizeof struct mbuf toBrian Somers1999-12-301-1/+1
| | | | | | | | | | | 4096 - sizeof struct mbuf, and set MAX_MRU and MAX_MTU back to 2048. 2048 is big enough as an MTU/MRU, but we need to be able to allocate larger mbufs after reassembling IP fragments. Notes: svn path=/head/; revision=55272
* Implement mbuf allocation internally by maintaining 8 buckets ofBrian Somers1999-12-201-0/+2
| | | | | | | | | | different sized mbufs, and mallocing them in chunks of 20 mbufs at a time. This improves back-to-back throughput by between 7 and 8% Notes: svn path=/head/; revision=54913
* Cosmetic: Make struct mbuf more like kernel mbufs.Brian Somers1999-12-201-19/+21
| | | | Notes: svn path=/head/; revision=54912
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50479
* o Add the -foreground switch. This switch behaves like -background exceptBrian Somers1999-08-191-3/+3
| | | | | | | | | | | | that ppp stays in the foreground. o Add the -quiet switch to quieten ppps startup o Add the -nat flag and discourage the use of the -alias flag. Both do the same thing. o Correct some nat usage strings. o Change the internal ``alias'' command to ``nat''. Notes: svn path=/head/; revision=50059
* o Alter the mbuf type as it's processed by different layers.Brian Somers1999-06-021-13/+42
| | | | | | | | | | | o Show more information about missing MP fragments in ``show mp''. o Do away with mbuf_Log(). It was showing mbuf stats twice on receipt of LCP/CCP/IPCP packets.... ???!!? o Pre-allocate a bit extra when creating LQR packets to avoid having to allocate another mbuf in mbuf_Prepend(). Notes: svn path=/head/; revision=47695
* Deal with the fact that as we now mbuf_Read the fsmBrian Somers1999-05-091-3/+6
| | | | | | | | | | | | header in fsm_Input() we often end up with a NULL mbuf. Deal with a possible NULL mbuf being passed into mbuf_Prepend(). Adjust some spacing to make things more consistent. Notes: svn path=/head/; revision=46828
* o Redesign the layering mechanism and make the aliasing code part ofBrian Somers1999-05-081-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Ensure that the thing we're casting to struct ipBrian Somers1999-03-291-1/+2
| | | | | | | is aligned for non-i386 architectures. Notes: svn path=/head/; revision=45103
* Consolidate the two malloc()s that are done when allocatingBrian Somers1998-08-211-6/+7
| | | | | | | an mbuf. Notes: svn path=/head/; revision=38472
* o Support callback types NONE, E.164, AUTH and CBCP.Brian Somers1998-08-071-9/+10
| | | | | | | | | | | | | | | | | (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. Notes: svn path=/head/; revision=38174
* MFMP: Make ppp multilink capable.Brian Somers1998-05-211-13/+17
|\ | | | | | | | | | | | | See the file README.changes, and re-read the man page. Notes: svn path=/head/; revision=36285
| * Cosmetic: Make our external function names consistent.Brian Somers1998-05-011-11/+11
| | | | | | | | Notes: svn path=/cvs2svn/branches/MP/; revision=35605
| * Print mbuf type names in `show mem'.Brian Somers1998-04-071-4/+3
| | | | | | | | Notes: svn path=/cvs2svn/branches/MP/; revision=35090
| * 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
| * o Move struct lcp and struct ccp into struct link.Brian Somers1998-04-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Create `struct link' - the logical link from whichBrian Somers1998-01-301-2/+4
| | | | | | | | | | | | | | | | `struct physical' (and the future `struct logical') are derived. Notes: svn path=/cvs2svn/branches/MP/; revision=32903
| * This commit was manufactured by cvs2svn to create branch 'MP'.cvs2svn1998-01-291-0/+60
| | | | Notes: svn path=/cvs2svn/branches/MP/; revision=32861
* Remove unused #includes.Brian Somers1998-01-211-3/+1
| | | | | | | | | Make various bits static. Remove unused variables. Submitted by: eivind Notes: svn path=/head/; revision=32663
* Abstract the CCP layer a level.Brian Somers1997-12-031-2/+1
| | | | | | | Add DEFLATE support. Notes: svn path=/head/; revision=31514
* Fix prototypes.Brian Somers1997-11-221-2/+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). Notes: svn path=/head/; revision=31343
* Cosmetic:Brian Somers1997-10-261-3/+1
| | | | | | | Move prototypes into the correct headers. Notes: svn path=/head/; revision=30733
* Cosmetic (no functional changes):Brian Somers1997-10-261-17/+12
| | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=30715
* Make the code format more in line with style(9).Brian Somers1997-08-251-15/+16
| | | | | | | | Update loadalias to use the new libalias api. Update to version 1.1. Notes: svn path=/head/; revision=28679
* Overhaul ppp:Brian Somers1997-06-091-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=26516
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=22997
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-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. Notes: svn path=/head/; revision=21673
* New user Process PPP based on iij-ppp0.94beta2.Atsushi Murai1995-02-261-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=6735
* (no commit message)Atsushi Murai1995-01-311-0/+67
Notes: svn path=/cvs2svn/branches/R093/; revision=6059