Title: Netgraph


Before we kick off, we need to understand some new terms that netgraph introduces.

Any object that can connect to another object. This can be a bridge, a virtual interface, but also a VLAN interface or a BPF object.
The connection between two nodes. You could consider it to be a virtual network cable.

In netgraph, edges do not really exist per se. Instead, an edge is simply an association of two hooks, one from each node. A node's hooks define how that node can be connected. For a bridge node, the hooks are the virtual interfaces, though for a virtual interface node, hooks can be each protocol supported by that interface.


Every netgraph node is addressable via an ASCII string called a node address or path. Many nodes have names. When a node has a name, it can always be addressed usingthe absolute address consisting of the name followed by a colon. If a node does not have a name, you can construct one from the node's unique ID number by enclosing the number in square brackets. Relative addressing is also possible when two nodes are indirectly connected. A relative address uses the names of consecutive hooks on the path from the source node to the target node. Relative and absolute addressing can be combined.

This is quite confusing. See the example at https://people.freebsd.org/~julian/netgraph.html.

TomMarcoen/Netgraph (last edited 2020-05-22T11:19:36+0000 by TomMarcoen)