summaryrefslogtreecommitdiffstats
path: root/sys/netatm
Commit message (Collapse)AuthorAgeFilesLines
* Introduce a MAC label reference in 'struct inpcb', which cachesrwatson2003-11-182-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Include <sys/malloc.h> for the declaration of malloc(), etc. insteadbde2003-11-141-3/+5
| | | | | | of depending on namespace pollution 2 layers deep in <vm/uma.h>. Fixed most nearby include messes (another like this, several the opposite of this, and some formatting).
* o add a flags parameter to netisr_register that is used to specifysam2003-11-081-1/+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
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-10-318-30/+22
| | | | | | | | | | | | | 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)
* The number of prefixes can never be negative so use an u_int for this.harti2003-07-291-1/+1
|
* Make the ioctl() interface cleaner with regard to types: use size_tharti2003-07-2911-46/+54
| | | | | | instead of int where the variable has to hold buffer lengths, use u_int for things like number of network interfaces which in principle can never be negative.
* Silence a gcc-warning. Do this by inlining the macro-call. This isharti2003-07-261-2/+1
| | | | | not very nice - the compiler should just silently optimize away the unused else clause.
* Print the offending SPANS message only if printing is enabled.harti2003-07-251-1/+2
|
* Add support for VBR and CBR PVCs for IP over ATM.harti2003-07-255-6/+205
| | | | | Submitted by: Vincent Jardin <vjardin@wanadoo.fr> MFC after: 2 weeks
* Set the interface type of the network interfaces to IFT_IPOVERATM(114).harti2003-07-251-1/+1
| | | | This is specified by RFC2320.
* Hand the packet to bpf not only in the LLC/SNAP case, but for allharti2003-07-252-13/+13
| | | | | | | connections. While this confuses tcpdump, it enables other applications to see and analyze non-IP traffic (signalling, for example). Pointed out by: Vincent Jardin <vjardin@wanadoo.fr>
* Make the debugging variable that controls printing of UNI messagesharti2003-07-255-15/+29
| | | | | | | accessible as a sysctl and move the debugging stuff out of DIAGNOSTICS. Submitted by: Vincent Jardin <vjardin@wanadoo.fr> MFC after: 2 weeks
* Make the debugging variable that controls dumping of IP over ATM packetsharti2003-07-244-10/+19
| | | | | | | accessible as a sysctl. Submitted by: Vincent Jardin <vjardin@wanadoo.fr> MFC after: 2 weeks
* Create a sysctl that allows to enable/disable printing of SPANS messages.harti2003-07-243-17/+15
| | | | | | | While here delete to sys/types.h includes when sys/param.h is also included. Submitted by: Vincent Jardin <vjardin@wanadoo.fr> MFC after: 2 weeks
* Free the UNI vcc to the same zone from where it was allocated from.harti2003-07-242-3/+3
| | | | This resulted in a panic when detaching the uni31 signalling manager.
* Now that we have if_detach() don't try to get rid of all the interfaceharti2003-07-241-95/+5
| | | | | | | stuff (routes, ...) by hand - simply use if_detach(). Submitted by: Vincent Jardin <vjardin@wanadoo.fr> MFC after: 2 week
* Create a subtree 'harp' of the net sysctl tree. This uses a fixedharti2003-07-243-3/+31
| | | | | | | | | OID as the other protocol family sub-trees do, that is equal to the protocol family identifier. Make the ATM layer debugging flags available under this tree. Submitted by: Vincent Jardin <vjardin@wanadoo.fr> MFC after: 2 weeks
* Constify the arguments to several pdu_print functions.harti2003-07-249-33/+18
|
* Add BPF support to HARP network interfaces. This allows one to seeharti2003-07-243-0/+37
| | | | | | | | the traffic on LLC multiplexed connections (like CLIP). PR: kern/51831 Submitted by: Vincent Jardin <vjardin@wanadoo.fr> MFC after: 2 weeks
* Handle the new MEDIA definitions.harti2003-07-231-0/+9
|
* Convert a lot of uma_zalloc() calls to be NOWAIT instead of WAITOK. Allharti2003-07-239-30/+48
| | | | | these may be called from contexts where we cannot sleep (callout handlers for example).
* Get rid of the zone for network interfaces. We have converted this toharti2003-07-231-7/+0
| | | | use malloc(9).
* Allocate network interfaces from malloc() instead of using a zone.harti2003-07-221-6/+6
| | | | | Usually one needs only a couple of them so using a zone is waste of memory (esp. on multi-cpu systems).
* Remove the zone limits for all the zones used in the ATM code.harti2003-07-2213-21/+14
| | | | | | | | | | | These were a left over from when the private memory pools were converted to use uma zones. The limit of UMA zones, however, works differently. When a zone is limited to only one or two pages than, on multi-cpu systems, processes can get stuck on the zonelimit, because all remaining free items are in caches of other CPUs. Also add rudimentary error handling in some places (panic) when a zone cannot be created.
* Add several vendor, API and media definitions. This has beenharti2003-07-221-5/+27
| | | | forgotten in the previous commit to harp and should unbreak world.
* Fix a number of occurences of calling uma_zalloc() with neitherharti2003-07-182-13/+13
| | | | M_WAITOK nor M_NOWAIT.
* Use __FBSDID().obrien2003-06-1136-355/+108
|
* Use __FBSDID().obrien2003-06-119-81/+26
|
* Use __FBSDID().obrien2003-06-112-19/+6
|
* Use __FBSDID().obrien2003-06-1116-155/+48
|
* Use __FBSDID rather than rcsid[].obrien2003-04-031-9/+3
|
* Update netisr handling; Each SWI now registers its queue, and all queuejlemon2003-03-044-49/+30
| | | | | | | | | | 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
* There is no reason to be cute with ntohl(). Just call it directly ratherobrien2003-02-235-22/+8
| | | | | | than use a macro that tries to do conversions in place. Compile tested on: sparc64
* Back out M_* changes, per decision of the TRB.imp2003-02-1922-71/+71
| | | | Approved by: trb
* Band-XXX-aid an easy to provoke panic.phk2003-01-281-0/+7
| | | | MFC: 2 weeks
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-2123-83/+83
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,schweikh2003-01-013-3/+3
| | | | especially in troff files.
* Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/schweikh2002-12-303-5/+5
| | | | Add FreeBSD Id tag where missing.
* Correct mbuf packet header propagation. Previously, packet headerssam2002-12-301-2/+1
| | | | | | | | | | | | | | | | | | | | | | were sometimes propagated using M_COPY_PKTHDR which actually did something between a "move" and a "copy" operation. This is replaced by M_MOVE_PKTHDR (which copies the pkthdr contents and "removes" it from the source mbuf) and m_dup_pkthdr which copies the packet header contents including any m_tag chain. This corrects numerous problems whereby mbuf tags could be lost during packet manipulations. These changes also introduce arguments to m_tag_copy and m_tag_copy_chain to specify if the tag copy work should potentially block. This introduces an incompatibility with openbsd which we may want to revisit. Note that move/dup of packet headers does not handle target mbufs that have a cluster bound to them. We may want to support this; for now we watch for it with an assert. Finally, M_COPYFLAGS was updated to include M_FIRSTFRAG|M_LASTFRAG. Supported by: Vernier Networks Reviewed by: Robert Watson <rwatson@FreeBSD.org>
* Indirectly pull in declaration for M_IFADDR.hsu2002-12-281-0/+1
|
* SMP locking for radix nodes.hsu2002-12-241-0/+2
|
* SMP locking for ifnet list.hsu2002-12-222-0/+5
|
* - Change the ATM stack functions to use intptr_t instead of int for opaquejhb2002-11-0831-202/+205
| | | | | | | arguments. - Fix a few other places that assumed that sizeof(int) == sizeof(void *). Reviewed by: mdodd
* Add a field to struct cmn_unit to hold a pointer to the driver's softc.mdodd2002-10-011-0/+2
|
* Include <sys/systm.h> instead of depending on namespace pollution inbde2002-09-292-16/+2
| | | | | <net/if_var.h>. But depend on the standard pollution in <sys/param.h>. Removed unused includes.
* Include <sys/systm.h> instead of depending on namespace pollution inbde2002-09-291-2/+1
| | | | <net/if_var.h>. But depend on the standard pollution in <sys/param.h>.
* Make netatm/spans compile in the kernel without depending on userlandpeter2002-09-174-4/+381
| | | | include files to provide functions for kernel source (spans_kxdr.c)
* Replace various spelling with FALLTHROUGH which is lint()ablecharnier2002-08-251-1/+1
|
* Increase size of ifnet.if_flags from 16 bits (short) to 32 bits (int). To avoidsobomax2002-08-181-1/+1
| | | | | | | breaking application ABI use unused ifreq.ifru_flags[1] for upper 16 bits in SIOCSIFFLAGS and SIOCGIFFLAGS ioctl's. Reviewed by: -hackers, -net
* - Remove UM_* user land memory macros since they are no longer used.arr2002-06-241-17/+1
|
OpenPOWER on IntegriCloud