97 lines
2.8 KiB
Groff
97 lines
2.8 KiB
Groff
.\" $NetBSD: shmif.4,v 1.3 2010/11/17 18:02:20 wiz Exp $
|
|
.\"
|
|
.\" Copyright (c) 2010 Antti Kantee
|
|
.\" All rights reserved.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
.\" INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
.\"
|
|
.Dd November 17, 2010
|
|
.Dt SHMIF 4
|
|
.Os
|
|
.Sh NAME
|
|
.Nm shmif
|
|
.Nd rump shared memory network interface
|
|
.Sh SYNOPSIS
|
|
.In rump/rump.h
|
|
.Ft int
|
|
.Fo rump_pub_shmif_create
|
|
.Fa "const char *path" "int *ifnum"
|
|
.Fc
|
|
.Sh DESCRIPTION
|
|
The
|
|
.Nm
|
|
interface uses a memory mapped regular file as a virtual Ethernet bus.
|
|
All interfaces connected to the same bus see each others' traffic.
|
|
.Pp
|
|
Using a memory mapped regular file as a bus has two implications:
|
|
.Bl -enum
|
|
.It
|
|
The bus identifier is not in flat global namespace.
|
|
.It
|
|
Configuring and using the interface is possible without superuser
|
|
privileges on the host (normal host file access permissions for
|
|
the bus hold).
|
|
.El
|
|
.Pp
|
|
It is not possible to directly access the host networking
|
|
facilities from a rump virtual kernel using purely
|
|
.Nm .
|
|
However, traffic can be routed to another rump kernel instance which
|
|
provides both
|
|
.Nm
|
|
and
|
|
.Xr virt 4
|
|
networking.
|
|
.Pp
|
|
An
|
|
.Nm
|
|
interface can be created in two ways:
|
|
.Bl -bullet
|
|
.It
|
|
Programmatically by calling
|
|
.Fn rump_pub_shmif_create .
|
|
The bus pathname is passed in
|
|
.Fa path .
|
|
The number of the newly created interface is available after a successful
|
|
call by dereferencing
|
|
.Fa ifnum .
|
|
.It
|
|
Dynamically at runtime with
|
|
.Xr ifconfig 8
|
|
or equivalent using the
|
|
.Em create
|
|
command.
|
|
In this case the bus path must be configured with
|
|
.Xr ifconfig 8
|
|
.Em linkstr
|
|
before the interface address can be configured.
|
|
.El
|
|
.Pp
|
|
Destroying an
|
|
.Nm
|
|
interface is possible only via
|
|
.Xr ifconfig 8
|
|
.Em destroy .
|
|
.Sh SEE ALSO
|
|
.Xr rump 3 ,
|
|
.Xr virt 4 ,
|
|
.Xr ifconfig 8
|