summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/ip.c
Commit message (Collapse)AuthorAgeFilesLines
* Add ISDN support via isdnd & i4b. This requires versionbrian1999-08-061-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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 !) :-]
* #ifdef IPPROTO_OSPFIGP before expecting it to be defined.brian1999-08-021-1/+5
| | | | This unbreaks OpenBSD.
* Filter ospf and igmp separately.brian1999-08-021-1/+18
| | | | Kind-of submitted by: phk
* o Overhaul filtering, adding facilities to jump over rules and tobrian1999-07-271-131/+182
| | | | | | | | | negate the sense of rules. o Remove the redundant (and undocumented) ``host'' and ``port'' words (README.changes updated). o Don't permit (and ignore) garbage instead of the protocol. Mostly submitted by: Peter Jeremy <jeremyp@gsmx07.alcatel.com.au>
* Support `igmp' filters.brian1999-06-231-2/+6
| | | | Mostly submitted by: Timo Geusch <freebsd@sleepycat.ukpeople.net>
* o Alter the mbuf type as it's processed by different layers.brian1999-06-021-2/+3
| | | | | | | | 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().
* Remember if MYADDR or HISADDR is used in a filter add tweak allbrian1999-05-311-6/+6
| | | | filters any time either value changes.
* Ensure that we're not going to overflow our ``struct tun''brian1999-05-141-3/+10
| | | | | when we mbuf_Read() into it. Add the link name to a few diagnostics.
* Deal with the fact that as we now mbuf_Read the fsmbrian1999-05-091-2/+2
| | | | | | | | | 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-128/+48
| | | | | | | | | | | | | | | | | | | | | 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''.
* Make ports 80 & 81 ``interactive''.brian1999-05-011-2/+2
|
* Add support for NetBSDbrian1999-04-261-5/+5
|
* Ensure that the thing we're casting to struct ipbrian1999-03-291-2/+2
| | | | is aligned for non-i386 architectures.
* Initial RADIUS support (using libradius). See the man page forbrian1999-01-281-2/+5
| | | | | | | | | | | | | | | | | | | details. Compiling with -DNORADIUS (the default for `release') removes support. TODO: The functionality in libradius::rad_send_request() needs to be supplied as a set of routines so that ppp doesn't have to wait indefinitely for the radius server(s). Instead, we need to get a descriptor back, select() on the descriptor, and ask libradius to service it when necessary. For now, ppp blocks SIGALRM while in rad_send_request(), so it misses PAP/CHAP retries & timeouts if they occur. Only PAP is functional. When CHAP is attempted, libradius complains that no User-Password has been specified... rfc2138 says that it *mustn't* be used for CHAP :-( Sponsored by: Internet Business Solutions Ltd., Switzerland
* Don't forget to initialise dbuff when debugging.brian1998-11-101-5/+9
|
* Sync with OpenBSD ifdefsbrian1998-09-171-4/+8
|
* Put the IP buffer queues into struct ipcp.brian1998-08-261-14/+17
| | | | Forgotten by: me
* If we've got a full output buffer queue and cannot sendbrian1998-08-251-1/+11
| | | | | | | | 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.
* o Support callback types NONE, E.164, AUTH and CBCP.brian1998-08-071-1/+3
| | | | | | | | | | | | | | (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.
* Check the ``alive'' filter for a packet *before* thebrian1998-07-111-2/+2
| | | | mbuf is deallocated by vj_SendFrame().
* o Fix remaining sizeof problems for 64 bit machines.brian1998-06-271-3/+5
| | | | | | | | | | 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.
* Remove redundant includesbrian1998-06-271-2/+1
|
* Don't dlopen()/dlsym() libalias, use it in the same waybrian1998-06-271-6/+6
| | | | as the rest of the world uses libraries.
* ``struct tunnel_header'' -> u_int32_t in OpenBSD.brian1998-06-271-2/+1
| | | | | | struct tunnel_header is going soon. Suggested by: Theo
* Change some log levels. ALERTs are only logged whenbrian1998-06-161-3/+3
| | | | | | something that can't happen happens or when everyone needs to know. ERRORs are only logged when something unexpected happens.
* o De-staticise things that don't need to be static.brian1998-06-151-2/+2
| | | | | | | | | | o Bring the static ``ttystate'' into struct prompt so that the tilde context is per prompt and not global. o Comment the remaining static variables so that it's clear why they're static. o Add some XXX comments suggesting that our interface list and our hostname should be re-generated after a signal (say SIGUSR1) so that a machine with PCCARDs has a chance.
* Deal with PROTO_IGMP and PROTO_IPIP packets correctly.brian1998-06-141-2/+28
| | | | | | | Submitted by: Mark Tinguely <tinguely@plains.NoDak.edu> This change will allow a PPP host enabled with the "-alias" option to run mrouted. This does not intend to forward the IGMP nor tunneled packets to another host on the far side if the tun0 interface.
* MFMP: Make ppp multilink capable.brian1998-05-211-183/+161
| | | | See the file README.changes, and re-read the man page.
* Quieten gcc-2.8.1brian1998-04-251-3/+5
|
* Add extraneous braces to stiffle warnings from gcc-2.8brian1998-03-131-2/+3
|
* Remove unused #includes.brian1998-01-211-5/+3
| | | | | | Make various bits static. Remove unused variables. Submitted by: eivind
* Lose <net/if_var.h> !brian1998-01-111-4/+1
| | | | This'll require a `make installworld'.
* Don't scribble on the stack if our input packet isbrian1998-01-041-1/+7
| | | | | bigger than our MRU. Moan and drop the packet instead.
* Show how much time is left before timing out in thebrian1997-12-291-2/+15
| | | | | `show timeout' output. Remove ipIdleSecs variable - it's not used.
* If a packet causes a dial, continue to test whether it'sbrian1997-12-281-2/+2
| | | | | blocked in the output filter. If so, proceed with the dial despite dropping the packet.
* Cosmetic (style):brian1997-12-241-7/+8
| | | | | | | sizeof(var) -> sizeof var sizeof type -> sizeof(type) Suggested by: J Wunsch <j@uriah.heep.sax.de>
* Fix prototypes.brian1997-11-221-12/+17
| | | | | | | | | | | | | | 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).
* Add throughput logging (disabled by default).brian1997-11-181-5/+5
| | | | | Use "enable throughput" to see modem & IPCP throughput. Removed an extraneous prompt()
* Abstract data read from and written to the tun device,brian1997-11-161-19/+33
| | | | | | | | | | | | | | allowing for a possible header on the front of all packets. In OpenBSD, there's a structure containing the address family here. If we're building under OpenBSD, set up the ``flags'' part of struct tuninfo (not there under FreeBSD) so that we config the interface as POINTOPOINT. Prefix prototypes with ``extern'' in os.c for consistency. These changes are cosmetic under FreeBSD, but allow ppp to build & work under OpenBSD (bar the srandomdev() stuff, the inclusing of <net/if_var.h> and some Makefile symantecs).
* Understand networks in the filter rules. We don'tbrian1997-11-121-3/+5
| | | | insist on x.x.x.0/24 - x.x.x.x/24 is ok too.
* Log whether or not IP packets are bloked due tobrian1997-11-121-5/+7
| | | | a filter.
* Cosmetic:brian1997-10-261-1/+3
| | | | Move prototypes into the correct headers.
* Cosmetic (no functional changes):brian1997-10-261-15/+30
| | | | | | | | | | | | | | | 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
* Cosmetic: Log a strerror(errno) when failing to write tobrian1997-10-041-4/+16
| | | | the tun device.
* Allow the transition from an idle timeout valuebrian1997-09-031-2/+3
| | | | | | of zero (no timeout) while IPCP is up. Move some prototypes into .h files and re-order some includes.
* Make the code format more in line with style(9).brian1997-08-251-146/+132
| | | | | Update loadalias to use the new libalias api. Update to version 1.1.
* Put TCP/IP logs back on one line.brian1997-06-161-18/+46
|
* Overhaul ppp:brian1997-06-091-43/+43
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* De-couple ppp from libalias. If libalias isn't there, thebrian1997-05-261-5/+6
| | | | | | | | | alias commands simply won't work. Only root may specify the location of the alias lib (otherwise, it's hard-coded). Make logprintf silently fail if LogOpen hasn't been called. Suggested by: eivind
* Fix the reconnect option, and add an explanation to vars.hbrian1997-05-241-2/+2
|
OpenPOWER on IntegriCloud