summaryrefslogtreecommitdiffstats
path: root/sys/netatalk
Commit message (Collapse)AuthorAgeFilesLines
...
* Eliminate a duplicate free when deleting an interface address. Thissam2003-11-281-11/+1
| | | | | | | | caused crashes, typically during shutdown, because the second free referenced a mutex that had been destroyed. Tested by: several Approved by: re (scottl)
* Introduce a MAC label reference in 'struct inpcb', which cachesrwatson2003-11-182-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | the MAC label referenced from 'struct socket' in the IPv4 and IPv6-based protocols. This permits MAC labels to be checked during network delivery operations without dereferencing inp->inp_socket to get to so->so_label, which will eventually avoid our having to grab the socket lock during delivery at the network layer. This change introduces 'struct inpcb' as a labeled object to the MAC Framework, along with the normal circus of entry points: initialization, creation from socket, destruction, as well as a delivery access control check. For most policies, the inpcb label will simply be a cache of the socket label, so a new protocol switch method is introduced, pr_sosetlabel() to notify protocols that the socket layer label has been updated so that the cache can be updated while holding appropriate locks. Most protocols implement this using pru_sosetlabel_null(), but IPv4/IPv6 protocols using inpcbs use the the worker function in_pcbsosetlabel(), which calls into the MAC Framework to perform a cache update. Biba, LOMAC, and MLS implement these entry points, as do the stub policy, and test policy. Reviewed by: sam, bms Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* o add a flags parameter to netisr_register that is used to specifysam2003-11-084-6/+11
| | | | | | | | | | | | | | | | whether or not the isr needs to hold Giant when running; Giant-less operation is also controlled by the setting of debug_mpsafenet o mark all netisr's except NETISR_IP as needing Giant o add a GIANT_REQUIRED assertion to the top of netisr's that need Giant o pickup Giant (when debug_mpsafenet is 1) inside ip_input before calling up with a packet o change netisr handling so swi_net runs w/o Giant; instead we grab Giant before invoking handlers based on whether the handler needs Giant o change netisr handling so that netisr's that are marked MPSAFE may have multiple instances active at a time o add netisr statistics for packets dropped because the isr is inactive Supported by: FreeBSD Foundation
* must use RTFREE instead of rtfree for proper lockingsam2003-11-082-2/+2
|
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-10-311-4/+4
| | | | | | | | | | | | | if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance. This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics. Approved By: re (in principle) Reviewed By: njl, imp Tested On: i386, amd64, sparc64 Obtained From: NetBSD (if_xname)
* Remove unnecessary casts to (caddr_t) for if_broadcastaddr.imp2003-10-231-3/+3
|
* More checking of M_PREPEND() return values: pass through link-layerrwatson2003-08-292-0/+8
| | | | | Appletalk code. These changes are untested since I don't have an Appletalk environment.
* - Use if_broadcastaddr from struct ifnet rather than relying onmdodd2003-03-211-4/+4
| | | | | | | extern 'etherbroadcastaddr'. - Make 'etherbroadcastaddr' static. Reviewed by: imp
* Update netisr handling; Each SWI now registers its queue, and all queuejlemon2003-03-046-83/+58
| | | | | | | | | | drain routines are done by swi_net, which allows for better queue control at some future point. Packets may also be directly dispatched to a netisr instead of queued, this may be of interest at some installations, but currently defaults to off. Reviewed by: hsu, silby, jayanth, sam Sponsored by: DARPA, NAI Labs
* Back out M_* changes, per decision of the TRB.imp2003-02-195-10/+10
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-215-10/+10
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Lock up ifaddr reference counts.hsu2002-12-181-11/+2
|
* Add more ethernet types and move AppleTalk types into proper location.sobomax2002-09-061-8/+2
| | | | Obtained from: NetBSD (syssrc/sys/net/ethertypes.h, rev.1.13)
* Introduce experimental support for MAC in the AppleTalk/EtherTalk stack.rwatson2002-08-153-0/+28
| | | | | | | | | Label link layer mbufs as they are created for transmission, check mbufs before delivering them to sockets, label mbufs as they are created from sockets, and preserve mbuf labels if mbufs are copied. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* Back out my lats commit of locking down a socket, it conflicts with hsu's work.tanimura2002-05-313-20/+2
| | | | Requested by: hsu
* Fix warning; Extra tokens after #endifpeter2002-05-241-1/+1
|
* Lock down a socket, milestone 1.tanimura2002-05-203-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Revert the change of #includes in sys/filedesc.h and sys/socketvar.h.tanimura2002-04-301-3/+6
| | | | | | | | | | 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.
* Change callers of mtx_init() to pass in an appropriate lock type name. Injhb2002-04-042-4/+4
| | | | | | | 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
* Change the suser() API to take advantage of td_ucred as well as do ajhb2002-04-013-3/+3
| | | | | | | | | | | | 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-201-15/+15
|
* Make `options NETATALK' compile after the -fno-common changes.iedowse2002-01-163-2/+6
| | | | Tested by: Emiel Kollof <coolvibe@hackerheaven.org>
* Give struct socket structures a ref counting interface similar todillon2001-11-172-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.
* KSE Milestone 2julian2001-09-124-30/+33
| | | | | | | | | | | | | | 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
* Mechanical change to use <sys/queue.h> macro API instead ofphk2001-02-041-2/+2
| | | | | | | fondling implementation details. Created with: sed(1) Reviewed by: md5(1)
* * Rename M_WAIT mbuf subsystem flag to M_TRYWAIT.bmilekic2000-12-212-4/+4
| | | | | | | | | | | | | | | | | | 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.
* Convert more malloc+bzero to malloc+M_ZERO.dwmalone2000-12-083-6/+3
| | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net>
* Lock down the network interface queues. The queue mutex must be obtainedjlemon2000-11-252-0/+4
| | | | | | | | | | | | | | 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.
* Move suser() and suser_xxx() prototypes and a related #define fromphk2000-10-293-3/+6
| | | | | | | | | <sys/proc.h> to <sys/systm.h>. Correctly document the #includes needed in the manpage. Add one now needed #include of <sys/systm.h>. Remove the consequent 48 unused #includes of <sys/proc.h>.
* Just need to pass the address family to if_simloop(), not the whole sockaddr.archie2000-05-241-1/+3
|
* Slight cleanup of aarp codejulian2000-03-291-11/+13
| | | | | | | Submitted by: Ian Dowse <iedowse@maths.tcd.ie> PR: kern/17583 This PR is still open as Ther is still ongoing investigation.
* Clean up some loose ends in the network code, including the X.25 and ISOpeter2000-02-131-1/+7
| | | | | | | #ifdefs. Clean out unused netisr's and leftover netisr linker set gunk. Tested on x86 and alpha, including world. Approved by: jkh
* Move the *intrq variables into net/intrq.c and unconditionallybrian2000-01-241-2/+5
| | | | | | | | | | | 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
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-293-3/+9
| | | | | | 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.
* Change suser_xxx() to suser() where it applies.phk1999-04-272-2/+2
|
* Suser() simplification:phk1999-04-273-3/+3
| | | | | | | | | | | | | | | | | | | 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.
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-274-5/+5
| | | | kernel compile
* De-staticize and add prototype for main debug function. I'll turneivind1999-01-121-2/+3
| | | | this into a DDB command in the next staticization run.
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticarchie1998-12-074-18/+4
| | | | and local variables, goto labels, and functions declared but not defined.
* Staticize.eivind1998-11-261-2/+2
|
* Fixed printf format errors.bde1998-08-171-8/+9
|
* fix broken loopback code for ddp (again)julian1998-08-041-4/+37
| | | | Submitted by: Stefan Bethke <stb@hanse.de>
* Typo fix: teh --> (the|they)alex1998-07-301-1/+1
|
* Fix braino in last commit.julian1998-07-131-1/+1
| | | | Not even sure how I got this commit in as it didn't even compile.
* Slight optimisation. Don't do the same calculation twice.julian1998-07-091-17/+14
|
* Go through the loopback code with a broom..julian1998-06-121-0/+9
| | | | | | | | | | | | | | | | Remove lots'o'hacks. looutput is now static. Other callers who want to use loopback to allow shortcutting should call the special entrypoint for this, if_simloop(), which is specifically designed for this purpose. Using looutput for this purpose was problematic, particularly with bpf and trying to keep track of whether one should be using the charateristics of the loopback interface or the interface (e.g. if_ethersubr.c) that was requesting the loopback. There was a whole class of errors due to this mis-use each of which had hacks to cover them up. Consists largly of hack removal :-)
* This commit fixes various 64bit portability problems required fordfr1998-06-072-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.
* spurious ntohs calls were stopping some packets from being recognisedjulian1998-06-051-6/+6
| | | | | for what they are.. Taken from the netatalk mailing list. from a NetBSD user.
* Remove stray debug message.steve1998-05-241-1/+0
| | | | PR: 6722
* Seventy-odd "its" / "it's" typos in comments fixed as per kern/6108.des1998-04-171-1/+1
|
OpenPOWER on IntegriCloud