On 25/10/15 23:06, Chris Mock wrote:
For bpf I was using the attached sample I found while googling around. I
use the following commands to build, bake and run it.
x86_64-rumprun-netbsd-gcc -o bpfsample bpfsample.c
rumpbake hw_generic bpfsample.bin bpfsample
rumprun qemu -i -I 'qnet0,vioif,-net tap,script=no,ifname=tap0' -W
qnet0,inet,static,10.10.10.100/24 bpfsample.bin
It launches and runs but failes to open /dev/bpf0 with the error "No such
file or directory".
If I change the code to use /dev/bpf it seems to open the device okay but
fails in set_options with "Device not configured". Using another piece of
code to list the interfaces, the only one I see is lo0 which is the loop
back. I am guessing I need to do something to configure qnet0 but have yet
to figure that part out. Any help is greatly appreciated.
You need vioif0, not qnet0. Look at the boot output. Yea, it's
confusing, and in a long but ever-growing list of reasons why I want to
kill the rumprun launch tool.
Here's a bpf program which I know used to work against rump kernels.
You can look in it for hints if you still get stuck after fixing qnet0
-> vioif0:
http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/rump/net/rumptest/Attic/rumptest_net.c?rev=1.14&content-type=text/plain
(for the Rumprun unikernel, just imagine "rump_sys_foo" as without
"rump_sys_")