xref: /freebsd/share/man/man4/ng_hole.4 (revision 171e08dc7f105591d2f02fffb838f2e2f3cc19dd)
14cf49a43SJulian Elischer.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
24cf49a43SJulian Elischer.\" All rights reserved.
34cf49a43SJulian Elischer.\"
44cf49a43SJulian Elischer.\" Subject to the following obligations and disclaimer of warranty, use and
54cf49a43SJulian Elischer.\" redistribution of this software, in source or object code forms, with or
64cf49a43SJulian Elischer.\" without modifications are expressly permitted by Whistle Communications;
74cf49a43SJulian Elischer.\" provided, however, that:
84cf49a43SJulian Elischer.\" 1. Any and all reproductions of the source or object code must include the
94cf49a43SJulian Elischer.\"    copyright notice above and the following disclaimer of warranties; and
104cf49a43SJulian Elischer.\" 2. No rights are granted, in any manner or form, to use Whistle
114cf49a43SJulian Elischer.\"    Communications, Inc. trademarks, including the mark "WHISTLE
124cf49a43SJulian Elischer.\"    COMMUNICATIONS" on advertising, endorsements, or otherwise except as
134cf49a43SJulian Elischer.\"    such appears in the above copyright notice or in the software.
144cf49a43SJulian Elischer.\"
154cf49a43SJulian Elischer.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
164cf49a43SJulian Elischer.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
174cf49a43SJulian Elischer.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
184cf49a43SJulian Elischer.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
194cf49a43SJulian Elischer.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
204cf49a43SJulian Elischer.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
214cf49a43SJulian Elischer.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
224cf49a43SJulian Elischer.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
234cf49a43SJulian Elischer.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
244cf49a43SJulian Elischer.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
254cf49a43SJulian Elischer.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
264cf49a43SJulian Elischer.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
274cf49a43SJulian Elischer.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
284cf49a43SJulian Elischer.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
294cf49a43SJulian Elischer.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
304cf49a43SJulian Elischer.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
314cf49a43SJulian Elischer.\" OF SUCH DAMAGE.
324cf49a43SJulian Elischer.\"
33eddc45e7SJeroen Ruigrok van der Werven.\" Author: Archie Cobbs <archie@FreeBSD.org>
344cf49a43SJulian Elischer.\"
354cf49a43SJulian Elischer.\" $FreeBSD$
364cf49a43SJulian Elischer.\" $Whistle: ng_hole.8,v 1.4 1999/01/25 23:46:26 archie Exp $
374cf49a43SJulian Elischer.\"
38171e08dcSRuslan Ermilov.Dd May 19, 2004
39bec35b9aSArchie Cobbs.Dt NG_HOLE 4
403d45e180SRuslan Ermilov.Os
414cf49a43SJulian Elischer.Sh NAME
424cf49a43SJulian Elischer.Nm ng_hole
434cf49a43SJulian Elischer.Nd netgraph discard node type
444cf49a43SJulian Elischer.Sh SYNOPSIS
4532eef9aeSRuslan Ermilov.In netgraph/ng_hole.h
464cf49a43SJulian Elischer.Sh DESCRIPTION
474cf49a43SJulian ElischerThe
484cf49a43SJulian Elischer.Nm hole
494cf49a43SJulian Elischernode type silently discards all data and control messages it receives.
504cf49a43SJulian ElischerThis type is used for testing and debugging.
514cf49a43SJulian Elischer.Sh HOOKS
5251291597SJulian ElischerA
5351291597SJulian Elischer.Nm
5451291597SJulian Elischernode accepts any request to connect, regardless of the hook name,
554cf49a43SJulian Elischeras long as the name is unique.
564cf49a43SJulian Elischer.Sh CONTROL MESSAGES
57171e08dcSRuslan ErmilovThis node type supports the generic control messages, plus the
58171e08dcSRuslan Ermilovfollowing:
59171e08dcSRuslan Ermilov.Bl -tag -width indent
60171e08dcSRuslan Ermilov.It Dv NGM_BPF_GET_STATS
61171e08dcSRuslan ErmilovThis command takes an
62171e08dcSRuslan Ermilov.Tn ASCII
63171e08dcSRuslan Ermilovstring argument, the hook name, and returns the statistics
64171e08dcSRuslan Ermilovassociated with the hook as a
65171e08dcSRuslan Ermilov.Vt "struct ng_hole_hookstat" .
66171e08dcSRuslan Ermilov.It Dv NGM_BPF_CLR_STATS
67171e08dcSRuslan ErmilovThis command takes an
68171e08dcSRuslan Ermilov.Tn ASCII
69171e08dcSRuslan Ermilovstring argument, the hook name, and clears the statistics
70171e08dcSRuslan Ermilovassociated with the hook.
71171e08dcSRuslan Ermilov.It Dv NGM_BPF_GETCLR_STATS
72171e08dcSRuslan ErmilovThis command is identical to
73171e08dcSRuslan Ermilov.Dv NGM_BPF_GET_STATS ,
74171e08dcSRuslan Ermilovexcept that the statistics are also atomically cleared.
75171e08dcSRuslan Ermilov.El
764cf49a43SJulian Elischer.Sh SHUTDOWN
774cf49a43SJulian ElischerThis node shuts down upon receipt of a
784cf49a43SJulian Elischer.Dv NGM_SHUTDOWN
794cf49a43SJulian Elischercontrol message, or when all hooks have been disconnected.
804cf49a43SJulian Elischer.Sh SEE ALSO
814cf49a43SJulian Elischer.Xr netgraph 4 ,
82bec35b9aSArchie Cobbs.Xr ng_echo 4 ,
83bec35b9aSArchie Cobbs.Xr ngctl 8
8451291597SJulian Elischer.Sh HISTORY
8551291597SJulian ElischerThe
8651291597SJulian Elischer.Nm
8751291597SJulian Elischernode type was implemented in
8851291597SJulian Elischer.Fx 4.0 .
8951291597SJulian Elischer.Sh AUTHORS
90eddc45e7SJeroen Ruigrok van der Werven.An Julian Elischer Aq julian@FreeBSD.org
91