summaryrefslogtreecommitdiffstats
path: root/sys/net
Commit message (Collapse)AuthorAgeFilesLines
* Define a link layer MIB for ATM. Most fields of this MIB are needed byharti2003-05-052-0/+63
| | | | | | ILMI daemons. Factor out common softc fields for all ATM interfaces that need to be externally visible into an ifatm structure and make the midway driver using this structure and fill the MIB.
* Back out rev 1.146 -- it broke the LINT build.obrien2003-05-051-1/+1
| | | | We are about to enter the 5.1 code freeze and things must be buildable.
* Fix some easy, global, lint warnings. In most cases, this meansmarkm2003-04-302-2/+2
| | | | | making some local variables static. In a couple of cases, this means removing an unused variable.
* Add media types and options for ATM. While on most ATM cards media cannotharti2003-04-292-0/+63
| | | | | | | | be changed, it is very convenient to be able to toggle SDH/Sonet, idle/unassigned cells and scrambled mode and to see the carrier state. Reviewed by: -arch (if_media.h definitions)
* Add module data and version to the atm_subr and reference this info from theharti2003-04-292-1/+26
| | | | | | | | | | | | | | | | (currently) only consumer (en). Add a sysctl node hw.atm where the atm drivers will hook on their hardware sysctl sub-trees. Make atm_ifattach call if_attach and remove the corresponding call to if_attach from en. Create atm_ifdetach and use that in en. While the last change actually changes the interface this is not a problem in practice because the only other consumer of this API is an older LANAI driver on the net, that is not ready for current anyway. Reviewed by: -atm
* o add support for multi-mode devices like 802.11 wireless cards that supportsam2003-04-283-40/+80
| | | | | | | | | 11a/b/g by adding an optional 3-bit mode field o correct the spelling of OFDM (was ODFM) o add an 802.11 subtype option for turbo mode: the phy is clocked at 2x the normal clock rate; note this can be applied to both OFDM in 11a and OFDM in 11g mode (and possibly DS11 in 11b for certain phy's) o add 802.11 CCK aliases for 11b/11g rates--the more common terminology
* Tweak to previous commit: increment ifp->if_iqdrops if the m_copy() fails.archie2003-04-231-1/+2
| | | | Suggested by: Neelkanth Natu <neelnatu@yahoo.com>
* Fix a case where the return value from m_copy() was not being checkedarchie2003-04-231-6/+6
| | | | | | | for NULL before proceeding, causing a crash if mbufs were exhausted. MFC after: 3 days Reported by: Mark Gooderum <mark@verniernetworks.com>
* Move MAC label storage for mbufs into m_tags from the m_pkthdr structure,rwatson2003-04-141-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | returning some additional room in the first mbuf in a chain, and avoiding feature-specific contents in the mbuf header. To do this: - Modify mbuf_to_label() to extract the tag, returning NULL if not found. - Introduce mac_init_mbuf_tag() which does most of the work mac_init_mbuf() used to do, except on an m_tag rather than an mbuf. - Scale back mac_init_mbuf() to perform m_tag allocation and invoke mac_init_mbuf_tag(). - Replace mac_destroy_mbuf() with mac_destroy_mbuf_tag(), since m_tag's are now GC'd deep in the m_tag/mbuf code rather than at a higher level when mbufs are directly free()'d. - Add mac_copy_mbuf_tag() to support m_copy_pkthdr() and related notions. - Generally change all references to mbuf labels so that they use mbuf_to_label() rather than &mbuf->m_pkthdr.label. This required no changes in the MAC policies (yay!). - Tweak mbuf release routines to not call mac_destroy_mbuf(), tag destruction takes care of it for us now. - Remove MAC magic from m_copy_pkthdr() and m_move_pkthdr() -- the existing m_tag support does all this for us. Note that we can no longer just zero the m_tag list on the target mbuf, rather, we have to delete the chain because m_tag's will already be hung off freshly allocated mbuf's. - Tweak m_tag copying routines so that if we're copying a MAC m_tag, we don't do a binary copy, rather, we initialize the new storage and do a deep copy of the label. - Remove use of MAC_FLAG_INITIALIZED in a few bizarre places having to do with mbuf header copies previously. - When an mbuf is copied in ip_input(), we no longer need to explicitly copy the label because it will get handled by the m_tag code now. - No longer any weird handling of MAC labels in if_loop.c during header copies. - Add MPC_LOADTIME_FLAG_LABELMBUFS flag to Biba, MLS, mac_test. In mac_test, handle the label==NULL case, since it can be dynamically loaded. In order to improve performance with this change, introduce the notion of "lazy MAC label allocation" -- only allocate m_tag storage for MAC labels if we're running with a policy that uses MAC labels on mbufs. Policies declare this intent by setting the MPC_LOADTIME_FLAG_LABELMBUFS flag in their load-time flags field during declaration. Note: this opens up the possibility of post-boot policy modules getting back NULL slot entries even though they have policy invariants of non-NULL slot entries, as the policy might have been loaded after the mbuf was allocated, leaving the mbuf without label storage. Policies that cannot handle this case must be declared as NOTLATE, or must be modified. - mac_labelmbufs holds the current cumulative status as to whether any policies require mbuf labeling or not. This is updated whenever the active policy set changes by the function mac_policy_updateflags(). The function iterates the list and checks whether any have the flag set. Write access to this variable is protected by the policy list; read access is currently not protected for performance reasons. This might change if it causes problems. - Add MAC_POLICY_LIST_ASSERT_EXCLUSIVE() to permit the flags update function to assert appropriate locks. - This makes allocation in mac_init_mbuf() conditional on the flag. Reviewed by: sam Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* No need to unlock if error detected before locking.hsu2003-04-131-2/+4
| | | | Submitted by: harti
* Introduce an M_ASSERTPKTHDR() macro which performs the very common taskdes2003-04-083-7/+5
| | | | | | | of asserting that an mbuf has a packet header. Use it instead of hand- rolled versions wherever applicable. Submitted by: Hiten Pandya <hiten@unixdaemons.com>
* Don't use ovbcopy(); use void * instead of char *.des2003-04-041-6/+3
|
* o netisr_queue() returns 1 on success and 0 on failure,maxim2003-03-271-1/+1
| | | | | | fix a typo (?) in rev. 1.90. PR: kern/50163
* - Use if_broadcastaddr from struct ifnet rather than relying onmdodd2003-03-212-3/+4
| | | | | | | extern 'etherbroadcastaddr'. - Make 'etherbroadcastaddr' static. Reviewed by: imp
* Assignment could be NULL, check.mdodd2003-03-211-1/+1
|
* Use td->td_ucred instead of td->td_proc->p_ucred.jhb2003-03-201-2/+2
|
* - Use IFP2AC().mdodd2003-03-162-5/+73
| | | | | | - Support IFF_MONITOR. - Borrow some consistency for if_input() routines from if_ethersubr.c. - Correct comments regarding fddi_input() that no longer apply.
* Fix whitespace issues.mdodd2003-03-151-20/+20
|
* Don't strip header from packets before input routine is called.mdodd2003-03-152-6/+27
|
* Use if_printf().mdodd2003-03-152-4/+3
|
* iso88025_ifattach() changes:mdodd2003-03-152-3/+22
| | | | | - Call if_attach(). - Conditionally call bpfattach() based on second function argument.
* - Style(9) changes.mdodd2003-03-151-4/+11
| | | | | | - Remove unneeded assignment. - Increment if_oerrors as per if_fddisubr.c. - Wrap ISO code with conditional.
* Stray } forgotten by manual merging.mdodd2003-03-151-1/+0
|
* - Remove stray ).mdodd2003-03-151-2/+6
| | | | | - Add missing breaks. - Add missing if_noproto++.
* Revert part of 1.37; use bcopy() like if_fddisubr.c.mdodd2003-03-151-3/+1
|
* - Increment ifp->if_noproto when appropriate.mdodd2003-03-151-11/+19
| | | | | - Use 'goto dropanyway' when appropriate. - Move dropanyway label out of switch for readability.
* Update interface statistics after MAC and IFF_UP|IFF_RUNNING checks.mdodd2003-03-151-6/+6
|
* - Adopt tests for (IFF_UP|IFF_RUNNING) and non local unicast packetsmdodd2003-03-151-5/+20
| | | | | in promiscuous mode from if_fddisubr.c. - Add comment to reduce diffs.
* Add MAC support.mdodd2003-03-151-0/+12
| | | | This is the same code that was added in 1.70 of if_fddisubr.c
* Use llc_control rather than llc_snap.control.mdodd2003-03-151-1/+1
|
* - Add comment.mdodd2003-03-151-2/+5
| | | | - Whitespace fixes.
* Reduce code differences.mdodd2003-03-153-19/+20
|
* Use ISO88025_ADDR_LEN where appropriate.mdodd2003-03-151-6/+6
|
* Don't use etherbroadcastaddr; use iso88025_broadcastaddr.mdodd2003-03-151-4/+6
|
* - Remove definition of senderr() from iso88025.h.mdodd2003-03-153-3/+3
| | | | - Use definition of senderr() from if_ethersubr.c.
* Some whitespace/style/readability changes.mdodd2003-03-151-16/+29
|
* Add iso88025_resolvemulti().mdodd2003-03-151-0/+87
| | | | Cribbed from net/if_fddisubr.c
* Fix formatting of iso88025_ifattach().mdodd2003-03-151-9/+9
|
* Re-order and prune includes.mdodd2003-03-152-17/+9
|
* Add module data and version.mdodd2003-03-152-0/+18
|
* s/llc_un.type_snap/llc_snap/gmdodd2003-03-151-9/+9
|
* Formatting and whitespace changes.mdodd2003-03-151-9/+9
|
* This corrects a longstanding endian bug in processing LLC/SNAP encodedharti2003-03-132-5/+5
| | | | | | | | | | | frames. A comment in if_atm.h suggests that both macros, that for extracting the ethertype and that for inserting it, handle their argument in host byte order. In fact, the inserting macro treated its argument as an opposite host order short and the calling code feeds it the result of htons(). This happens to work on i386, but fails on sparc. Make the macro use real host endianess. Reviewed by: kjc, atm@
* Pass the correct malloc flags to m_tag_alloc().mux2003-03-131-1/+1
|
* correct two more flag misuses; m_tag* use malloc flagssam2003-03-121-1/+1
|
* Note that MAJOR_AUTO is now the default if d_maj is not initialized. Thisphk2003-03-091-1/+0
| | | | | | | | is more robust and prevents the hijacking of /dev/console for the typical mistake. Remove unneeded MAJOR_AUTO uses, it is only needed explicitly now if the driver source has cross-branch compatibility to old releases.
* Discard the packet if the netisr queue is null instead of panicing, forjlemon2003-03-081-2/+8
| | | | the benefit of modules which are compiled differently than the kernel.
* Revert last change and insure the driver can support other address families.jlemon2003-03-081-0/+18
| | | | Pointed out by: ume, matusita
* The tun driver is INET only. Don't pretend to support other address families.jlemon2003-03-081-25/+0
| | | | Sponsored by: DARPA, NAI Labs
* Finish driving a stake through the heart of netns and the associatedpeter2003-03-059-162/+0
| | | | | | ifdefs scattered around the place - its dead Jim! The SMB stuff had stolen AF_NS, make it official.
OpenPOWER on IntegriCloud