summaryrefslogtreecommitdiff
path: root/sys/netatalk/ddp_input.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove AppleTalk support.Gleb Smirnoff2014-03-141-441/+0
| | | | | | | | | | | | | AppleTalk was a network transport protocol for Apple Macintosh devices in 80s and then 90s. Starting with Mac OS X in 2000 the AppleTalk was a legacy protocol and primary networking protocol is TCP/IP. The last Mac OS X release to support AppleTalk happened in 2009. The same year routing equipment vendors (namely Cisco) end their support. Thus, AppleTalk won't be supported in FreeBSD 11.0-RELEASE. Notes: svn path=/head/; revision=263152
* The r48589 promised to remove implicit inclusion of if_var.h soon. PrepareGleb Smirnoff2013-10-261-0/+1
| | | | | | | | | | | to this event, adding if_var.h to files that do need it. Also, include all includes that now are included due to implicit pollution via if_var.h Sponsored by: Netflix Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=257176
* Use queue(9) instead of hand-crafted link lists for the global netatalkRobert Watson2009-06-241-5/+3
| | | | | | | | | | address list. Generally follow the style and convention of similar parts in netinet. MFC after: 6 weeks Notes: svn path=/head/; revision=194913
* Add a global rwlock, at_ifaddr_rw, to protect the global netatalkRobert Watson2009-06-221-21/+25
| | | | | | | | | | | | | | | | address lists, at_ifaddr_list. Acquire the lock, and use ifaddr refcounts where necessary, to close most known address-related races in netatalk. Annotate one potential race in at_control() where we acquire an ifaddr reference, drop the global lock, and scrub the address from the ifnet before re-acquiring the global lock, which could allow for a writer-writer race. MFC after: 3 weeks Notes: svn path=/head/; revision=194619
* Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERICRobert Watson2009-06-051-2/+0
| | | | | | | | | | | and used in a large number of files, but also because an increasing number of incorrect uses of MAC calls were sneaking in due to copy-and-paste of MAC-aware code without the associated opt_mac.h include. Discussed with: pjd Notes: svn path=/head/; revision=193511
* Add internal 'mac_policy_count' counter to the MAC Framework, which is aRobert Watson2009-06-021-5/+1
| | | | | | | | | | | | | | | | | | | | | count of the number of registered policies. Rather than unconditionally locking sockets before passing them into MAC, lock them in the MAC entry points only if mac_policy_count is non-zero. This avoids locking overhead for a number of socket system calls when no policies are registered, eliminating measurable overhead for the MAC Framework for the socket subsystem when there are no active policies. Possibly socket locks should be acquired by policies if they are required for socket labels, which would further avoid locking overhead when there are policies but they don't require labeling of sockets, or possibly don't even implement socket controls. Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=193332
* Merge first in a series of TrustedBSD MAC Framework KPI changesRobert Watson2007-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | from Mac OS X Leopard--rationalize naming for entry points to the following general forms: mac_<object>_<method/action> mac_<object>_check_<method/action> The previous naming scheme was inconsistent and mostly reversed from the new scheme. Also, make object types more consistent and remove spaces from object types that contain multiple parts ("posix_sem" -> "posixsem") to make mechanical parsing easier. Introduce a new "netinet" object type for certain IPv4/IPv6-related methods. Also simplify, slightly, some entry point names. All MAC policy modules will need to be recompiled, and modules not updates as part of this commit will need to be modified to conform to the new KPI. Sponsored by: SPARTA (original patches against Mac OS X) Obtained from: TrustedBSD Project, Apple Computer Notes: svn path=/head/; revision=172930
* Clean up DDP layer netatalk code:Robert Watson2007-01-121-348/+288
| | | | | | | | | | | | - General style(9) cleanup -- white space, braces, line wraps, etc. - Annotate a lack of synchronization the global route cache if the input routine is invoked with parallelism. - Remove unused debugging code. Notes: svn path=/head/; revision=165974
* Break out my copyrights with our 2-clause BSD license from the UMichRobert Watson2007-01-081-2/+1
| | | | | | | | | copyright, which while similar, is different. MFC after: 3 days Notes: svn path=/head/; revision=165891
* Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.hRobert Watson2006-10-221-1/+2
| | | | | | | | | | | | | | | | begun with a repo-copy of mac.h to mac_framework.h. sys/mac.h now contains the userspace and user<->kernel API and definitions, with all in-kernel interfaces moved to mac_framework.h, which is now included across most of the kernel instead. This change is the first step in a larger cleanup and sweep of MAC Framework interfaces in the kernel, and will not be MFC'd. Obtained from: TrustedBSD Project Sponsored by: SPARTA Notes: svn path=/head/; revision=163606
* /* -> /*- for license, minor formatting changes, insert COPYRIGHT into filesWarner Losh2005-01-071-2/+2
| | | | Notes: svn path=/head/; revision=139827
* Correct a misspelling in a comment.Robert Watson2004-12-051-1/+1
| | | | Notes: svn path=/head/; revision=138390
* Acquire socket receive buffer mutex before appending and then waking upRobert Watson2004-12-051-2/+4
| | | | | | | | | a receive socket in DDP. This reduces the number of mutex operations required to deliver to a socket by two, and is the model used in other protocols. Notes: svn path=/head/; revision=138389
* Inline umich license from COPYRIGHT to make it clear what license theRobert Watson2004-08-101-4/+45
| | | | | | | | | | | | umich copyright is asserting. Clarify that the copyright I'm asserting is the standard Berkeley license. Remove Giant assertions from AARP and DDP input routines. Notes: svn path=/head/; revision=133422
* Procotol control block locking for netatalk DDP.Robert Watson2004-07-121-6/+12
| | | | Notes: svn path=/head/; revision=132043
* Socket MAC labels so_label and so_peerlabel are now protected byRobert Watson2004-06-131-0/+3
| | | | | | | | | | | | | | | | SOCK_LOCK(so): - Hold socket lock over calls to MAC entry points reading or manipulating socket labels. - Assert socket lock in MAC entry point implementations. - When externalizing the socket label, first make a thread-local copy while holding the socket lock, then release the socket lock to externalize to userspace. Notes: svn path=/head/; revision=130398
* Rename 'at_ifaddr' list to 'at_ifaddr_list' so that the variable isRobert Watson2004-03-221-3/+3
| | | | | | | more easily mechanically distinguished from 'struct at_ifaddr'. Notes: svn path=/head/; revision=127292
* Compare pointers with NULL rather than 0, or treating them as boolans inRobert Watson2004-03-221-2/+2
| | | | | | | | | | if statements. at_rmx gets a $FreeBSD$ out of the deal also (this code appears to be unused). Notes: svn path=/head/; revision=127291
* Also modify ddp_input.c with the following changes previously appliedRobert Watson2004-03-221-90/+90
| | | | | | | | | | | | | | | | | to other files in netatalk: Log: Since I have my hands all over netatalk adding locking and restructuring it, cinch the file's style closer to style(9) with regard to parenthesis: s/( /(/g s/ )/)/g s/return(/return (/g s/return 0/return (0)/ s/return 1/return (1)/ Notes: svn path=/head/; revision=127289
* Spell "(struct foo *)0" as "NULL".Robert Watson2004-03-211-7/+6
| | | | Notes: svn path=/head/; revision=127255
* o add a flags parameter to netisr_register that is used to specifySam Leffler2003-11-081-0/+3
| | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=122320
* Update netisr handling; Each SWI now registers its queue, and all queueJonathan Lemon2003-03-041-61/+26
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=111888
* Introduce experimental support for MAC in the AppleTalk/EtherTalk stack.Robert Watson2002-08-151-0/+10
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=101937
* Back out my lats commit of locking down a socket, it conflicts with hsu's work.Seigo Tanimura2002-05-311-2/+0
| | | | | | | Requested by: hsu Notes: svn path=/head/; revision=97658
* Lock down a socket, milestone 1.Seigo Tanimura2002-05-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-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. Notes: svn path=/head/; revision=95759
* Make `options NETATALK' compile after the -fno-common changes.Ian Dowse2002-01-161-2/+0
| | | | | | | Tested by: Emiel Kollof <coolvibe@hackerheaven.org> Notes: svn path=/head/; revision=89416
* Clean up some loose ends in the network code, including the X.25 and ISOPeter Wemm2000-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 Notes: svn path=/head/; revision=57178
* Move the *intrq variables into net/intrq.c and unconditionallyBrian Somers2000-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 Notes: svn path=/head/; revision=56555
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticArchie Cobbs1998-12-071-1/+0
| | | | | | | and local variables, goto labels, and functions declared but not defined. Notes: svn path=/head/; revision=41591
* spurious ntohs calls were stopping some packets from being recognisedJulian Elischer1998-06-051-6/+6
| | | | | | | | for what they are.. Taken from the netatalk mailing list. from a NetBSD user. Notes: svn path=/head/; revision=36658
* Fix various problems with netatalk kernel support.Julian Elischer1997-10-291-49/+146
| | | | | | | | | | | Some of these changes are a bit rough and will become more polished later. the changes to if_ethersubr should largely be moved to within the appletalk code, but that will happen later. A few of these were related to network-byteorder problems, and more were related to loopback failures. Notes: svn path=/head/; revision=30822
* Removed unused #includes.Bruce Evans1997-09-071-5/+0
| | | | Notes: svn path=/head/; revision=29188
* Staticicized.Bruce Evans1997-09-071-7/+5
| | | | Notes: svn path=/head/; revision=29185
* Fixed another sloppy common-style declaration (staticized it).Bruce Evans1997-09-071-0/+2
| | | | Notes: svn path=/head/; revision=29184
* Fixed sloppy common-style declarations.Bruce Evans1997-09-071-0/+2
| | | | Notes: svn path=/head/; revision=29182
* Updated #includes to 4.4Lite style.Bruce Evans1996-09-101-5/+5
| | | | Notes: svn path=/head/; revision=18207
* Submitted by: archie@whistle.comJulian Elischer1996-07-231-46/+5
| | | | | | | appletalk cleanups Notes: svn path=/head/; revision=17254
* Obtained from: netatalk distribution netatalk@itd.umich.eduJulian Elischer1996-05-241-0/+413
Kernel Appletalk protocol support both CAP and netatalk can make use of this.. still needs some owrk but it seemd the right tiime to commit it so other can experiment. Notes: svn path=/head/; revision=15885