OCIFBSD_NETWORK(3) FreeBSD Library Functions Manual OCIFBSD_NETWORK(3)

ocifbsd_networkocifbsd networking library

#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);

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:

The public API is declared in <ocifbsd/network.h>; see the header for the full list of functions and data structures.

/usr/local/lib/cni
Default CNI plugin search path.
/etc/ocifbsd/network.conf
Network configuration (bridge name, CIDR ranges, plugin path).

ocifbsd(8), cni(7), if_bridge(4), jail(8), vnet(9)

The ocifbsd_network library first appeared in FreeBSD 16.0.

The ocifbsd_network library was developed by Klara, Inc. under sponsorship from

FreeBSD 15.1-STABLE June 5, 2026 OCIFBSD_NETWORK(3)