summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/mbuf.c
Commit message (Collapse)AuthorAgeFilesLines
* Make ppp WARNS=5 cleanbrian2004-09-051-6/+6
|
* Add a missing memcpy (*blush*!)brian2004-04-171-4/+8
| | | | | Suggested by: James P Scully <scully@CS.Arizona.EDU>, Perianayagam Somasundaram <somu@CS.Arizona.EDU> MFC after: 10 days
* Include the correct file (stdarg.h) and use va_list rather than _BSD_VA_LIST_brian2002-08-271-0/+1
| | | | Suggested by: mike
* Remove whitespace at the end of lines.brian2002-06-151-3/+3
|
* o Add ipv6 support, abstracting most NCP addresses into opaquebrian2001-08-141-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Convert IIJ copyrights to BSD copyrights.brian2001-06-131-17/+25
| | | | Approved by: Toshiharu OHNO <tohno@sirius.ocn.ne.jp>
* staticise mbuftype()brian2000-10-301-1/+1
|
* Report the type of mbuf that couldn't be allocated beforebrian2000-10-271-13/+21
| | | | aborting ppp.
* Correct a bad bug in m_prepend()brian2000-05-071-3/+5
| | | | Submitted by: luoqi
* Fix some printf-style argument bugsbrian2000-03-141-3/+3
|
* Ensure that there's a bit of extra space in our buffer when it'sbrian2000-01-031-1/+18
| | | | | | | passed to libalias. If there's not enough space, things like ftp PORT commands start failing.... Reported by: Gianmarco Giovannelli <gmarco@giovannelli.it>
* Add a bunch of `const's and fix a typo.brian1999-12-271-1/+1
| | | | Submitted by: Rich Neswold <rneswold@MCS.Net>
* Implement mbuf allocation internally by maintaining 8 buckets ofbrian1999-12-201-13/+73
| | | | | | | 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%
* Cosmetic: Make struct mbuf more like kernel mbufs.brian1999-12-201-93/+109
|
* Learn to do pointer arithmatic (doh!)brian1999-12-181-1/+1
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Aligh mbufs to sizeof(long), not 4brian1999-08-261-2/+2
|
* o Add the -foreground switch. This switch behaves like -background exceptbrian1999-08-191-2/+2
| | | | | | | | | 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''.
* Change printf formats %q[du] -> %ll[du]brian1999-08-091-2/+2
|
* o Alter the mbuf type as it's processed by different layers.brian1999-06-021-22/+31
| | | | | | | | 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().
* Deal with the fact that as we now mbuf_Read the fsmbrian1999-05-091-25/+29
| | | | | | | | | 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.
* o Redesign the layering mechanism and make the aliasing code part ofbrian1999-05-081-13/+92
| | | | | | | | | | | | | | | | | | | | | 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''.
* Ensure that the thing we're casting to struct ipbrian1999-03-291-6/+32
| | | | is aligned for non-i386 architectures.
* Decouple pap & chap output routines from the correspondingbrian1999-02-061-7/+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
* If we've got a full output buffer queue and cannot sendbrian1998-08-251-1/+2
| | | | | | | | anything for two mintues (see ``set choked'' and ``show bundle''), nuke the ip, mp and link level buffer queues. This should fix problems where ``ppp -auto'' seems to stop responding after failing to connect to the peer a few times.
* Consolidate the two malloc()s that are done when allocatingbrian1998-08-211-10/+2
| | | | an mbuf.
* Make ``show mem'' display the number of packets allocated as well as thebrian1998-08-211-11/+15
| | | | number of octets.
* o Support callback types NONE, E.164, AUTH and CBCP.brian1998-08-071-5/+5
| | | | | | | | | | | | | | (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.
* o Fix remaining sizeof problems for 64 bit machines.brian1998-06-271-2/+3
| | | | | | | | | | o Allow ``set ....'' when we have multiple links but aren't in multilink mode. o Do a TLS when we receive a ``Open'' event in ``Closed'' state, despite the rfc state transition table. This is clearly an error in the RFC as TLS cannot have yet been called (without TLF) in the ``Closed'' state. I've posted a message to comp.protocols.ppp for confirmation.
* Zero mbuf::pnext when Dequeue()ing.brian1998-06-161-1/+2
|
* o Don't dump core with ~m in term mode.brian1998-06-161-2/+1
| | | | | | | o Always put a '\r' before a '\n' at the end of a line in prompt_vPrintf() in term mode, and make prompt_Printf() use prompt_vPrintf(). o Fix ~? message.
* Fix a rather nasty use of `static'. This caused a SEGVbrian1998-06-151-1/+2
| | | | | when running ``link * load label'' as we ended up recursing back into command_Interpret after nuking our command arg list.
* MFMP: Make ppp multilink capable.brian1998-05-211-34/+71
| | | | See the file README.changes, and re-read the man page.
* Remove unused #includes.brian1998-01-211-3/+2
| | | | | | Make various bits static. Remove unused variables. Submitted by: eivind
* Initialize mbuf::pnext.brian1997-12-281-1/+2
| | | | Complain to LogERROR if we have internal inconsistency (not LogDEBUG).
* Fix prototypes.brian1997-11-221-3/+3
| | | | | | | | | | | | | | 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).
* Cosmetic (no functional changes):brian1997-10-261-6/+13
| | | | | | | | | | | | | | | 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
* Make the code format more in line with style(9).brian1997-08-251-27/+18
| | | | | Update loadalias to use the new libalias api. Update to version 1.1.
* Add "set server" to control the server socket.brian1997-06-251-1/+4
| | | | | | | | | | Catch SIGUSR1 to re-init listening socket. Document signal behaviour. Add missing '\n's to LogPrintf(LogWARN,...) Main() returns int not void. AF_LOCAL ideal suggested a long time ago by: joerg
* Overhaul ppp:brian1997-06-091-44/+22
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Tidy up the code - bounds checking, returnbrian1997-05-101-1/+11
| | | | | | value checking etc. Submitted by: eivind
* 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.
* Remove trailing whitespace.rgrimes1995-05-301-3/+3
|
* New user Process PPP based on iij-ppp0.94beta2.amurai1995-02-261-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* (no commit message)amurai1995-01-311-0/+187
OpenPOWER on IntegriCloud