aboutsummaryrefslogtreecommitdiff
path: root/sys/net
Commit message (Collapse)AuthorAgeFilesLines
* Track if_i{bytes,packets,errors}.Matthew N. Dodd2000-02-161-0/+4
| | | | | | | Approved by: jkh Notes: svn path=/head/; revision=57250
* Clean up some loose ends in the network code, including the X.25 and ISOPeter Wemm2000-02-137-390/+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
* Update bridging code to the one already in -stable (this wasLuigi Rizzo2000-02-082-189/+370
| | | | | | | | | forgotten some time ago...). Approved-by: jordan Notes: svn path=/head/; revision=57052
* m_pullup() frees the supplied mbuf on failure; we don't need to tryMatthew N. Dodd2000-02-071-5/+3
| | | | | | | | | | and do this ourselves. Approved by: jkh Noticed by: Mike Spengler <mks@networkcs.com> Notes: svn path=/head/; revision=57020
* Make sure that the entire header is in the first mbuf before weMatthew N. Dodd2000-02-031-2/+14
| | | | | | | | | | | | | | | | | | attempt to copy the ethernet header forward and otherwise encapsulate a packet for output. This fixes the panic when using VLAN devices on hardware that doesn't do 802.1Q tagging onboard. (That is to say, all drivers except the Tigon.) My tests consisted of telnet, ttcp, and a pingflood of packets between 1 and 1600 (plus headers) bytes. MFC to follow in 1 week. Approved by: jkh Notes: svn path=/head/; revision=56970
* Add workaround for fxp issue at interface initialization with IPv6.Yoshinobu Inoue2000-02-011-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Some LAN card chip for fxp is known to cause problem at interface initialization with IPv6 enabled. It happens at some delicate timing. And also, just adding some DELAY before IPv6 address autoconfiguration is known to avoid the problem. Complete fix is changing the driver not to use interrupt at multicast filter initialization, but trying such change in this stage will be dangerous. So I add some DELAY() only inside #ifdef INET6 part, as temporal workaround only for 4.0. Approbed by: jkh Noticed by: Mattias Pantzare <pantzer@ludd.luth.se> Obtained from: openbsd-tech mailing list Notes: svn path=/head/; revision=56938
* Remove #if NGIF > 0 and #if NFAITH > 0 as config already checks this.Peter Wemm2000-01-292-5/+0
| | | | Notes: svn path=/head/; revision=56868
* Remove some #if NFOO > 0 that are always true because of config rules.Peter Wemm2000-01-296-18/+2
| | | | Notes: svn path=/head/; revision=56856
* Fix this so LINT compiles. There is no way this could have worked ifPeter Wemm2000-01-291-5/+5
| | | | | | | | | tested with LINT. I've put back netatm/kern_include.h and maked it with a fixme!, otherwise NETISR_ATM isn't defined as ATM_KERNEL isn't defined. Defining that exposes a whole bunch of other dependencies.. :-( Notes: svn path=/head/; revision=56844
* Remove unused includesBrian Somers2000-01-291-7/+0
| | | | Notes: svn path=/head/; revision=56777
* Count AF_INET6 attachement to routing socket.Yoshinobu Inoue2000-01-281-0/+6
| | | | | | | Obtained from: KAME project Notes: svn path=/head/; revision=56761
* Redo the intrq.c idea asBrian Somers2000-01-273-131/+68
| | | | | | | int family_enqueue(sa_family_t, struct mbuf *); Notes: svn path=/head/; revision=56703
* Move the *intrq variables into net/intrq.c and unconditionallyBrian Somers2000-01-243-21/+168
| | | | | | | | | | | | | | 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
* Notify user processes about interface's MTU change.Ruslan Ermilov2000-01-241-1/+3
| | | | | | | Reviewed by: wollman, freebsd-net Notes: svn path=/head/; revision=56517
* Allow if_ef driver to be compiled into kernel.Boris Popov2000-01-231-0/+1
| | | | Notes: svn path=/head/; revision=56424
* Implement TUN[GS]IFHEAD ioctls. Passing a non-zero int to TUNSIFHEADBrian Somers2000-01-233-39/+140
| | | | | | | | | | | | | | tells that tun unit to prepend a four byte address family to packets queued for tunread() and to expect a four byte address family at the front of data received by tunwrite(). We queue any protocol received from the interface for tunread(), but only accept INET, INET6, IPX and NETATALK from tunwrite(). There is support for Xerox's NS stuff, but AFAICT config(8) doesn't ever define NS. Notes: svn path=/head/; revision=56410
* Add a new TUNSIFPID ioctl to update the tun_pid (recorded inBrian Somers2000-01-212-0/+4
| | | | | | | tunopen) with the current pid. Notes: svn path=/head/; revision=56349
* |The hard limit for the BPF buffer size is 32KB, which appears too lowPoul-Henning Kamp2000-01-152-3/+6
| | | | | | | | | | | | | | | | |for high speed networks (even at 100Mbit/s this corresponds to 1/300th |of a second). The default buffer size is 4KB, but libpcap and ipfilter |both override this (using the BIOCSBLEN ioctl) and allocate 32KB. | |The following patch adds an sysctl for bpf_maxbufsize, similar to the |one for bpf_bufsize that you added back in December 1995. I choose to |make the default for this limit 512KB (the value suggested by NFR). Submitted by: se Reviewed by: phk Notes: svn path=/head/; revision=56057
* Clear ro->ro_rt just after RTFREE().Yoshinobu Inoue2000-01-151-0/+1
| | | | | | | | | | | | Pleases let me make sure that no one touch the invalid ro_rt pointer, after splx(s) and before next ro_rt initialization. Though usually this seems to be already called at splnet, I still sometime experience kernel crash at rtfree() in my INET6 enabled environment where IPv6 connection is frequently used. (Off-course, it might be just due to another bug.) Notes: svn path=/head/; revision=56030
* cosmetic change: sort function prototypesYoshinobu Inoue2000-01-151-27/+27
| | | | | | | Specified by: bde Notes: svn path=/head/; revision=56014
* -K&R fix for some prototype declarationYoshinobu Inoue2000-01-151-4/+4
| | | | | | | | | -fix some comments for #endif to match them with their #ifndef Submitted by: bde Notes: svn path=/head/; revision=56013
* Attempt to fix a problem with receiving packets on USB ethernet interfaces.Bill Paul2000-01-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Packets are received inside USB bulk transfer callbacks, which run at splusb() (actually splbio()). The packet input queues are meant to be manipulated at splimp(). However the locking apparently breaks down under certain circumstances and the input queues can get trampled. There's a similar problem with if_ppp, which is driven by hardware/tty interrupts from the serial driver, but which must also manipulate the packet input queues at splimp(). The fix there is to use a netisr, and that's the fix I used here. (I can hear you groaning back there. Hush up.) The usb_ethersubr module maintains a single queue of its own. When a packet is received in the USB callback routine, it's placed on this queue with usb_ether_input(). This routine also schedules a soft net interrupt with schednetisr(). The ISR routine then runs later, at splnet, outside of the USB callback/interrupt context, and passes the packet to ether_input(), hopefully in a safe manner. The reason this is implemented as a separate module is that there are a limited number of NETISRs that we can use, and snarfing one up for each driver that needs it is wasteful (there will be three once I get the CATC driver done). It also reduces code duplication to a certain small extent. Unfortunately, it also needs to be linked in with the usb.ko module in order for the USB ethernet drivers to share it. Also removed some uneeded includes from if_aue.c and if_kue.c Fix suggested by: peter Not rejected as a hairbrained idea by: n_hibma Notes: svn path=/head/; revision=55789
* Remove BROADCAST flag from faith interface,Yoshinobu Inoue2000-01-091-2/+2
| | | | | | | | | | -it not seems to be necessary -to avoid dhcp messages or something like that sent to faith interface The problem reported by: Jim Bloom <bloom@acm.org> Notes: svn path=/head/; revision=55633
* Prevent kernel panic at ifconfig up after Note PC resume.Yoshinobu Inoue1999-12-301-3/+22
| | | | | | | | Submitted by: imp, kuriyama Reviewed by: imp Notes: svn path=/head/; revision=55276
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"Peter Wemm1999-12-2923-58/+54
| | | | | | | | | 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. Notes: svn path=/head/; revision=55205
* Make cloning mask sockaddr (genmask) possible.Ruslan Ermilov1999-12-281-1/+2
| | | | | | | | PR: kern/3061 Reviewed by: wollman Notes: svn path=/head/; revision=55178
* IPSEC support in the kernel.Yoshinobu Inoue1999-12-222-2/+4
| | | | | | | | | | | pr_input() routines prototype is also changed to support IPSEC and IPV6 chained protocol headers. Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project Notes: svn path=/head/; revision=55009
* M_PREPEND-related cleanups (unregisterifying struct mbuf *s).Brian Feldman1999-12-193-9/+6
| | | | Notes: svn path=/head/; revision=54799
* Fix a broken macro usage. It had no semicolon.Brian Feldman1999-12-181-1/+1
| | | | | | | Noticed by: eivind Notes: svn path=/head/; revision=54796
* Two more fixes to if_detach. These are generic to all interfaces andWarner Losh1999-12-171-2/+63
| | | | | | | | | | | | do not pollute the interface further. o Run if_detach at splnet(). o Creatively swipe the relevant parts of the netatm atm_nif_detach which will delete the relevant references to the interface going away. Notes: svn path=/head/; revision=54728
* Bring up an if_ef driver which allows support for four ethernetBoris Popov1999-12-132-1/+612
| | | | | | | | | | frame types. Currently it supports only IPX protocol and doesn't affect existing functionality when not loaded. Reviewed by: Ollivier Robert <roberto@keltia.freenix.fr> Notes: svn path=/head/; revision=54558
* Allow ifunit() routine to understand names like ed0f2. AlsoBoris Popov1999-12-131-31/+26
| | | | | | | | | fix a bug caused by using bcmp() instead of strcmp(). Reviewed by: Garrett Wollman <wollman@khavrinen.lcs.mit.edu> Notes: svn path=/head/; revision=54557
* The current code incorrectly assumes that all vlansJordan K. Hubbard1999-12-132-5/+4
| | | | | | | | | | | | are configured, and/or associated with a parent device. If you receive a frame for a VLAN that's not in the list, you walk off the end of the list. Boom. Submitted by: C. Stephen Gunn <csg@waterspout.com> PR: 15291 Notes: svn path=/head/; revision=54531
* sys/net/if_vlan.c fails to maintain the IFF_RUNNING flag on theJordan K. Hubbard1999-12-131-2/+3
| | | | | | | | | | | vlan interfaces it manages. This prevents the interface from actually sending or receiving data. Submitted by: C. Stephen Gunn <csg@waterspout.com> PR: 15290 Notes: svn path=/head/; revision=54530
* Add some gross ad-hock hacks to increase stability of if_detach:Warner Losh1999-12-101-2/+17
| | | | | | | | | | | | | | | | o be more careful about clearing addresses (this isn't a kludge) o For AF_INET interfaces, call SIOCDIFFADDR to remove last(?) bit of cruft. Special cases for AF_INET shouldn't be here, but I didn't see a good generic way of doing this. If I missed something, please let me know. This gross hack makes pccard ejection stable for ethernet cards. Submitted by: Atushi Onoe-san Notes: svn path=/head/; revision=54410
* Fix a route table leak in rtalloc() and rtalloc_ign(). It isJohn Polstra1999-12-091-5/+12
| | | | | | | | | | | | | | | | | possible for ro->ro_rt to be non-NULL even though the RTF_UP flag is cleared. (Example: a routing daemon or the "route" command deletes a cloned route in active use by a TCP connection.) In that case, the code was clobbering a reference to the routing table entry without decrementing the entry's reference count. The splnet() call probably isn't needed, but I haven't been able to prove that yet. It isn't significant from a performance standpoint since it is executed very rarely. Reviewed by: wollman and others in the freebsd-current mailing list Notes: svn path=/head/; revision=54369
* rtcalloc() is removed because it turned out not to be necessary for FreeBSD.Yoshinobu Inoue1999-12-092-11/+0
| | | | | | | | | (It was added as a part of KAME patch) Specified by: jdp@polstra.com Notes: svn path=/head/; revision=54350
* udp IPv6 support, IPv6/IPv4 tunneling support in kernel,Yoshinobu Inoue1999-12-0710-11/+620
| | | | | | | | | | | | | packet divert at kernel for IPv6/IPv4 translater daemon This includes queue related patch submitted by jburkhol@home.com. Submitted by: queue related patch from jburkhol@home.com Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project Notes: svn path=/head/; revision=54263
* Make the stub routines have the same prototypes as the real bpfJulian Elischer1999-12-031-1/+1
| | | | | | | routines. Notes: svn path=/head/; revision=54075
* Add 'const' to the bpf_filter() and bpf_validate() prototypes.Archie Cobbs1999-12-022-7/+5
| | | | | | | Remove a stale comment from bpf_validate(). Notes: svn path=/head/; revision=54038
* Add two new generic control messages, NGM_ASCII2BINARY andArchie Cobbs1999-11-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | NGM_BINARY2ASCII, which convert control messages to ASCII and back. This allows control messages to be sent and received in ASCII form using ngctl(8), which makes ngctl a lot more useful. This also allows all the type-specific debugging code in libnetgraph to go away -- instead, we just ask the node itself to do the ASCII translation for us. Currently, all generic control messages are supported, as well as messages associated with the following node types: async, cisco, ksocket, and ppp. See /usr/share/examples/netgraph/ngctl for an example of using this. Also give ngctl(8) the ability to print out incoming data and control messages at any time. Eventually nghook(8) may be subsumed. Several other misc. bug fixes. Reviewed by: julian Notes: svn path=/head/; revision=53913
* Expand the field width for subtypes. We had already overflowed itJulian Elischer1999-11-241-3/+5
| | | | | | | | | | | by 2 with people just adding numbers on the end of the ethernet subtypes. We now have an additional 14 subtypes available in ethernet. Use one of them immediatly for homePNA. Reviewed by: Garrett Wollman <wollman@khavrinen.lcs.mit.edu> Notes: svn path=/head/; revision=53649
* Only emit the ``wrong ifa'' message if the matching interfaceBrian Somers1999-11-231-3/+5
| | | | | | | | | | | | | | | | | | | is neither IFF_LOOPBACK or IFF_POINTOPOINT. It's quite common (and probably more correct) to route local IP numbers via lo0 and it makes configuration easier to assign the hostname address to local POINTOPOINT links too. This message usually remains hidden because the loopback interface gets the highest interface number at boot time, but when the ethernet interface is added later, the message can get pretty annoying. Also, fix a typo. Not objected to by: freebsd-net Notes: svn path=/head/; revision=53647
* KAME netinet6 basic part(no IPsec,no V6 Multicast Forwarding, no UDP/TCPYoshinobu Inoue1999-11-229-67/+946
| | | | | | | | | | | | | for IPv6 yet) With this patch, you can assigne IPv6 addr automatically, and can reply to IPv6 ping. Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project Notes: svn path=/head/; revision=53541
* Add some more comments to the sl_compress_tcp() function.Archie Cobbs1999-11-151-2/+9
| | | | Notes: svn path=/head/; revision=53192
* YUCK!Julian Elischer1999-11-151-2/+2
| | | | | | | | m_prepend doesn't fix m_pkthdr.len, use M_PREPEND instead, which does.. (Netgraph only) Notes: svn path=/head/; revision=53171
* Fix screwup on synthesising incoming ethernet header in Netgraph mode.Julian Elischer1999-11-141-2/+3
| | | | | | | Submitted by: brian@freebsd.org Notes: svn path=/head/; revision=53144
* Set the queue length.Poul-Henning Kamp1999-11-121-0/+1
| | | | Notes: svn path=/head/; revision=53115
* Oops forgot to put the source MAC address on outgoing packets!Julian Elischer1999-11-111-1/+3
| | | | Notes: svn path=/head/; revision=53099
* KAME related header files additions and merges.Yoshinobu Inoue1999-11-056-7/+59
| | | | | | | | | | (only those which don't affect c source files so much) Reviewed by: cvs-committers Obtained from: KAME project Notes: svn path=/head/; revision=52904