summaryrefslogtreecommitdiffstats
path: root/sys/net/ppp_tty.c
Commit message (Collapse)AuthorAgeFilesLines
* Make ppp(4) devices clonable and unloadable.brooks2002-08-091-2/+8
|
* Change the suser() API to take advantage of td_ucred as well as do ajhb2002-04-011-4/+4
| | | | | | | | | | | | 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-18/+18
|
* Get rid of the twisted MFREE() macro entirely.dillon2002-02-051-3/+1
| | | | | Reviewed by: dg, bmilekic MFC after: 3 days
* KSE Milestone 2julian2001-09-121-11/+11
| | | | | | | | | | | | | | 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
* * Rename M_WAIT mbuf subsystem flag to M_TRYWAIT.bmilekic2000-12-211-1/+1
| | | | | | | | | | | | | | | | | | This is because calls with M_WAIT (now M_TRYWAIT) may not wait forever when nothing is available for allocation, and may end up returning NULL. Hopefully we now communicate more of the right thing to developers and make it very clear that it's necessary to check whether calls with M_(TRY)WAIT also resulted in a failed allocation. M_TRYWAIT basically means "try harder, block if necessary, but don't necessarily wait forever." The time spent blocking is tunable with the kern.ipc.mbuf_wait sysctl. M_WAIT is now deprecated but still defined for the next little while. * Fix a typo in a comment in mbuf.h * Fix some code that was actually passing the mbuf subsystem's M_WAIT to malloc(). Made it pass M_WAITOK instead. If we were ever to redefine the value of the M_WAIT flag, this could have became a big problem.
* Removed unused includes (garbage left over/created by the SMPng megacommit).bde2000-09-261-6/+0
|
* Major update to the way synchronization is done in the kernel. Highlightsjasone2000-09-071-21/+2
| | | | | | | | | | | | | | | include: * Mutual exclusion is used instead of spl*(). See mutex(9). (Note: The alpha port is still in transition and currently uses both.) * Per-CPU idle processes. * Interrupts are run in their own separate kernel threads and can be preempted (i386 only). Partially contributed by: BSDi (BSD/OS) Submissions by (at least): cp, dfr, dillon, grog, jake, jhb, sheldonh
* Remove some #if NFOO > 0 that are always true because of config rules.peter2000-01-291-5/+0
|
* This patch clears the way for removing a number of tty relatedphk1999-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | fields in struct cdevsw: d_stop moved to struct tty. d_reset already unused. d_devtotty linkage now provided by dev_t->si_tty. These fields will be removed from struct cdevsw together with d_params and d_maxio Real Soon Now. The changes in this patch consist of: initialize dev->si_tty in *_open() initialize tty->t_stop remove devtotty functions rename ttpoll to ttypoll a few adjustments to these changes in the generic code a bump of __FreeBSD_version add a couple of FreeBSD tags
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* I got tired of seeing all the cdevsw[major(foo)] all over the place.phk1999-05-081-2/+2
| | | | | | | | Made a new (inline) function devsw(dev_t dev) and substituted it. Changed to the BDEV variant to this format as well: bdevsw(dev_t dev) DEVFS will eventually benefit from this change too.
* Suser() simplification:phk1999-04-271-5/+5
| | | | | | | | | | | | | | | | | | | 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.
* Undo #undef KERNEL hack for vnode.h to avoid vnode_if.h.peter1999-01-171-9/+2
| | | | | | | | | XXX It probably makes sense to have a flag for bsd.kern.mk to avoid these rules. XXX IO_NDELAY seems to be the main reason for it, when used in a cdevsw read or write "flag" context. Perhaps a redundant declaration somewhere like sys/conf.h might help remove the need for vnode.h in these device drivers in the first place.
* Missing splx().peter1998-06-201-2/+4
|
* This commit fixes various 64bit portability problems required fordfr1998-06-071-3/+3
| | | | | | | | | | 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.
* Oops, the previous commit should have changed `i386' to `__i386__',bde1998-05-011-3/+3
| | | | not `__i386'.
* Support compiling with `gcc -ansi'.bde1998-04-151-3/+3
|
* 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-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "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
* Moved some #includes from <sys/param.h> nearer to where they are actuallybde1998-03-281-2/+2
| | | | used.
* Implement the spirit but not the letter of Terrys hot-char patch.phk1998-02-131-3/+4
| | | | | | | The differences Terrys patch and this patch are: * Remove a lot of un-needed comments. * Don't put l_hotchar at the front of stuct linesw, there is no need to. * Use the #defines for the hotchar in the SLIP and PPP line disciplines
* 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.
* Don't test for conflicting combinations of PPP_FILTER/BPFILTER here.bde1997-11-181-29/+9
| | | | | | | | | | | | | | Testing in if_ppp.c is good enough. Added comments about bogus #includes and #defines. Removed unused #includes. Don't depend on gcc's misfeature of rewriting short args in old-style function definitions to match wrong prototypes. I just changed the function definition to match the prototype, since this is easy to verify automatically (it causes no changes in the object code), but it breaks K&R1 support and doesn't fix the pessimal type.
* Convert PPP_FILTER to an option, like PPP_BSDCOMP and PPP_DEFLATE.peter1997-10-181-3/+7
| | | | 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/+6
| | | | | on the code and pppd in userland. PPP_FILTER is meant to be an option (or negatable option).
* Try out PPP_FILTERpeter1997-10-101-1/+2
|
* Update for new callout interface.gibbs1997-09-211-3/+3
|
* Some fixes from Bruce:peter1997-08-221-4/+6
| | | | | | | | - don't access time (a volatile) via struct copy. - merge botches - note risk of CCOUNT accessing *tp outside spltty(). Submitted by: bde
* Update kernel parts of pppd from 2.2.0 to 2.3.0. I've yet to look at thepeter1997-08-191-112/+143
| | | | | | | | | | 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.
* Fix this damn mbuf with a negative m_len. It turnsbrian1997-06-221-5/+1
| | | | | | | | | | | | | out to be a problem with VJ header compression. davidg spotted this in usr.sbin/ppp/slcompress.c a while ago, but I believe gave the wrong reasons - it's too easy to reproduce ! The only scenario that I've been able to reproduce the problem under is when m_len is *exactly* 40 ! So go figure ! PR: 3749 Submitted elsewhere by: davidg Obtained from: usr.sbin/ppp/slcompress.c
* Protect against garbage mbufs in pppstart.brian1997-06-181-2/+7
| | | | | | | | Remove previous hack in pppfcs(). This is still not the correct solution. We shouldn't have any incorrect mbufs. This patch does however make pppd/natd work (rather than jamming the interface).
* Prevent panic with garbage mbuf.brian1997-06-091-2/+2
| | | | Submitted by: Lenzi, Sergio <lenzi@bsi.com.br>
* Move interrupt handling code from isa.c to a new file. This should makedfr1997-06-021-2/+2
| | | | | | | isa.c (slightly) more portable and will make my life developing the really portable version much easier. Reviewed by: peter, fsmp
* Bruce mentioned to me that Paul Traina had noticed that the ppp_ttypeter1997-05-311-4/+4
| | | | | | | | | | | | 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 refer to SWI_*_MASK, it's not SMP/UP kernel portable for the lkm.peter1997-05-311-4/+3
|
* Don't include <sys/ioctl.h> in the kernel. Stage 1: don't includebde1997-03-241-2/+1
| | | | | it when it is not used. In most cases, the reasons for including it went away when the special ioctl headers became self-sufficient.
* Don't #include <sys/fcntl.h> in <sys/file.h> if KERNEL is defined.bde1997-03-231-2/+2
| | | | | Fixed everything that depended on getting fcntl.h stuff from the wrong place. Most things don't depend on file.h stuff at all.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* 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.
* Second phase of merge, get rid of more machine-independent-dependencies.asami1996-09-031-5/+1
| | | | | | Get rid of pc98/pc98/pc98_device.h. Submitted by: The FreeBSD(98) Development Team
* Re-sync with the state of PC98 world. This will be the last commit beforeasami1996-08-301-2/+2
| | | | | | we start merging things in earnest... Submitted by: The FreeBSD(98) Development Team
* The Great PC98 Merge.asami1996-06-141-1/+5
| | | | | | | | All new code is "#ifdef PC98"ed so this should make no difference to PC/AT (and its clones) users. Ok'd by: core Submitted by: FreeBSD(98) development team
* Only print out the new masks if bootverbose is set.nate1996-06-121-2/+4
|
* 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-2/+2
| | | | | SNMP requirements. Update description of ifnet.if_lastchange in if.h to indicate this.
* Use new printf features rather than local kludges.phk1996-01-241-27/+3
|
* Another mega commit to staticize things.phk1995-12-141-16/+16
|
* Re-Zap unused variables in their new location.. :-)peter1995-11-011-3/+2
|
* Merge/update ppp-2.2 kernel parts onto mainline.peter1995-10-311-31/+138
| | | | | Note that the old if_ppp.c has been split in half into if_ppp.c and ppp_tty.c
OpenPOWER on IntegriCloud