---
name: "ng_hole"
section: "4"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/ng_hole"
---

# ng\_hole(4)

discard netgraph node

## NAME

**ng\_hole** – discard netgraph node

## SYNOPSIS

**#include \<sys/types.h\>**

**#include \<netgraph/ng\_hole.h\>**

## DESCRIPTION

The **hole** node type silently discards all data and control messages it receives. This type is used for testing and debugging.

## HOOKS

A **ng\_hole** node accepts any request to connect, regardless of the hook name, as long as the name is unique.

## CONTROL MESSAGES

This node type supports the generic control messages, plus the following:

- NGM\_HOLE\_GET\_STATS (**getstats**)

  This command takes an ASCII string argument, the hook name, and returns the statistics associated with the hook as a *struct ng\_hole\_hookstat*.

- NGM\_HOLE\_CLR\_STATS (**clrstats**)

  This command takes an ASCII string argument, the hook name, and clears the statistics associated with the hook.

- NGM\_HOLE\_GETCLR\_STATS (**getclrstats**)

  This command is identical to NGM\_HOLE\_GET\_STATS, except that the statistics are also atomically cleared.

## SHUTDOWN

This node shuts down upon receipt of a NGM\_SHUTDOWN control message, or when all hooks have been disconnected.

## SEE ALSO

[netgraph(4)](/netgraph/4.md), [ng\_echo(4)](/ng_echo/4.md), [ngctl(8)](/ngctl/8.md)

## HISTORY

The **ng\_hole** node type was implemented in FreeBSD 4.0.

## AUTHORS

Julian Elischer ⟨*julian@FreeBSD.org*⟩
