]> git.saurik.com Git - apple/xnu.git/blame - bsd/man/man4/faith.4
xnu-1228.3.13.tar.gz
[apple/xnu.git] / bsd / man / man4 / faith.4
CommitLineData
9bccf70c
A
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
41The
42.Nm
43interface captures IPv6 TCP traffic,
44for implementing userland IPv6-to-IPv4 TCP relay
45like
46.Xr faithd 8 .
47.Pp
48Special action will be taken when IPv6 TCP traffic is seen on a router,
49and routing table suggests to route it to
50.Nm
51interface.
52In this case, the packet will be accepted by the router,
53regardless of list of IPv6 interface addresses assigned to the router.
54The packet will be captured by an IPv6 TCP socket, if it has
55.Dv IN6P_FAITH
56flag turned on and it has matching address/port pairs.
57In result,
58.Nm
59will let you capture IPv6 TCP traffic to some specific destination addresses.
60Userland programs, such as
61.Xr faithd 8
62can use this behavior to relay IPv6 TCP traffic to IPv4 TCP traffic.
63The program can accept some specific IPv6 TCP traffic, perform
64.Xr getsockname 2
65to get the IPv6 destination address specified by the client,
66and perform application-specific address mapping to relay IPv6 TCP to IPv4 TCP.
67.Pp
68The
69.Dv IN6P_FAITH
70flag on IPv6 TCP socket can be set by using
71.Xr setsockopt 2 ,
72with level equals to
73.Dv IPPROTO_IPV6
74and optname equals to
75.Dv IPv6_FAITH .
76.Pp
77To handle error reports by ICMPv6, some of ICMPv6 packets routed to
78.Nm
79interface will be delivered to IPv6 TCP, as well.
80.Pp
81To understand how
82.Nm
83can be used, take a look at source code of
84.Xr faithd 8 .
85.Pp
86As
87.Nm
88interface implements potentially dangerous operation,
89great care must be taken when configuring
90.Nm
91interface.
92To avoid possible misuse,
93.Xr sysctl 8
94variable
95.Li net.inet6.ip6.keepfaith
96must be set to
97.Li 1
98prior to the use of the interface.
99When
100.Li net.inet6.ip6.keepfaith
101is
102.Li 0 ,
103no packet will be captured by
104.Nm
105interface.
106.Pp
107.Nm
108interface 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
123The FAITH IPv6-to-IPv4 TCP relay translator was first appeared in
124WIDE hydrangea IPv6 stack.