28.08.2015 Views

The Design and Implementation of the Anykernel and Rump Kernels

1F3KDce

1F3KDce

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

A–47<br />

SHMIF(4) NetBSD Kernel Interfaces Manual SHMIF(4)<br />

NAME<br />

shmif -- rump shared memory network interface<br />

SYNOPSIS<br />

#include <br />

int<br />

rump_pub_shmif_create(const char *path, int *ifnum);<br />

DESCRIPTION<br />

<strong>The</strong> shmif interface uses a memory mapped regular file as a virtual E<strong>the</strong>rnet<br />

bus. All interfaces connected to <strong>the</strong> same bus see each o<strong>the</strong>rs’ traffic.<br />

Using a memory mapped regular file as a bus has two implications: 1) <strong>the</strong><br />

bus identifier is not in flat global namespace 2) configuring <strong>and</strong> using<br />

<strong>the</strong> interface is possible without superuser privileges on <strong>the</strong> host (normal<br />

host file access permissions for <strong>the</strong> bus hold).<br />

It is not possible to directly access <strong>the</strong> host networking facilities from<br />

a rump virtual kernel using purely shmif. However, traffic can be routed<br />

to ano<strong>the</strong>r rump kernel instance which provides both shmif <strong>and</strong> virt(4)<br />

networking.<br />

An shmif interface can be created in two ways:<br />

o Programmatically by calling rump_pub_shmif_create(). <strong>The</strong> bus pathname<br />

is passed in path. <strong>The</strong> number <strong>of</strong> <strong>the</strong> newly created interface is<br />

available after a succesful call by dereferencing ifnum.<br />

o<br />

Dynamically at runtime with ifconfig(8) or equivalent using <strong>the</strong><br />

NetBSD 5.99.48 November 17, 2010 NetBSD 5.99.48

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!