]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - share/man/man4/ng_gif.4
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / share / man / man4 / ng_gif.4
1 .\" Copyright 2000 The Aerospace Corporation.  All rights reserved.
2 .\"
3 .\" Redistribution and use in source and binary forms, with or without
4 .\" modification, are permitted provided that the following conditions
5 .\" are met:
6 .\"
7 .\" 1.  Redistributions of source code must retain the above copyright
8 .\"     notice, this list of conditions, and the following disclaimer.
9 .\" 2.  Redistributions in binary form must reproduce the above copyright
10 .\"     notice, this list of conditions, and the following disclaimer in the
11 .\"     documentation and/or other materials provided with the distribution.
12 .\" 3.  The name of The Aerospace Corporation may not be used to endorse or
13 .\"     promote products derived from this software.
14 .\"
15 .\" THIS SOFTWARE IS PROVIDED BY THE AEROSPACE CORPORATION "AS IS" AND
16 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AEROSPACE CORPORATION BE LIABLE FOR
19 .\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE  POSSIBILITY OF
25 .\" SUCH DAMAGE.
26 .\"
27 .\" Author: Brooks Davis <brooks@FreeBSD.org>
28 .\"
29 .\" $FreeBSD$
30 .\"
31 .Dd September 18, 2001
32 .Dt NG_GIF 4
33 .Os
34 .Sh NAME
35 .Nm ng_gif
36 .Nd generic tunnel interface netgraph node type
37 .Sh SYNOPSIS
38 .In netgraph/ng_gif.h
39 .Sh DESCRIPTION
40 The
41 .Nm
42 netgraph node type allows
43 .Xr gif 4
44 interfaces to interact with
45 the
46 .Xr netgraph 4
47 networking subsystem.
48 Once the
49 .Nm
50 module is loaded in the kernel, a node is automatically created
51 for each
52 .Xr gif 4
53 interface in the system.
54 Each node will attempt to name itself with the same name
55 as the associated interface.
56 All
57 .Nm
58 nodes are persistent for as long as the interface itself exists.
59 .Pp
60 Two hooks are supported:
61 .Dv lower
62 and
63 .Dv orphans .
64 The hook name
65 .Dv divert
66 may be used as an alias for
67 .Dv lower ,
68 and is provided for compatibility with
69 .Xr ng_ether 4 .
70 In reality the two names represent the same hook.
71 .Pp
72 The
73 .Dv lower
74 hook is a connection to the raw
75 .Xr gif 4
76 device.
77 When connected, all incoming packets are diverted out this hook.
78 Writing to this hook results in a raw encapsulated packet being transmitted
79 by the device.
80 Normal outgoing packets are not affected by
81 .Dv lower
82 being connected.
83 .Pp
84 The
85 .Dv orphans
86 hook is equivalent to
87 .Dv lower ,
88 except that only unrecognized packets (that would otherwise be discarded)
89 are written to the hook, and normal incoming traffic is unaffected.
90 At most one of
91 .Dv orphans
92 and
93 .Dv lower
94 may be connected at any time.
95 .Pp
96 In all cases, frames are raw packets with the address family of the
97 packet attached to the front.
98 .Pp
99 When no hooks are connected, packets flow normally upwards and downwards.
100 .Sh HOOKS
101 This node type supports the following hooks:
102 .Bl -tag -width ".Va orphans"
103 .It Va lower
104 Connection to the lower device link layer.
105 .It Va orphans
106 Like
107 .Dv lower ,
108 but only receives unrecognized packets.
109 .El
110 .Sh CONTROL MESSAGES
111 This node type supports only the generic control messages.
112 .Sh EXAMPLES
113 This command dumps all unrecognized packets received by the
114 .Li gif0
115 interface to standard output decoded in hex and ASCII:
116 .Pp
117 .Dl "nghook -a gif0: orphans"
118 .Sh SEE ALSO
119 .Xr gif 4 ,
120 .Xr netgraph 4 ,
121 .Xr netintro 4 ,
122 .Xr ifconfig 8 ,
123 .Xr ngctl 8 ,
124 .Xr nghook 8
125 .Sh AUTHORS
126 .An Brooks Davis Aq brooks@FreeBSD.org