SHMIF(4)
πΈ NAME πΈ
shmif β the rump kernel shared memory network interface. Welcome to the SHMIF(4) page, bestie π
β¨ SYNOPSIS β¨
okay so the whole spell is literally this:
#include <rump/rump.h>
int
rump_pub_shmif_create(const char *path, int *ifnum);
π¦ DESCRIPTION π¦
So shmif uses a memory mapped regular file as a virtual Ethernet bus. It's giving virtual Ethernet bus energy, no cap. All interfaces connected to the same bus see each others' traffic π
Using a memory mapped regular file as a bus has two implications:
- The bus identifier is not in flat global namespace.
- Configuring and using the interface is possible without superuser privileges on the host (normal host file access permissions for the bus hold). Slay for not needing root π
It is not possible to directly access the host networking facilities from a rump kernel using purely shmif. However β plot twist β 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:
- Programmatically by calling
rump_pub_shmif_create(). The bus pathname is passed inpath. The number of the newly created interface is available after a successful call by dereferencingifnum. - Dynamically at runtime with
ifconfig(8)or equivalent using thecreatecommand. In this case the bus path must be configured withifconfig(8)linkstrbefore the interface address can be configured.
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:
0x7ff80for all TX/RX offload0x6aa80for all TX offload0x15500for all RX offload
See /usr/include/net/if.h for more details. iykyk π§
π SEE ALSO π
rump(3)virt(4)ifconfig(8)
Cute sign-off: source/version Debian, date December 12, 2018, manual SHMIF(4) β periodt, bestie π«Άπ
π¦ where this page comes from
- nixpkgs unstable: netbsd-source 11.0
- Copyright (c) 2010 Antti Kantee
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms