Commit Graph

88 Commits

Author SHA1 Message Date
pooka ffdaceb3e7 * add comment explaining why we randomize the last source ip octet
* fix bug in randomization (well, at least with the current configuration ..)
2010-01-29 12:34:17 +00:00
martti 40b313cfaa Use tabs instead of 8 spaces. 2010-01-27 13:30:45 +00:00
pooka c52d5453ad support bpf from sockin too (i.e. DLT_NULL/AF_UNSPEC) 2010-01-26 17:52:21 +00:00
pooka 3694a1482e support bpf 2010-01-26 17:41:20 +00:00
pooka daa3b2e4c7 need rumpvfs for etfs_register() and sys_mknod() 2010-01-25 22:26:19 +00:00
pooka d70c91c8de In case opening /dev/bpf fails, try to load bpf kmod and try again. 2010-01-25 22:25:38 +00:00
pooka 89a3fc440c Add components necessary for bpf support (commented out just for
the sheer heck of it).
2010-01-19 22:47:46 +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 23a987d2a2 Make build with PF_INET-is-the-"NIC" support again. 2010-01-19 17:51:03 +00:00
pooka fe3e79c05a * add option to use bpf to dump response
* randomize local address to avoid poor confused peers due to us
  "rebooting" quite rapidly when testing.
2010-01-16 20:47:01 +00:00
pooka c3ac0e0ea8 move bpfilter.h to a more central location 2010-01-16 18:02:19 +00:00
pooka 29ca934b44 support bpf 2010-01-16 17:55:50 +00:00
pooka 435aa34303 print mbuf statistics a few times. incidentally, can be used to
test percpu.
2010-01-15 18:38:16 +00:00
pooka fbc989bbef Use linker script to make __start/stop_link_set_modules be present
in libs built with binutils >=2.19.  This is a less error-prone
method than the previous where components had to be tagged in the
Makefile as modules (and if they weren't, things broke.  and vice
versa).
2009-12-12 17:10:19 +00:00
pooka eede817dfd Include component.c instead of dummy.c so that domain constructors
get properly called.
2009-12-11 16:34:50 +00:00
pooka ea0564ea28 fix comment 2009-11-30 11:14:58 +00:00
pooka 5a1b660dab use autogenerated prototype 2009-10-20 23:29:57 +00:00
pooka 17e6aa2d7b printf -> rumpuser_dprintf
(can't use printf while holding spinlock)
2009-10-20 23:21:53 +00:00
tron 3ad0ebd5a8 Only allocate a "struct iovec" array from the healp if a reasonably sized
stack array isn't large enough.
2009-10-20 12:17:44 +00:00
pooka 02a39de4a7 fix sign-compare warnings 2009-10-20 00:25:26 +00:00
tron 8cd44ca832 Avoid panic if a file system tries to write a chain of more than 32 mbuf-s
to a socket. This happens e.g. when copying large files to SMBFS.

Code reviewed by Antti Kantee.
2009-10-18 22:55:56 +00:00
pooka a6085c2236 fix off-by-one in sanity check and bump lazy bum magic value 2009-10-17 20:35:52 +00:00
pooka 291f141ce9 for udp sockets crank snd/rcvbufsize to 64k 2009-10-16 23:17:46 +00:00
pooka a9cd93a788 use rump_pub 2009-10-14 19:14:39 +00:00
pooka d09e2773d0 "rumppriv" goes back to "rump" per internal interface naming change. 2009-10-14 18:18:53 +00:00
pooka aa022ebd2b This wasn't supposed to go in -- the tree is under temporary
component boundary breakage.
2009-10-14 17:34:08 +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 d04c4fc891 call ifinit{,1}() 2009-09-16 15:08:53 +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 48b3a6f7a3 binutils 2.19 has changed the old behaviour of defining __start_SECTNAME
for orphaned sections to using PROVIDE.  What this means is that
unless a rump component internally references that symbol, it will
not be included in the component shared library, and hence cannot
be referenced when the component is loaded.  Add a workaround which
works both with 2.16 and 2.19: force a reference to the __start
symbol internally and hence retain it in the resulting library.
2009-09-13 22:51:41 +00:00
pooka 4581312d58 * implement pr_ctloutput
* check for errno before more costly checks
2009-09-02 19:04:51 +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 7d6e9ec774 Support IPv6 in rump. I'd have liked to introduce a netinet6
component, but due to ifdef happiness permeating the sources, it's
a compile decision for now, so netinet pulls in both inet and inet6.

One issue, one single issue: the loopback interface still needs to
be created for IPv6 to work.  I have patches to take care of it
automatically if the appropriate component (net) is present, but
they require a bit more testing before commit.
2009-05-26 23:43:39 +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 eafbd6f42b let drivers define DPRINTF 2009-04-06 20:41:29 +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 f09f82998f * allow to specify PROT_READ/PROT_WRITE when mmapping a file
* add msync
2009-03-18 15:32:27 +00:00
cegger df7f595ecd Ansify function definitions w/o arguments. Generated with sed. 2009-03-18 10:22:21 +00:00
pooka d8327efb56 Create receive thread only in if_start() to make sure it happens
after the we have been attached to the ethernet framework.
XXX: if_stop is still unimplemented
2009-03-01 20:50:04 +00:00
martin bcd8301033 add missing atomic.h include 2009-03-01 07:10:41 +00:00
pooka e4b2f37a4b don't require the ifnum return pointer. 2009-02-28 16:15:19 +00:00
pooka a4aff0cbb8 Add a virtual ethernet interface which uses shared memory as the
bus instead of relying on the host kernel's tap and bridge.  This
is much lighterweight approach which does not consume non-pageable
kernel resources.
2009-02-28 15:28:45 +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 3f8c1c0f17 Add a PF_LOCAL rump kernel component. 2009-02-08 16:28:35 +00:00
pooka ead3fc22d6 Better define GATEWAY in opt_gateway.h instead of the Makefile so
UPDATE builds don't go all coocoo.
2009-02-03 00:33:48 +00:00
pooka 7e7d6e9069 -fno-strict-aliasing is now set globally for rump 2009-02-03 00:33:26 +00:00
pooka 0b60e66a6d enable GATEWAY 2009-02-01 17:05:26 +00:00