194408d94SBrooks Davis.\" Copyright 2000 The Aerospace Corporation. All rights reserved. 294408d94SBrooks Davis.\" 394408d94SBrooks Davis.\" Redistribution and use in source and binary forms, with or without 494408d94SBrooks Davis.\" modification, are permitted provided that the following conditions 594408d94SBrooks Davis.\" are met: 694408d94SBrooks Davis.\" 794408d94SBrooks Davis.\" 1. Redistributions of source code must retain the above copyright 894408d94SBrooks Davis.\" notice, this list of conditions, and the following disclaimer. 994408d94SBrooks Davis.\" 2. Redistributions in binary form must reproduce the above copyright 1094408d94SBrooks Davis.\" notice, this list of conditions, and the following disclaimer in the 1194408d94SBrooks Davis.\" documentation and/or other materials provided with the distribution. 1294408d94SBrooks Davis.\" 3. The name of The Aerospace Corporation may not be used to endorse or 1394408d94SBrooks Davis.\" promote products derived from this software. 1494408d94SBrooks Davis.\" 1594408d94SBrooks Davis.\" THIS SOFTWARE IS PROVIDED BY THE AEROSPACE CORPORATION "AS IS" AND 1694408d94SBrooks Davis.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1794408d94SBrooks Davis.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1894408d94SBrooks Davis.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AEROSPACE CORPORATION BE LIABLE FOR 1994408d94SBrooks Davis.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2094408d94SBrooks Davis.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2194408d94SBrooks Davis.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2294408d94SBrooks Davis.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2394408d94SBrooks Davis.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2494408d94SBrooks Davis.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2594408d94SBrooks Davis.\" SUCH DAMAGE. 2694408d94SBrooks Davis.\" 2794408d94SBrooks Davis.\" Author: Brooks Davis <brooks@FreeBSD.org> 2894408d94SBrooks Davis.\" 2994408d94SBrooks Davis.Dd September 18, 2001 3094408d94SBrooks Davis.Dt NG_GIF 4 3194408d94SBrooks Davis.Os 3294408d94SBrooks Davis.Sh NAME 3394408d94SBrooks Davis.Nm ng_gif 3498998e6cSRuslan Ermilov.Nd generic tunnel interface netgraph node type 3594408d94SBrooks Davis.Sh SYNOPSIS 3698998e6cSRuslan Ermilov.In netgraph/ng_gif.h 3794408d94SBrooks Davis.Sh DESCRIPTION 3894408d94SBrooks DavisThe 3994408d94SBrooks Davis.Nm 4094408d94SBrooks Davisnetgraph node type allows 4194408d94SBrooks Davis.Xr gif 4 4294408d94SBrooks Davisinterfaces to interact with 4394408d94SBrooks Davisthe 4494408d94SBrooks Davis.Xr netgraph 4 4594408d94SBrooks Davisnetworking subsystem. 4694408d94SBrooks DavisOnce the 4794408d94SBrooks Davis.Nm 4894408d94SBrooks Davismodule is loaded in the kernel, a node is automatically created 4994408d94SBrooks Davisfor each 5094408d94SBrooks Davis.Xr gif 4 5194408d94SBrooks Davisinterface in the system. 5294408d94SBrooks DavisEach node will attempt to name itself with the same name 5394408d94SBrooks Davisas the associated interface. 5494408d94SBrooks DavisAll 5594408d94SBrooks Davis.Nm 5694408d94SBrooks Davisnodes are persistent for as long as the interface itself exists. 5794408d94SBrooks Davis.Pp 5894408d94SBrooks DavisTwo hooks are supported: 5994408d94SBrooks Davis.Dv lower 6094408d94SBrooks Davisand 6194408d94SBrooks Davis.Dv orphans . 6294408d94SBrooks DavisThe hook name 6394408d94SBrooks Davis.Dv divert 6494408d94SBrooks Davismay be used as an alias for 6594408d94SBrooks Davis.Dv lower , 6694408d94SBrooks Davisand is provided for compatibility with 6794408d94SBrooks Davis.Xr ng_ether 4 . 6894408d94SBrooks DavisIn reality the two names represent the same hook. 6994408d94SBrooks Davis.Pp 7094408d94SBrooks DavisThe 7194408d94SBrooks Davis.Dv lower 7294408d94SBrooks Davishook is a connection to the raw 7394408d94SBrooks Davis.Xr gif 4 7494408d94SBrooks Davisdevice. 7594408d94SBrooks DavisWhen connected, all incoming packets are diverted out this hook. 7694408d94SBrooks DavisWriting to this hook results in a raw encapsulated packet being transmitted 7794408d94SBrooks Davisby the device. 7894408d94SBrooks DavisNormal outgoing packets are not affected by 7994408d94SBrooks Davis.Dv lower 8094408d94SBrooks Davisbeing connected. 8194408d94SBrooks Davis.Pp 8294408d94SBrooks DavisThe 8394408d94SBrooks Davis.Dv orphans 8494408d94SBrooks Davishook is equivalent to 8594408d94SBrooks Davis.Dv lower , 8694408d94SBrooks Davisexcept that only unrecognized packets (that would otherwise be discarded) 8794408d94SBrooks Davisare written to the hook, and normal incoming traffic is unaffected. 8894408d94SBrooks DavisAt most one of 8994408d94SBrooks Davis.Dv orphans 9094408d94SBrooks Davisand 9194408d94SBrooks Davis.Dv lower 9294408d94SBrooks Davismay be connected at any time. 9394408d94SBrooks Davis.Pp 9494408d94SBrooks DavisIn all cases, frames are raw packets with the address family of the 9594408d94SBrooks Davispacket attached to the front. 9694408d94SBrooks Davis.Pp 9794408d94SBrooks DavisWhen no hooks are connected, packets flow normally upwards and downwards. 9894408d94SBrooks Davis.Sh HOOKS 9994408d94SBrooks DavisThis node type supports the following hooks: 100c60bda17SJoel Dahl.Bl -tag -width ".Va orphans" 101c60bda17SJoel Dahl.It Va lower 10294408d94SBrooks DavisConnection to the lower device link layer. 103c60bda17SJoel Dahl.It Va orphans 10494408d94SBrooks DavisLike 10594408d94SBrooks Davis.Dv lower , 10694408d94SBrooks Davisbut only receives unrecognized packets. 10794408d94SBrooks Davis.El 10894408d94SBrooks Davis.Sh CONTROL MESSAGES 10998998e6cSRuslan ErmilovThis node type supports only the generic control messages. 11094408d94SBrooks Davis.Sh EXAMPLES 11194408d94SBrooks DavisThis command dumps all unrecognized packets received by the 11298998e6cSRuslan Ermilov.Li gif0 11394408d94SBrooks Davisinterface to standard output decoded in hex and ASCII: 11498998e6cSRuslan Ermilov.Pp 11598998e6cSRuslan Ermilov.Dl "nghook -a gif0: orphans" 11694408d94SBrooks Davis.Sh SEE ALSO 11794408d94SBrooks Davis.Xr gif 4 , 11894408d94SBrooks Davis.Xr netgraph 4 , 11994408d94SBrooks Davis.Xr netintro 4 , 12094408d94SBrooks Davis.Xr ifconfig 8 , 12194408d94SBrooks Davis.Xr ngctl 8 , 12294408d94SBrooks Davis.Xr nghook 8 12394408d94SBrooks Davis.Sh AUTHORS 124*6c899950SBaptiste Daroussin.An Brooks Davis Aq Mt brooks@FreeBSD.org 125