MCPcopy Index your code
hub / github.com/containernetworking/plugins

github.com/containernetworking/plugins @v1.9.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.9.1 ↗ · + Follow
936 symbols 3,687 edges 153 files 280 documented · 30% 8 cross-repo links updated todayv1.9.1 · 2026-03-16★ 2,55263 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

test

Plugins

Some CNI network plugins, maintained by the containernetworking team. For more information, see the CNI website.

Read CONTRIBUTING for build and test instructions.

Plugins supplied:

Main: interface-creating

  • bridge: Creates a bridge, adds the host and the container to it.
  • ipvlan: Adds an ipvlan interface in the container.
  • loopback: Set the state of loopback interface to up.
  • macvlan: Creates a new MAC address, forwards all traffic to that to the container.
  • ptp: Creates a veth pair.
  • vlan: Allocates a vlan device.
  • host-device: Move an already-existing device into a container.
  • dummy: Creates a new Dummy device in the container.

Windows: Windows specific

  • win-bridge: Creates a bridge, adds the host and the container to it.
  • win-overlay: Creates an overlay interface to the container.

IPAM: IP address allocation

  • dhcp: Runs a daemon on the host to make DHCP requests on behalf of the container
  • host-local: Maintains a local database of allocated IPs
  • static: Allocate a single static IPv4/IPv6 address to container. It's useful in debugging purpose.

Meta: other plugins

  • tuning: Tweaks sysctl parameters of an existing interface
  • portmap: An iptables-based portmapping plugin. Maps ports from the host's address space to the container.
  • bandwidth: Allows bandwidth-limiting through use of traffic control tbf (ingress/egress).
  • sbr: A plugin that configures source based routing for an interface (from which it is chained).
  • firewall: A firewall plugin which uses iptables or firewalld to add rules to allow traffic to/from the container.

Sample

The sample plugin provides an example for building your own plugin.

Contact

For any questions about CNI, please reach out via: - Email: cni-dev - Slack: #cni on the CNCF slack.

If you have a security issue to report, please do so privately to the email addresses listed in the OWNERS file.

Extension points exported contracts — how you extend this code

NftConfigurer (Interface)
(no doc) [2 implementers]
pkg/link/spoofcheck.go
PortMapper (Interface)
(no doc) [2 implementers]
plugins/meta/portmap/main.go
NetNS (Interface)
(no doc) [1 implementers]
pkg/ns/ns_linux.go
Store (Interface)
(no doc) [1 implementers]
plugins/ipam/host-local/backend/store.go
HnsEndpointMakerFunc (FuncType)
(no doc)
pkg/hns/endpoint_windows.go
FirewallBackend (Interface)
(no doc) [2 implementers]
plugins/meta/firewall/firewall.go
HcnEndpointMakerFunc (FuncType)
(no doc)
pkg/hns/endpoint_windows.go

Core symbols most depended-on inside this repo

Do
called by 374
pkg/ns/ns_linux.go
LinkByName
called by 287
pkg/netlinksafe/netlink.go
Path
called by 199
pkg/ns/ns_linux.go
String
called by 186
plugins/ipam/host-local/backend/allocator/range.go
CmdAddWithArgs
called by 105
pkg/testutils/cmd.go
Close
called by 75
plugins/ipam/host-local/backend/store.go
CmdDelWithArgs
called by 64
pkg/testutils/cmd.go
AddrList
called by 56
pkg/netlinksafe/netlink.go

Shape

Function 571
Method 214
Struct 101
TypeAlias 35
Interface 13
FuncType 2

Languages

Go100%

Modules by API surface

plugins/main/bridge/bridge_test.go55 symbols
plugins/main/bridge/bridge.go31 symbols
pkg/netlinksafe/netlink.go28 symbols
plugins/meta/tuning/tuning.go26 symbols
pkg/ns/ns_linux.go24 symbols
plugins/main/host-device/host-device_test.go23 symbols
plugins/ipam/dhcp/lease.go21 symbols
pkg/link/spoofcheck.go21 symbols
plugins/meta/firewall/iptables.go16 symbols
plugins/main/ptp/ptp_test.go16 symbols
plugins/main/macvlan/macvlan.go16 symbols
plugins/main/host-device/host-device.go16 symbols

Dependencies from manifests, versioned

cyphar.com/go-pathrsv0.2.1 · 1×
github.com/Masterminds/semver/v3v3.4.0 · 1×
github.com/Microsoft/go-winiov0.6.2 · 1×
github.com/Microsoft/hcsshimv0.13.0 · 1×
github.com/alexflint/go-filemutexv1.3.0 · 1×
github.com/containerd/cgroups/v3v3.0.3 · 1×
github.com/containerd/errdefsv0.3.0 · 1×
github.com/containerd/errdefs/pkgv0.3.0 · 1×
github.com/containerd/typeurl/v2v2.2.0 · 1×
github.com/coreos/go-iptablesv0.8.0 · 1×

For agents

$ claude mcp add plugins \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact