SHMIF(4) | Device Drivers Manual | SHMIF(4) |
shmif
— rump
kernel shared memory network interface
#include
<rump/rump.h>
int
rump_pub_shmif_create
(const char
*path, int *ifnum);
The shmif
interface uses a memory mapped
regular file as a virtual Ethernet bus. All interfaces connected to the same
bus see each others' traffic.
Using a memory mapped regular file as a bus has two implications:
It is not possible to directly access the host networking
facilities from a rump kernel using purely shmif
.
However, traffic can be routed to another rump kernel instance which
provides both shmif
and
virt(4) networking.
An shmif
interface can be created in two
ways:
rump_pub_shmif_create
().
The bus pathname is passed in path. The number of
the newly created interface is available after a successful call by
dereferencing ifnum.Destroying an shmif
interface
is possible only via
ifconfig(8)
destroy.
An shmif
interface
emulates TX/RX offload options in software. They are specified by
ifconfig(8). Alternatively,
its
if_capenable
flag is directly specified by environment variable
RUMP_SHMIF_CAPENABLE
, for example:
See /usr/include/net/if.h for more details.
December 12, 2018 | NetBSD 10.99 |