]> git.saurik.com Git - apple/xnu.git/blob - bsd/man/man4/faith.4
xnu-6153.141.1.tar.gz
[apple/xnu.git] / bsd / man / man4 / faith.4
1 .\" $KAME: faith.4,v 1.9 2001/04/27 17:26:35 itojun Exp $
2 .\"
3 .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
4 .\" All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the project nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
17 .\"
18 .\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" SUCH DAMAGE.
29 .\"
30 .\" $FreeBSD: src/share/man/man4/faith.4,v 1.6.2.3 2001/07/03 11:01:24 ume Exp $
31 .\"
32 .Dd April 10, 1999
33 .Dt FAITH 4
34 .Os
35 .Sh NAME
36 .Nm faith
37 .Nd IPv6-to-IPv4 TCP relay capturing interface
38 .Sh SYNOPSIS
39 .Cd "pseudo-device faith" Op Ar count
40 .Sh DESCRIPTION
41 The
42 .Nm
43 interface captures IPv6 TCP traffic,
44 for implementing userland IPv6-to-IPv4 TCP relay
45 like
46 .Xr faithd 8 .
47 .Pp
48 Special action will be taken when IPv6 TCP traffic is seen on a router,
49 and routing table suggests to route it to
50 .Nm
51 interface.
52 In this case, the packet will be accepted by the router,
53 regardless of list of IPv6 interface addresses assigned to the router.
54 The packet will be captured by an IPv6 TCP socket, if it has
55 .Dv IN6P_FAITH
56 flag turned on and it has matching address/port pairs.
57 In result,
58 .Nm
59 will let you capture IPv6 TCP traffic to some specific destination addresses.
60 Userland programs, such as
61 .Xr faithd 8
62 can use this behavior to relay IPv6 TCP traffic to IPv4 TCP traffic.
63 The program can accept some specific IPv6 TCP traffic, perform
64 .Xr getsockname 2
65 to get the IPv6 destination address specified by the client,
66 and perform application-specific address mapping to relay IPv6 TCP to IPv4 TCP.
67 .Pp
68 The
69 .Dv IN6P_FAITH
70 flag on IPv6 TCP socket can be set by using
71 .Xr setsockopt 2 ,
72 with level equals to
73 .Dv IPPROTO_IPV6
74 and optname equals to
75 .Dv IPv6_FAITH .
76 .Pp
77 To handle error reports by ICMPv6, some of ICMPv6 packets routed to
78 .Nm
79 interface will be delivered to IPv6 TCP, as well.
80 .Pp
81 To understand how
82 .Nm
83 can be used, take a look at source code of
84 .Xr faithd 8 .
85 .Pp
86 As
87 .Nm
88 interface implements potentially dangerous operation,
89 great care must be taken when configuring
90 .Nm
91 interface.
92 To avoid possible misuse,
93 .Xr sysctl 8
94 variable
95 .Li net.inet6.ip6.keepfaith
96 must be set to
97 .Li 1
98 prior to the use of the interface.
99 When
100 .Li net.inet6.ip6.keepfaith
101 is
102 .Li 0 ,
103 no packet will be captured by
104 .Nm
105 interface.
106 .Pp
107 .Nm
108 interface is intended to be used on routers, not on hosts.
109 .\"
110 .Sh SEE ALSO
111 .Xr inet 4 ,
112 .Xr inet6 4 ,
113 .Xr faithd 8
114 .Rs
115 .%A Jun-ichiro itojun Hagino
116 .%A Kazu Yamamoto
117 .%T "An IPv6-to-IPv4 transport relay translator"
118 .%R internet draft
119 .%N draft-ietf-ngtrans-tcpudp-relay-04.txt
120 .%O work in progress material
121 .Re
122 .Sh HISTORY
123 The FAITH IPv6-to-IPv4 TCP relay translator was first appeared in
124 WIDE hydrangea IPv6 stack.