summaryrefslogtreecommitdiffstats
path: root/sys/net/ppp_tty.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* use correct forward type declaration from uvm.beck2019-11-271-2/+2
| | | | ok kettenis@
* ttysleep(): drop unused timeout parametercheloha2019-07-191-2/+2
| | | | | | | | All callers sleep indefinitely. With help from visa@. ok visa@, ratchov@, kn@
* M_LEADINGSPACE() and M_TRAILINGSPACE() are just wrappers forclaudio2018-11-091-2/+2
| | | | | | m_leadingspace() and m_trailingspace(). Convert all callers to call directly the functions and remove the defines. OK krw@, mpi@
* Take NET_LOCK for pppioctl when called via the tty ioctl handlermikeb2018-05-151-1/+3
| | | | ok mpi
* Grab the KERNEL_LOCK() in pppasyncstart/pppasyncrelinq/pppasyncctlp.mpi2018-05-151-1/+7
| | | | | | | | The tty layer still relies on it to serialize access to its data. Fixes crashes reported & tested by form@ via mikeb@. ok mikeb@
* Remove almost unused `flags' argument of suser().mpi2018-02-191-5/+5
| | | | | | | The account flag `ASU' will no longer be set but that makes suser() mpsafe since it no longer mess with a per-process field. No objection from millert@, ok tedu@, bluhm@
* Don't pull in <sys/file.h> just to get fcntl.hguenther2017-12-301-2/+2
| | | | ok deraadt@ krw@
* A space here, a space there. Soon we're talking real whitespacekrw2017-01-241-2/+2
| | | | rectification.
* Stop mentioning splsoftnet() in comments, it's almost history.mpi2016-12-191-4/+4
|
* all pools have their ipl set via pool_setipl, so fold it into pool_init.dlg2016-09-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | the ioff argument to pool_init() is unused and has been for many years, so this replaces it with an ipl argument. because the ipl will be set on init we no longer need pool_setipl. most of these changes have been done with coccinelle using the spatch below. cocci sucks at formatting code though, so i fixed that by hand. the manpage and subr_pool.c bits i did myself. ok tedu@ jmatthew@ @ipl@ expression pp; expression ipl; expression s, a, o, f, m, p; @@ -pool_init(pp, s, a, o, f, m, p); -pool_setipl(pp, ipl); +pool_init(pp, s, a, ipl, f, m, p);
* Convert to uiomove(). Diff from Martin Natano.stefan2016-01-251-4/+5
|
* Increase buffer sizes and watermarks for tty and pppsf2016-01-141-6/+3
| | | | | | | | | | | | | | | | Use 115200 the default speed for buffer sizing in ttymalloc(). A lot of devices call ttymalloc(0) so this affects quite a few of them. Increases the buffer size for 9600 < baud <= 115200 from 1k to 4k. Make ppp use the lo/hi watermarks from the tty layer which are adjusted according to speed + buffer size. The previous fixed values of 100 and 400 were way too small Make pty call ttymalloc() with baud == 1000000, which is the common value used in the tree for "fast". ok deraadt@
* Move ppp, nmea, endrun, and msts prototypes to tty.hsf2015-12-211-15/+13
| | | | | | | Fix inconsistent arguments for pppopen/pppclose/pppstart. Use passed in argument p in pppopen instead of curproc. "Looks good to me" deraadt@
* remove old lint annotationstedu2015-12-051-3/+1
|
* No need for <net/if_types.h>mpi2015-11-241-2/+1
| | | | As a bonus this removes a "#if NCARP > 0", say yeah!
* There's no point in abstracting ifp->if_output() as long as pf_test()mpi2015-09-131-2/+2
| | | | | | needs to see lo0 in the output path. ok claudio@
* Stop overwriting the rt_ifp pointer of RTF_LOCAL routes with lo0ifp.mpi2015-09-121-2/+2
| | | | | | | | | Use instead the RTF_LOCAL flag to loop local traffic back to the corresponding protocol queue. With this change rt_ifp is now always the same as rt_ifa->ifa_ifp. ok claudio@
* m_freem() can handle NULL, do not check for this condition beforehands.deraadt2015-07-151-5/+4
| | | | ok stsp mpi
* MFREE(9) is dead, long live m_freem(9)!mpi2015-07-081-2/+2
| | | | ok bluhm@, claudio@, dlg@
* Store a unique ID, an interface index, rather than a pointer to thempi2015-06-161-2/+2
| | | | | | | | | | | | | | | receiving interface in the packet header of every mbuf. The interface pointer should now be retrieved when necessary with if_get(). If a NULL pointer is returned by if_get(), the interface has probably been destroy/removed and the mbuf should be freed. Such mechanism will simplify garbage collection of mbufs and limit problems with dangling ifp pointers. Tested by jmatthew@ and krw@, discussed with many. ok mikeb@, bluhm@, dlg@
* there's been a long standing issue in ppp on a tty/serial line where it allocates mbufs at IPL_SOFTTTY, which is above the IPL_NET the mbuf layer protects itself at.dlg2015-06-031-70/+86
| | | | | | | | | | | | | | | recent improvements to diagnostics in pools and mbufs now panic instead of letting these things silently corrupt. this reworks the ppp handling in the tty layer so it has its own private pool to allocate packet memory out of. these packets get built and then queued for softnet to process. softnet dequeues the packet and attaches it to mbufs as external storage before handing it on to the rest of the stack. this was reported on bugs@ and tested by both Walter Daugherity and Martin van den Nieuwelaar ok deraadt@ mpi@
* replace the use of ifqueues for most input queues serviced by netisrdlg2015-04-101-5/+4
| | | | | | | | | | | | | | | | | with niqueues. this change is so big because there's a lot of code that takes pointers to different input queues (eg, ether_input picks between ipv4, ipv6, pppoe, arp, and mpls input queues) and falls through to code to enqueue packets against the pointer. if i changed only one of the input queues id have to add sepearate code paths, one for ifqueues and one for niqueues in each of these places by flipping all these input queues at once i can keep the currently common code common. testing by mpi@ sthen@ and rafael zalamena ok mpi@ sthen@ claudio@ henning@
* First step towards making uiomove() take a size_t size argument:miod2015-02-101-3/+3
| | | | | | | - rename uiomove() to uiomovei() and update all its users. - introduce uiomove(), which is similar to uiomovei() but with a size_t. - rewrite uiomovei() as an uiomove() wrapper. ok kettenis@
* Explicitly include <net/if_var.h> instead of pulling it in <net/if.h>.mpi2014-12-051-1/+2
| | | | ok mikeb@, krw@, bluhm@, tedu@
* Remove non-standard <sys/dkstat.h> header. It has not contained anythingmiod2014-09-151-2/+1
| | | | | | | | | | related to disk stastics for almost 17 years, and the remaining userland-visible defines duplicate those found in <sys/sched.h>. Move the remaining _KERNEL defines to <sys/tty.h> where they belong, and update all users to cope with this. ok kettenis@
* Fewer <netinet/in_systm.h> !mpi2014-07-221-2/+1
|
* remove very questionable altq "optimization" - claudio and I can'thenning2014-04-191-10/+1
| | | | convince ourselves that that was right to begin with. anyway, begone.
* code that calls timeout functions should include timeout.htedu2013-03-281-1/+2
| | | | | slipped by on i386, but the zaurus doesn't automagically pick it up. spotted by patrick
* More p_pid to p_p->ps_pid updates. OK deraadt@, guenther@claudio2012-03-281-2/+2
|
* ansify and de'register some prototypesdhill2012-01-111-47/+16
| | | | ok miod@
* use IF_IS_EMPTY istead of mucking if ifqueue internalshenning2011-07-061-2/+2
|
* Revert henning's commit-n-run that broke the treeguenther2011-07-051-2/+2
|
* IFQ_IS_EMPTY instead of fiddling with ifqueue internalshenning2011-07-051-2/+2
| | | | | | isn't it awesome that 5 out of 6 cases of this crap were in the various ppp implementations? ok claudio ryan the 6th to be fixed when we return from MEC
* de-register. deraadt okitojun2003-12-101-22/+22
|
* Replace select backends with poll backends. selscan() and pollscan()millert2003-09-231-2/+2
| | | | | | | now call the poll backend. With this change we implement greater poll(2) functionality instead of emulating it via the select backend. Adapted from NetBSD and including some changes from FreeBSD. Tested by many, deraadt@ OK
* comment spelling, from jonathon graytedu2003-09-181-2/+2
|
* change arguments to suser. suser now takes the process, and a flagstedu2003-08-151-5/+5
| | | | | | | | | argument. old cred only calls user suser_ucred. this will allow future work to more flexibly implement the idea of a root process. looks like something i saw in freebsd, but a little different. use of suser_ucred vs suser in file system code should be looked at again, for the moment semantics remain unchanged. review and input from art@ testing and further review miod@
* use MGETHDR instead of MGET for the first mbuf.kjc2003-03-091-2/+7
| | | | | | | | | | | altq expects struct pkthdr in a mbuf chain. this fixes a panic caused by uninitialized m_pkthdr.tags when altq is enabled on ppp. also, initialize m_pkthdr.len and m_pkthdr.rcvif as a caller of MGETHDR is supposed to do. report and test by matthieu@ ok deraadt@, henning@, dhartmei@
* license update of CMU parts. due to communication with wcw+@andrew.cmu.edu,deraadt2002-07-011-20/+36
| | | | | | pushed for by tygs@netcologne.de. Apparently we also now known how to talk to the lawyers there, if we were so mad. Note that a few other copyright issues in pppd still remain, so this does not close this story.
* First round of __P removal in sysmillert2002-03-141-18/+18
|
* sync with KAME.kjc2002-02-131-1/+10
| | | | | | | make altq actually work with kernl ppp. add if_start for the altq case to kick transmission. don't call ppp_restart() to prevent useless interrupt loop under rate-limiting.
* change the meaning of ifnet.if_lastchange to meet RFC1573 ifLastChange.itojun2001-06-151-2/+1
| | | | | | | | follows BSD/OS practice and ucd-snmp code (FreeBSD does it for specific interfaces only). was: if_lastchange get updated on every packet transmission/receipt. now: if_lastchange get updated when IFF_UP is changed.
* No need to check M_WAIT/M_WAITOK malloc return values. (art@ ok)ho2001-05-161-5/+2
|
* Remove two unnecessary splx(). This was missed somewhere along the way, sinceaaron2001-03-091-4/+2
| | | | this was done long ago in NetBSD during an update to ppp-2.3b4.
* Convert to use new timeout API.art2000-06-301-3/+4
|
* fix unsigned without a size-typederaadt1999-07-041-2/+2
|
* Minor changes from ppp 2.3.1millert1997-09-051-204/+205
|
* prevent warning:kstailey1997-01-151-2/+2
| | | | ppp_tty.c:790: warning: `s' might be used uninitialized in this function
* Kernel changes for ppp2.3a4.joshd1996-07-251-175/+198
|
* if_name/if_unit -> if_xname/if_softcderaadt1996-05-101-14/+14
|