summaryrefslogtreecommitdiffstats
path: root/sys/net/if_ppp.c
Commit message (Collapse)AuthorAgeFilesLines
* Change callers of mtx_init() to pass in an appropriate lock type name. Injhb2002-04-041-3/+3
| | | | | | | most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used. Tested on: i386, alpha, sparc64
* Replace (deprecated ?) FREE() macro with direct calls to free()luigi2002-04-041-6/+6
|
* Change the suser() API to take advantage of td_ucred as well as do ajhb2002-04-011-8/+8
| | | | | | | | | | | | general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag. Discussed on: smp@
* Remove __P.alfred2002-03-191-8/+8
|
* Remove duplicated and wrong sc->sc_last_recv setting. It unbreaksmaxim2002-03-051-4/+1
| | | | | | | | | | | active-filter in pppd(8). PR: kern/12281 Submitted by: Tim Moore <moore@bricoworks.com> Not objected by: peter Reviewed by: ru Approved by: ru MFC after: 1 week
* Get rid of the twisted MFREE() macro entirely.dillon2002-02-051-2/+3
| | | | | Reviewed by: dg, bmilekic MFC after: 3 days
* Staticise private interface lists.msmith2002-01-081-1/+1
|
* KSE Milestone 2julian2001-09-121-2/+3
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Fix some signed/unsigned integer confusion, and add bounds checking ofkris2001-09-101-1/+2
| | | | | | | | arguments to some functions. Obtained from: NetBSD Reviewed by: peter MFC after: 2 weeks
* Quieten gcc.peter2001-01-311-0/+1
|
* Exterminate the use of PSEUDO_SET() with extreme prejudice.peter2001-01-311-6/+25
|
* Lock down the network interface queues. The queue mutex must be obtainedjlemon2000-11-251-52/+47
| | | | | | | | | | | | | | before adding/removing packets from the queue. Also, the if_obytes and if_omcasts fields should only be manipulated under protection of the mutex. IF_ENQUEUE, IF_PREPEND, and IF_DEQUEUE perform all necessary locking on the queue. An IF_LOCK macro is provided, as well as the old (mutex-less) versions of the macros in the form _IF_ENQUEUE, _IF_QFULL, for code which needs them, but their use is discouraged. Two new macros are introduced: IF_DRAIN() to drain a queue, and IF_HANDOFF, which takes care of locking/enqueue, and also statistics updating/start if necessary.
* Remove some #if NFOO > 0 that are always true because of config rules.peter2000-01-291-3/+0
|
* Minor tidy up of PPP_FILTER and NBPF stuff. Don't generate bpf.h in thepeter1999-09-261-7/+1
| | | | module and don't #include "bpf.h".
* Remove NBPF conditionality of bpf calls in most of our network drivers.phk1999-09-251-8/+0
| | | | | | | | | | | | This means that we will not have to have a bpf and a non-bpf version of our driver modules. This does not open any security hole, because the bpf core isn't loadable The drivers left unchanged are the "cross platform" drivers where the respective maintainers are urged to DTRT, whatever that may be. Add a couple of missing FreeBSD tags.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Back out redundant checksbrian1999-08-061-7/+3
| | | | Pointed out by: bde
* Define IF_MAXMTU and IF_MINMTU and don't allow MTUs withbrian1999-08-061-3/+7
| | | | | | | | | out-of-range values. ``comparison is always 0'' warnings are silly ! Ok'd by: wollman, dg Advised by: bde
* Rename bpfilter to bpf.des1999-07-061-7/+7
|
* Suser() simplification:phk1999-04-271-8/+8
| | | | | | | | | | | | | | | | | | | 1: s/suser/suser_xxx/ 2: Add new function: suser(struct proc *), prototyped in <sys/proc.h>. 3: s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/ The remaining suser_xxx() calls will be scrutinized and dealt with later. There may be some unneeded #include <sys/cred.h>, but they are left as an exercise for Bruce. More changes to the suser() API will come along with the "jail" code.
* Merge ppp changes from 2.3.3 -> 2.3.5. I have spotted some morepeter1998-06-201-8/+3
| | | | problems, which I'll have a go at shortly.
* This commit fixes various 64bit portability problems required fordfr1998-06-071-4/+6
| | | | | | | | | | FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time.
* Added fast IP forwarding code by Matt Thomas <matt@3am-software.com> viadg1998-05-191-1/+5
| | | | | | | | | | | | NetBSD, ported to FreeBSD by Pierre Beyssac <pb@fasterix.freenix.org> and minorly tweaked by me. This is a standard part of FreeBSD, but must be enabled with: "sysctl -w net.inet.ip.fastforwarding=1" ...and of course forwarding must also be enabled. This should probably be modified to use the zone allocator for speed and space efficiency. The current algorithm also appears to lose if the number of active paths exceeds IPFLOW_MAX (256), in which case it wastes lots of time trying to figure out which cache entry to drop.
* Use getmicrotime() for if_lastchange, 10msec is plenty precision.phk1998-04-061-2/+2
|
* Eradicate the variable "time" from the kernel, using various measures.phk1998-03-301-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "time" wasn't a atomic variable, so splfoo() protection were needed around any access to it, unless you just wanted the seconds part. Most uses of time.tv_sec now uses the new variable time_second instead. gettime() changed to getmicrotime(0. Remove a couple of unneeded splfoo() protections, the new getmicrotime() is atomic, (until Bruce sets a breakpoint in it). A couple of places needed random data, so use read_random() instead of mucking about with time which isn't random. Add a new nfs_curusec() function. Mark a couple of bogosities involving the now disappeard time variable. Update ffs_update() to avoid the weird "== &time" checks, by fixing the one remaining call that passwd &time as args. Change profiling in ncr.c to use ticks instead of time. Resolution is the same. Add new function "tvtohz()" to avoid the bogus "splfoo(), add time, call hzto() which subtracts time" sequences. Reviewed by: bde
* ppp-2.3.x ships with a bad compression number for deflate. It uses numberpeter1998-03-221-1/+7
| | | | | | | 24 (which is magnalink!) rather than the correct 26. Initial attempt at a compatability kludge that will negotiate for either but will prefer to use the correct deflate compression type.
* Make INET a proper option.eivind1998-01-081-2/+5
| | | | | | | | | | | | This will not make any of object files that LINT create change; there might be differences with INET disabled, but hardly anything compiled before without INET anyway. Now the 'obvious' things will give a proper error if compiled without inet - ipx_ip, ipfw, tcp_debug. The only thing that _should_ work (but can't be made to compile reasonably easily) is sppp :-( This commit move struct arpcom from <netinet/if_ether.h> to <net/if_arp.h>.
* Throw options IPX, IPXIP and IPTUNNEL into opt_ipx.h.eivind1997-12-151-1/+2
| | | | | | | | The #ifdef IPXIP in netipx/ipx_if.h is OK (used from ipx_usrreq.c and ifconfig.c only). I also fixed a typo IPXTUNNEL -> IPTUNNEL (and #ifdef'ed out the code inside, as it never could have compiled - doh.)
* Use ENOIOCTL instead of -1 (= ERESTART) for tty ioctls that arebde1997-12-061-2/+2
| | | | | not handled at a particular level. This fixes mainly restarting of interrupted TIOCDRAINs and TIOCSETA{W,F}s.
* Cleaned up PPP_FILTER/NBPFILTER ifdefs.bde1997-11-181-15/+6
| | | | | | Use gettime() instead of microtime() to set if_lastchange for i/o's. microtime() is probably too expensive. However, setting if_lastchange for i/o's may be wrong.
* Convert PPP_FILTER to an option, like PPP_BSDCOMP and PPP_DEFLATE.peter1997-10-181-3/+5
| | | | It requires bpf, I'll note this in LINT.
* Better fix for the bpf dependency that doesn't have such a large impactpeter1997-10-181-1/+5
| | | | | on the code and pppd in userland. PPP_FILTER is meant to be an option (or negatable option).
* Back out the `PPP_FILTER => NBPFILTER' changespeter1997-10-181-11/+12
|
* PPP_FILTER => NBPFILTERbrian1997-10-171-12/+11
|
* Try out PPP_FILTERpeter1997-10-101-2/+3
|
* Some fixes from Bruce:peter1997-08-221-4/+4
| | | | | | | | - don't access time (a volatile) via struct copy. - merge botches - note risk of CCOUNT accessing *tp outside spltty(). Submitted by: bde
* Use two NetBSD-style options (PPP_DEFLATE and PPP_BSDCOMP) to controlpeter1997-08-191-4/+6
| | | | whether or not to compile the two ppp compression methods.
* Update kernel parts of pppd from 2.2.0 to 2.3.0. I've yet to look at thepeter1997-08-191-140/+280
| | | | | | | | | | 2.3.0 -> 2.3.1 changes, but I seem to recall that there are certain "issues" with 2.3.1 (I'm not sure if it's just pppd or the whole lot, I am not quite that far). The present pppd seems to work with it just fine for the time being. Among the changes are that zlib (aka LZ77 aka deflate aka gzip) compression is implemented as well as the original compress(1) LZW style.
* Bruce mentioned to me that Paul Traina had noticed that the ppp_ttypeter1997-05-311-1/+9
| | | | | | | | | | | | interrupt mask hackery wasn't happening when being modloaded via the if_ppp lkm. It seems that the lkm system doesn't particularly like having two sets of load/unload/etc routines. :-] This really should be fixed by having a seperate if_ppp and ppp_tty lkm, but that requires that ppp_tty is loaded after if_ppp, and needs to be able to link with symbols in if_ppp. This gets messy, it is a better task for the in-kernel linker. (if_ppp is generic, ppp_tty is a tty-specific bottom end for if_ppp, it's not _too_ hard to have another "provider" (such as a hdlc sync card) connected to if_ppp)
* Don't include <sys/ioctl.h> in the kernel. Stage 4: includebde1997-03-241-2/+3
| | | | | | | | <sys/ttycom.h> and sometimes <sys/filio.h> instead of <sys/ioctl.h> in miscellaneous files. Most of these files have nothing to do with ttys but need to include <sys/ttycom.h> to get the definitions of TIOC[SG]PGRP which are (ab)used to convert F[SG]ETOWN fcntls into ioctls.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Don't try to do anything with the `ifr' parameter for SIOCADDMULTIwollman1997-01-171-13/+0
| | | | and SIOCDELMULTI; it is guaranteed to be null in the new system.
* 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.
* Don't dereference sc->sc_setmtu if it's NULL (such as when it's not running)peter1996-07-211-2/+3
| | | | | | as discussed on current. (bde pointed out the cause of the problem) Reported by: dev@fgate.flevel.co.uk
* Since the updates to ifnet.if_lastchange are so rare (relativelygpalmer1996-06-121-2/+2
| | | | | | | speaking), go for the extra accuracy and call microtime() to get the current time. Pointed Out By: bde
* Change the use if ifnet.if_lastchange to be more in line withgpalmer1996-06-101-3/+2
| | | | | SNMP requirements. Update description of ifnet.if_lastchange in if.h to indicate this.
* Eliminated sloppy common-style declarations. Now there are no duplicatedbde1996-04-131-1/+3
| | | | | | common labels for LINT. There are still some common declarations for the !KERNEL case in tcp_debug.h and spx_debug.h. trpt depends on the ones in tcp_debug.h.
* Removed never-used #includes of <machine/cpu.h>. Many were apparentlybde1996-04-071-2/+1
| | | | copied from bad examples.
* Clean up Ethernet drivers:wollman1996-02-061-6/+6
| | | | | | | | - fill in and use ifp->if_softc - use if_bpf rather than private cookie variables - change bpf interface to take advantage of this - call ether_ifattach() directly from Ethernet drivers - delete kludge in if_attach() that did this indirectly
* Use new printf features rather than local kludges.phk1996-01-241-4/+3
|
OpenPOWER on IntegriCloud