NAME
ocifbsd_network —
ocifbsd networking library
SYNOPSIS
#include
<ocifbsd/network.h>
int
network_init(void);
int
network_shutdown(void);
int
bridge_create(const
char *name);
int
bridge_destroy(const
char *name);
int
vnet_setup(int
jid, const char
*ifname);
int
cni_load(const
char *plugin_path);
int
cni_invoke(const
char *container_id, const
char *netns);
DESCRIPTION
The ocifbsd_network library implements the
networking primitives used by ocifbsd(8) to attach containers and jails to the host network. It is
not a standalone program; it is linked into the main
ocifbsd(8) binary and any
external tooling that needs to manage bridges, VNET interfaces, or CNI
plugins.
The library provides four functional areas:
- Core network lifecycle (network.c) initialises and tears down the networking subsystem and tracks active bridges and interfaces.
- Bridge management (bridge.c) creates and destroys if_bridge(4) instances that connect container VNET stacks to the host network.
- VNET support (vnet.c) attaches jails to a bridge and configures their virtual network stack.
- CNI plugin loader (cni.c) loads and invokes cni(7) plugins from the configured plugin search path, passing the standard ADD, DEL, and CHECK operations through to the plugin and returning its result.
The public API is declared in
<ocifbsd/network.h>; see the
header for the full list of functions and data structures.
FILES
- /usr/local/lib/cni
- Default CNI plugin search path.
- /etc/ocifbsd/network.conf
- Network configuration (bridge name, CIDR ranges, plugin path).
SEE ALSO
HISTORY
The ocifbsd_network library first appeared
in FreeBSD 16.0.
AUTHORS
The ocifbsd_network library was developed
by Klara, Inc. under sponsorship from