summaryrefslogtreecommitdiffstats
path: root/sys/netatalk/aarp.c
Commit message (Collapse)AuthorAgeFilesLines
* Re-style aarp with style(9): normal plethora of white space, brace,rwatson2007-01-121-496/+483
| | | | | | | | | | etc, changes. Remove a small amount of #if !defined(__FreeBSD__) code. Add missing include guard for _NETATALK_AARP_H_. Remove unneeded (and conflicting) extern prototype for aarptfree().
* Break out my copyrights with our 2-clause BSD license from the UMichrwatson2007-01-081-2/+1
| | | | | | copyright, which while similar, is different. MFC after: 3 days
* Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.hrwatson2006-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
* - Store pointer to the link-level address right in "struct ifnet"ru2005-11-111-4/+5
| | | | | | | | | | rather than in ifindex_table[]; all (except one) accesses are through ifp anyway. IF_LLADDR() works faster, and all (except one) ifaddr_byindex() users were converted to use ifp->if_addr. - Stop storing a (pointer to) Ethernet address in "struct arpcom", and drop the IFP2ENADDR() macro; all users have been converted to use IF_LLADDR() instead.
* Catch up with IFP2ENADDR() type change (array -> pointer).ru2005-11-111-2/+1
|
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-06-101-5/+5
| | | | | | | | | | | | | | | | | | | | struct ifnet or the layer 2 common structure it was embedded in have been replaced with a struct ifnet pointer to be filled by a call to the new function, if_alloc(). The layer 2 common structure is also allocated via if_alloc() based on the interface type. It is hung off the new struct ifnet member, if_l2com. This change removes the size of these structures from the kernel ABI and will allow us to better manage them as interfaces come and go. Other changes of note: - Struct arpcom is no longer referenced in normal interface code. Instead the Ethernet address is accessed via the IFP2ENADDR() macro. To enforce this ac_enaddr has been renamed to _ac_enaddr. - The second argument to ether_ifattach is now always the mac address from driver private storage rather than sometimes being ac_enaddr. Reviewed by: sobomax, sam
* When generating a phase II ARP lookup from aarpwhohas(), use arwatson2005-02-221-1/+1
| | | | | | non-sleeping mbuf allocation. MFC after: 1 week
* Convert the aa_ifaddr timeout to a callout, and run the aarprobe calloutrwatson2005-02-221-9/+8
| | | | | | | MPSAFE. Acquire the aarptab_mtx to make sure that the callout and msleep in the ioctl thread don't race. MFC after: 1 week
* /* -> /*- for license, minor formatting changes, insert COPYRIGHT into filesimp2005-01-071-2/+2
|
* Inline umich license from COPYRIGHT to make it clear what license therwatson2004-08-101-3/+47
| | | | | | | | | 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.
* Remove 'Not used' comment: at_org_code is used, just not in netatalk/.rwatson2004-07-121-3/+0
|
* This commit does two things:luigi2004-04-251-36/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. rt_check() cleanup: rt_check() is only necessary for some address families to gain access to the corresponding arp entry, so call it only in/near the *resolve() routines where it is actually used -- at the moment this is arpresolve(), nd6_storelladdr() (the call is embedded here), and atmresolve() (the call is just before atmresolve to reduce the number of changes). This change will make it a lot easier to decouple the arp table from the routing table. There is an extra call to rt_check() in if_iso88025subr.c to determine the routing info length. I have left it alone for the time being. The interface of arpresolve() and nd6_storelladdr() now changes slightly: + the 'rtentry' parameter (really a hint from the upper level layer) is now passed unchanged from *_output(), so it becomes the route to the final destination and not to the gateway. + the routines will return 0 if resolution is possible, non-zero otherwise. + arpresolve() returns EWOULDBLOCK in case the mbuf is being held waiting for an arp reply -- in this case the error code is masked in the caller so the upper layer protocol will not see a failure. 2. arpcom untangling Where possible, use 'struct ifnet' instead of 'struct arpcom' variables, and use the IFP2AC macro to access arpcom fields. This mostly affects the netatalk code. === Detailed changes: === net/if_arcsubr.c rt_check() cleanup, remove a useless variable net/if_atmsubr.c rt_check() cleanup net/if_ethersubr.c rt_check() cleanup, arpcom untangling net/if_fddisubr.c rt_check() cleanup, arpcom untangling net/if_iso88025subr.c rt_check() cleanup netatalk/aarp.c arpcom untangling, remove a block of duplicated code netatalk/at_extern.h arpcom untangling netinet/if_ether.c rt_check() cleanup (change arpresolve) netinet6/nd6.c rt_check() cleanup (change nd6_storelladdr)
* Lock down the netatalk AARP code, which is responsible for appletalkrwatson2004-04-091-11/+30
| | | | | | | address discovery and caching (similar to inet ARP). Use a single global mutex, aarptab_mtx, to protect the table. Remove spl/spx. Tested by: Bob Bishop <rb@gid.co.uk>
* Rename 'at_ifaddr' list to 'at_ifaddr_list' so that the variable isrwatson2004-03-221-1/+1
| | | | more easily mechanically distinguished from 'struct at_ifaddr'.
* Compare pointers with NULL rather than 0, or treating them as boolans inrwatson2004-03-221-5/+5
| | | | | | | if statements. at_rmx gets a $FreeBSD$ out of the deal also (this code appears to be unused).
* Since I have my hands all over netatalk adding locking and restructuringrwatson2004-03-221-217/+217
| | | | | | | | | | 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)/
* Const-poison atmulticastaddr, which should be read but not modified.rwatson2004-03-131-9/+9
| | | | | | While there, remove (caddr_t) casting of ethernet addresses, which among other things discards the qualifier. This makes it clear that atmulticastaddr does not require synchronization.
* o add a flags parameter to netisr_register that is used to specifysam2003-11-081-0/+2
| | | | | | | | | | | | | | | | 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
* 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-291-0/+6
| | | | | 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-041-2/+3
| | | | | | | | | | 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-191-5/+5
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-5/+5
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Introduce experimental support for MAC in the AppleTalk/EtherTalk stack.rwatson2002-08-151-0/+8
| | | | | | | | | 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
* Fix warning; Extra tokens after #endifpeter2002-05-241-1/+1
|
* 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-211-2/+2
| | | | | | | | | | | | | | | | | | 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.
* 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.
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-271-1/+1
| | | | kernel compile
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticarchie1998-12-071-1/+0
| | | | and local variables, goto labels, and functions declared but not defined.
* Staticize.eivind1998-02-091-3/+3
|
* Make the debug options new-style.eivind1998-01-311-2/+4
| | | | | This also zaps a DPT option from lint; it wasn't referenced from anywhere.
* Fix various problems with netatalk kernel support.julian1997-10-291-27/+18
| | | | | | | | 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.
* Update for new callout interface.gibbs1997-09-211-5/+8
|
* Removed unused #includes.bde1997-09-071-9/+4
|
* Fixed the type of timeout functions and removed casts that hid thebde1997-04-201-3/+4
| | | | type mismatches. There was no problem in practice (at least on 386's).
* Convert the interface address and IP interface address structureswollman1996-12-131-13/+14
| | | | | | to TAILQs. Fix places which referenced these for no good reason that I can see (the references remain, but were fixed to compile again; they are still questionable).
* Massively COMMENT at_control.cjulian1996-08-291-2/+15
| | | | | | | | | and fix some bugs.. also fix a bug in aarp.c that didn't take netranges into account. default routes now work with appletalk, which is a poor-man's way of being able to access netranges if you only have one network :) Hopefully the full netranges fix will happen soon.
* Submitted by: archie@whistle.comjulian1996-07-231-211/+6
| | | | appletalk cleanups
* Obtained from: netatalk distribution netatalk@itd.umich.edujulian1996-05-241-0/+816
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.
OpenPOWER on IntegriCloud