Wed Mar 18 05:16:56 2009 UTC ()
Pull up following revision(s) (requested by plunky in ticket #571):
	share/man/man4/tap.4: revision 1.10
note the new method of changing link layer addresses using a PF_LINK
socket ioctl.


(snj)
diff -r1.8.4.1 -r1.8.4.2 src/share/man/man4/tap.4

cvs diff -r1.8.4.1 -r1.8.4.2 src/share/man/man4/tap.4 (expand / switch to unified diff)

--- src/share/man/man4/tap.4 2009/03/18 05:15:48 1.8.4.1
+++ src/share/man/man4/tap.4 2009/03/18 05:16:56 1.8.4.2
@@ -1,40 +1,40 @@ @@ -1,40 +1,40 @@
1.\" $NetBSD: tap.4,v 1.8.4.1 2009/03/18 05:15:48 snj Exp $ 1.\" $NetBSD: tap.4,v 1.8.4.2 2009/03/18 05:16:56 snj Exp $
2.\" 2.\"
3.\" Copyright (c) 2004, 2005 The NetBSD Foundation. 3.\" Copyright (c) 2004, 2005 The NetBSD Foundation.
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 15.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
16.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 16.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 17.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 18.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
19.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25.\" POSSIBILITY OF SUCH DAMAGE. 25.\" POSSIBILITY OF SUCH DAMAGE.
26.\" 26.\"
27.Dd March 9, 2009 27.Dd March 10, 2009
28.Dt TAP 4 28.Dt TAP 4
29.Os 29.Os
30.Sh NAME 30.Sh NAME
31.Nm tap 31.Nm tap
32.Nd virtual Ethernet device 32.Nd virtual Ethernet device
33.Sh SYNOPSIS 33.Sh SYNOPSIS
34.Cd pseudo-device tap 34.Cd pseudo-device tap
35.Sh DESCRIPTION 35.Sh DESCRIPTION
36The 36The
37.Nm 37.Nm
38driver allows the creation and use of virtual Ethernet devices. 38driver allows the creation and use of virtual Ethernet devices.
39Those interfaces appear just as any real Ethernet NIC to the kernel, 39Those interfaces appear just as any real Ethernet NIC to the kernel,
40but can also be accessed by userland through a character device node in order 40but can also be accessed by userland through a character device node in order
@@ -141,49 +141,38 @@ The first will enable @@ -141,49 +141,38 @@ The first will enable
141generation, while the two other configure the process group that 141generation, while the two other configure the process group that
142will receive the signal when data is ready. 142will receive the signal when data is ready.
143.Pp 143.Pp
144Synchronisation may also be achieved through the use of 144Synchronisation may also be achieved through the use of
145.Xr select 2 , 145.Xr select 2 ,
146.Xr poll 2 , 146.Xr poll 2 ,
147or 147or
148.Xr kevent 2 . 148.Xr kevent 2 .
149.Ss ETHERNET ADDRESS 149.Ss ETHERNET ADDRESS
150When a 150When a
151.Nm 151.Nm
152device is created, it is assigned an Ethernet address 152device is created, it is assigned an Ethernet address
153of the form f2:0b:a4:xx:xx:xx. 153of the form f2:0b:a4:xx:xx:xx.
154This address can later be changed in two ways: 154This address can later be changed using
155through a sysctl node, or an ioctl call. 155.Xr ifconfig 8
156.Pp 156to add an active link layer address, or directly via the
157The sysctl node is net.link.tap.\*[Lt]iface\*[Gt]. 157.Dv SIOCALIFADDR
158Any string of six colon-separated hexadecimal numbers will be accepted. 158ioctl on a
159Reading that node will provide a string representation of the current 159.Dv PF_LINK
160Ethernet address. 160socket, as it is not available on
161.Pp 
162The address can also be changed with the 
163.Dv SIOCSIFPHYADDR 
164ioctl, which is used the same way as with 
165.Xr gif 4 . 
166The difference is in the family of the address which is passed inside the 
167.Ft struct ifaliasreq 
168argument, which should be set to 
169.Dv AF_LINK . 
170This ioctl call should be made on a socket, as it is not available on 
171the ioctl handler of the character device interface. 161the ioctl handler of the character device interface.
172.Sh FILES 162.Sh FILES
173.Bl -tag -compact -width /dev/tap[0-9]* 163.Bl -tag -compact -width /dev/tap[0-9]*
174.It Pa /dev/tap 164.It Pa /dev/tap
175cloning device 165cloning device
176.It Pa /dev/tap[0-9]* 166.It Pa /dev/tap[0-9]*
177individual character device nodes 167individual character device nodes
178.El 168.El
179.Sh SEE ALSO 169.Sh SEE ALSO
180.Xr bridge 4 , 170.Xr bridge 4 ,
181.Xr etherip 4 , 171.Xr etherip 4 ,
182.Xr gif 4 , 
183.Xr tun 4 , 172.Xr tun 4 ,
184.Xr ifconfig 8 173.Xr ifconfig 8
185.Sh HISTORY 174.Sh HISTORY
186The 175The
187.Nm 176.Nm
188driver first appeared in 177driver first appeared in
189.Nx 3.0 . 178.Nx 3.0 .