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