Commit Graph

25 Commits

Author SHA1 Message Date
pooka
cac1c6e392 Don't bother asserting: if we create the thread without KTHREAD_MPSAFE,
it's not going to be MPSAFE.
2010-12-01 15:13:24 +00:00
pooka
1ff4490a1c Make interface support ifconfig {down,destroy} and generally make
it a little less eager to panic.
2010-11-15 20:23:11 +00:00
pooka
a500a55cf2 Make virtif a cloner so that it can be brough to life also with
"ifconfig create".  As previously, virt<n> interfaces with the
host's /dev/tap<n> (I guess it could be made explicit with
"ifconfig media", but leave it this way for now).
2010-10-19 19:19:41 +00:00
pooka
8a20e6b473 * improve diagnostic print
* deal with a tap quirk when it returns 0 bytes
2010-08-10 18:06:10 +00:00
joerg
936abdd9c5 Fix typo 2010-04-05 16:35:30 +00:00
joerg
58e867556f Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.
2010-04-05 07:19:28 +00:00
pooka
510a73e003 Introduce RUMP_COMPONENT. It behaves mostly like a simplified
module which is linked into the kernel and cannot be unloaded.
The main purpose is to get the proper constructors run and create
any /dev nodes necessary for said component.  Once more of the
kernel (e.g. networking stack and device drivers) are converted to
MODULE and devfs pops up from somewhere, rump components can be
retired.
2010-03-01 13:12:19 +00:00
pooka
b014350f7f Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client.  This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached.  However, callers of bpf can
now be modularized.

Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff.  ... and I'm not going to ponder the depths of unload
here.

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
2010-01-19 22:08:16 +00:00
pooka
29ca934b44 support bpf 2010-01-16 17:55:50 +00:00
pooka
d09e2773d0 "rumppriv" goes back to "rump" per internal interface naming change. 2009-10-14 18:18:53 +00:00
pooka
42972db848 Adjust rump sources for external/internal interfaces.
No functional change.
2009-10-14 17:29:19 +00:00
pooka
c8c66517fe Bump iovec lazy bum magic value to 32: nfsd likes to write mbufs
with 17 per chain (previous i'm-too-lazy-for-my-forloop value was
of course 16).
2009-10-12 02:25:44 +00:00
pooka
4f50c4bce3 work around tap bug: if /dev/tap<n> was previously non-blocking, newly
opened fd's will also be non-blocking.
(yeayea, i'll fix the kernel some day, but I don't want to reboot
my host OS now)
2009-09-16 13:29:42 +00:00
pooka
f731c31fa4 Use a bunch of weak symbols to determine which network components
are present.  This works in userspace as opposed relying in link
sets, which fail miserably.  Later, when the networking stack
becomes modularized, we can move to a dynamic scheme like with file
systems.

Also, this change allows us to do proper autoconfig, namely attach
the loopback interface iff it is present.
2009-05-28 00:02:16 +00:00
pooka
9523c2be23 Add a dummyif, which doesn't actually traffic any cargo, but since
it has no backend it can always be attached and is therefore
convenient for testing ifconfig.
2009-05-27 23:41:20 +00:00
pooka
9c2d055f86 Filter out ENETRESET from ether_ioctl() since we aren't interested
in multicast hugging.
2009-05-26 19:03:05 +00:00
pooka
06dceb4d08 * make interface creation open /dev/tapn for interface n
* create "unique" enaddr
* do send in async context
2009-03-27 13:46:34 +00:00
pooka
cc8bfe6c12 Fix a silly mistake: indubitably the struct ifnet pointer given to
ether_ifattach() should point to a struct ethercom.
2009-02-28 12:29:27 +00:00
pooka
51e345d0a5 decouple from host struct iovec 2009-02-26 00:59:31 +00:00
pooka
a768afd60b __KERNEL_RCSID 2008-12-18 00:24:12 +00:00
pooka
ce2bb4bac6 Add a prototype to allow this to build (will be moved to a better
place later).
2008-10-16 09:25:30 +00:00
pooka
e66325797b kill default DBG=-g 2008-10-16 09:24:51 +00:00
pooka
65f822a3e5 Make the "something random" ethernet address ETHER_IS_LOCAL
(address assignment probably needs some more work if we want to
support multiple interfaces).

hat tip to Quentin Garnier
2008-10-14 00:50:44 +00:00
pooka
e6b645ca82 Dear diary: an ethernet address with 0x01 set in the first octet
is an ethernet multicast address.  TCP does not like ethernet
multicast addresses.
2008-10-13 22:05:15 +00:00
pooka
61e869be3c Implement a virtual userspace networking interface. This is required
for any sensible operation when running the entire TCP/IP stack in
userspace (as opposed to libsockin which uses host kernel networking
to provide PF_INET).

While this basically works (although it is quite barebones), it
depends on some bit of cleanup in librump and is not built by
default yet.
2008-10-06 00:30:32 +00:00