aboutsummaryrefslogtreecommitdiff
path: root/sys/netnatm
Commit message (Collapse)AuthorAgeFilesLines
* Back out my lats commit of locking down a socket, it conflicts with hsu's work.Seigo Tanimura2002-05-311-12/+0
| | | | | | | Requested by: hsu Notes: svn path=/head/; revision=97658
* Lock down a socket, milestone 1.Seigo Tanimura2002-05-201-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Add a mutex (sb_mtx) to struct sockbuf. This protects the data in a socket buffer. The mutex in the receive buffer also protects the data in struct socket. o Determine the lock strategy for each members in struct socket. o Lock down the following members: - so_count - so_options - so_linger - so_state o Remove *_locked() socket APIs. Make the following socket APIs touching the members above now require a locked socket: - sodisconnect() - soisconnected() - soisconnecting() - soisdisconnected() - soisdisconnecting() - sofree() - soref() - sorele() - sorwakeup() - sotryfree() - sowakeup() - sowwakeup() Reviewed by: alfred Notes: svn path=/head/; revision=96972
* Revert the change of #includes in sys/filedesc.h and sys/socketvar.h.Seigo Tanimura2002-04-301-4/+7
| | | | | | | | | | | | | Requested by: bde Since locking sigio_lock is usually followed by calling pgsigio(), move the declaration of sigio_lock and the definitions of SIGIO_*() to sys/signalvar.h. While I am here, sort include files alphabetically, where possible. Notes: svn path=/head/; revision=95759
* Change callers of mtx_init() to pass in an appropriate lock type name. InJohn Baldwin2002-04-041-1/+1
| | | | | | | | | | 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 Notes: svn path=/head/; revision=93818
* Remove __P.Alfred Perlstein2002-03-204-28/+25
| | | | Notes: svn path=/head/; revision=92745
* Fix warningsPeter Wemm2002-02-281-10/+11
| | | | Notes: svn path=/head/; revision=91458
* Initialise the intrq_present fields at runtime, not link time. This allowsMike Smith2002-01-081-2/+1
| | | | | | | | | us to load protocols at runtime, and avoids the use of common variables. Also fix the ip6_intrq assignment so that it works at all. Notes: svn path=/head/; revision=89069
* Give struct socket structures a ref counting interface similar toMatthew Dillon2001-11-171-2/+2
| | | | | | | | | | vnodes. This will hopefully serve as a base from which we can expand the MP code. We currently do not attempt to obtain any mutex or SX locks, but the door is open to add them when we nail down exactly how that part of it is going to work. Notes: svn path=/head/; revision=86487
* Change a couple of M_WAITOKs used in M_PREPEND() to M_TRYWAITs, whichBosko Milekic2001-04-051-2/+2
| | | | | | | | | is what they should be. As the returned mbuf is already checked for failure of M_PREPEND even in the wait case, nothing more to be done here. Notes: svn path=/head/; revision=75217
* Mechanical change to use <sys/queue.h> macro API instead ofPoul-Henning Kamp2001-02-041-4/+4
| | | | | | | | | | fondling implementation details. Created with: sed(1) Reviewed by: md5(1) Notes: svn path=/head/; revision=71999
* Convert more malloc+bzero to malloc+M_ZERO.David Malone2000-12-081-4/+3
| | | | | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Notes: svn path=/head/; revision=69781
* Lock down the network interface queues. The queue mutex must be obtainedJonathan Lemon2000-11-251-0/+2
| | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=69152
* Back out the previous change to the queue(3) interface.Jake Burkholder2000-05-261-2/+2
| | | | | | | | | It was not discussed and should probably not happen. Requested by: msmith and others Notes: svn path=/head/; revision=60938
* Change the way that the queue(3) structures are declared; don't assume thatJake Burkholder2000-05-231-2/+2
| | | | | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd Notes: svn path=/head/; revision=60833
* Add $FreeBSD$Peter Wemm2000-05-011-0/+1
| | | | Notes: svn path=/head/; revision=59874
* Clean up some loose ends in the network code, including the X.25 and ISOPeter Wemm2000-02-131-1/+8
| | | | | | | | | | #ifdefs. Clean out unused netisr's and leftover netisr linker set gunk. Tested on x86 and alpha, including world. Approved by: jkh Notes: svn path=/head/; revision=57178
* Move the *intrq variables into net/intrq.c and unconditionallyBrian Somers2000-01-241-1/+4
| | | | | | | | | | | | | | include this in all kernels. Declare some const *intrq_present variables that can be checked by a module prior to using *intrq to queue data. Make the if_tun module capable of processing atm, ip, ip6, ipx, natm and netatalk packets when TUNSIFHEAD is ioctl()d on. Review not required by: freebsd-hackers Notes: svn path=/head/; revision=56555
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"Peter Wemm1999-12-291-5/+2
| | | | | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come. Notes: svn path=/head/; revision=55205
* Examine all occurrences of sprintf(), strcat(), and str[n]cpy()Archie Cobbs1998-12-041-4/+4
| | | | | | | | | | | | | | | | | for possible buffer overflow problems. Replaced most sprintf()'s with snprintf(); for others cases, added terminating NUL bytes where appropriate, replaced constants like "16" with sizeof(), etc. These changes include several bug fixes, but most changes are for maintainability's sake. Any instance where it wasn't "immediately obvious" that a buffer overflow could not occur was made safer. Reviewed by: Bruce Evans <bde@zeta.org.au> Reviewed by: Matthew Dillon <dillon@apollo.backplane.com> Reviewed by: Mike Spengler <mks@networkcs.com> Notes: svn path=/head/; revision=41514
* Nitpicking and dusting performed on a train. Removes trivial warningsPoul-Henning Kamp1998-10-251-4/+0
| | | | | | | about unused variables, labels and other lint. Notes: svn path=/head/; revision=40648
* This commit fixes various 64bit portability problems required forDoug Rabson1998-06-071-2/+2
| | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=36735
* Staticize.Eivind Eklund1998-02-092-7/+7
| | | | Notes: svn path=/head/; revision=33181
* Back out DIAGNOSTIC changes.Eivind Eklund1998-02-062-4/+0
| | | | Notes: svn path=/head/; revision=33134
* Turn DIAGNOSTIC into a new-style option.Eivind Eklund1998-02-042-0/+4
| | | | Notes: svn path=/head/; revision=33108
* Fixed a sloppy common-style declaration.Bruce Evans1997-12-202-1/+4
| | | | | | | | | natm_pcb.c: Include <sys/socketvar.h> which will be used when M_PCB is declared in the right place. Notes: svn path=/head/; revision=31885
* Removed unused #includes.Bruce Evans1997-10-281-8/+0
| | | | Notes: svn path=/head/; revision=30813
* Last major round (Unless Bruce thinks of somthing :-) of malloc changes.Poul-Henning Kamp1997-10-121-1/+1
| | | | | | | | | | | Distribute all but the most fundamental malloc types. This time I also remembered the trick to making things static: Put "static" in front of them. A couple of finer points by: bde Notes: svn path=/head/; revision=30354
* Update network code to use poll support.Peter Wemm1997-09-141-1/+1
| | | | Notes: svn path=/head/; revision=29366
* Added used #include - don't depend on <sys/mbuf.h> includingBruce Evans1997-09-021-0/+1
| | | | | | | <sys/malloc.h> (unless we only use the bogusly shared M*WAIT flags). Notes: svn path=/head/; revision=29024
* Fix all areas of the system (or at least all those in LINT) to avoid storingGarrett Wollman1997-08-161-19/+18
| | | | | | | | | | | socket addresses in mbufs. (Socket buffers are the one exception.) A number of kernel APIs needed to get fixed in order to make this happen. Also, fix three protocol families which kept PCBs in mbufs to not malloc them instead. Delete some old compatibility cruft while we're at it, and add some new routines in the in_cksum family. Notes: svn path=/head/; revision=28270
* Removed unused #includes.Bruce Evans1997-08-022-10/+0
| | | | Notes: svn path=/head/; revision=27845
* import Chuck Cranor's ATM driverKenjiro Cho1997-05-091-0/+822
| | | | Notes: svn path=/cvs2svn/branches/CRANOR/; revision=25605
* import Chuck Cranor's ATM driverKenjiro Cho1997-05-093-0/+486
Notes: svn path=/cvs2svn/branches/CRANOR/; revision=25603