Deleted Added
full compact
tap.4 (71895) tap.4 (76175)
1.\" $FreeBSD: head/share/man/man4/tap.4 71895 2001-02-01 16:38:02Z ru $
1.\" $FreeBSD: head/share/man/man4/tap.4 76175 2001-05-01 09:15:30Z schweikh $
2.\" Based on PR#2411
3.\"
4.Dd July 9, 2000
5.Os
6.Dt TAP 4
7.Sh NAME
8.Nm tap
9.Nd Ethernet tunnel software network interface
10.Sh SYNOPSIS
2.\" Based on PR#2411
3.\"
4.Dd July 9, 2000
5.Os
6.Dt TAP 4
7.Sh NAME
8.Nm tap
9.Nd Ethernet tunnel software network interface
10.Sh SYNOPSIS
11.Cd pseudo-device tap
11.Cd device tap
12.Sh DESCRIPTION
13The
14.Nm
15interface is a software loopback mechanism that can be loosely
16described as the network interface analog of the
17.Xr pty 4 ,
18that is,
19.Nm

--- 24 unchanged lines hidden (view full) ---

44.Xr ioctl 2 Ns s ,
45such as
46.Dv SIOCSIFADDR
47and
48.Dv SIOCSIFNETMASK ,
49and thus can be used with
50.Xr ifconfig 8
51like any other Ethernet interface. When the system chooses to transmit
12.Sh DESCRIPTION
13The
14.Nm
15interface is a software loopback mechanism that can be loosely
16described as the network interface analog of the
17.Xr pty 4 ,
18that is,
19.Nm

--- 24 unchanged lines hidden (view full) ---

44.Xr ioctl 2 Ns s ,
45such as
46.Dv SIOCSIFADDR
47and
48.Dv SIOCSIFNETMASK ,
49and thus can be used with
50.Xr ifconfig 8
51like any other Ethernet interface. When the system chooses to transmit
52an Ethernet frame on the network interface, the frame can be read from
52an Ethernet frame on the network interface, the frame can be read from
53the control device
54(it appears as
55.Dq input
56there);
57writing an Ethernet frame to the control device generates an input frame on
58the network interface, as if the
59.Pq non-existent
60hardware had just received it.

--- 6 unchanged lines hidden (view full) ---

67A
68.Fn read
69call will return an error
70.Pq Er EHOSTDOWN
71if the interface is not
72.Dq ready .
73Once the interface is ready,
74.Fn read
53the control device
54(it appears as
55.Dq input
56there);
57writing an Ethernet frame to the control device generates an input frame on
58the network interface, as if the
59.Pq non-existent
60hardware had just received it.

--- 6 unchanged lines hidden (view full) ---

67A
68.Fn read
69call will return an error
70.Pq Er EHOSTDOWN
71if the interface is not
72.Dq ready .
73Once the interface is ready,
74.Fn read
75will return an Ethernet frame if one is available; if not, it will
75will return an Ethernet frame if one is available; if not, it will
76either block until one is or return
77.Er EWOULDBLOCK ,
78depending on whether non-blocking I/O has been enabled. If the frame
79is longer than is allowed for in the buffer passed to
80.Fn read ,
81the extra data will be silently dropped.
82.Pp
83A

--- 52 unchanged lines hidden (view full) ---

136.It Dv TIOCGPGRP
137Retrieve the process group value for
138.Dv SIGIO
139signals into the argument
140.Va int
141value.
142.It Dv SIOCGIFADDR
143Retrieve the Media Access Control
76either block until one is or return
77.Er EWOULDBLOCK ,
78depending on whether non-blocking I/O has been enabled. If the frame
79is longer than is allowed for in the buffer passed to
80.Fn read ,
81the extra data will be silently dropped.
82.Pp
83A

--- 52 unchanged lines hidden (view full) ---

136.It Dv TIOCGPGRP
137Retrieve the process group value for
138.Dv SIGIO
139signals into the argument
140.Va int
141value.
142.It Dv SIOCGIFADDR
143Retrieve the Media Access Control
144.Pq Dv MAC
144.Pq Dv MAC
145address of the
146.Dq remote
147side. This command is used by the VMware port and expected to be executed on
148descriptor, associated with control device
149(usually
145address of the
146.Dq remote
147side. This command is used by the VMware port and expected to be executed on
148descriptor, associated with control device
149(usually
150.Pa /dev/vmnet Ns Sy N
150.Pa /dev/vmnet Ns Sy N
151or
152.Pa /dev/tap Ns Sy N ) .
153The
154.Va buffer ,
155which is passed as the argument, is expected to have enough space to store
156the
157.Dv MAC
158address. At the open time both

--- 17 unchanged lines hidden (view full) ---

176.Pp
177The control device also supports
178.Xr select 2
179for read; selecting for write is pointless, and always succeeds, since
180writes are always non-blocking.
181.Pp
182On the last close of the data device, the interface is
183brought down
151or
152.Pa /dev/tap Ns Sy N ) .
153The
154.Va buffer ,
155which is passed as the argument, is expected to have enough space to store
156the
157.Dv MAC
158address. At the open time both

--- 17 unchanged lines hidden (view full) ---

176.Pp
177The control device also supports
178.Xr select 2
179for read; selecting for write is pointless, and always succeeds, since
180writes are always non-blocking.
181.Pp
182On the last close of the data device, the interface is
183brought down
184(as if with
184(as if with
185.Dq ifconfig tap Ns Sy N No down )
186unless the devices is a VMnet device.
185.Dq ifconfig tap Ns Sy N No down )
186unless the devices is a VMnet device.
187All queued frames are thrown away. If the interface is up when the data
188device is not open, output frames are thrown away rather than
187All queued frames are thrown away. If the interface is up when the data
188device is not open, output frames are thrown away rather than
189letting them pile up.
190.Pp
189letting them pile up.
190.Pp
191The
191The
192.Nm
193device is also can be used with the VMware port as a replacement
194for the old VMnet device driver. The driver uses the minor number
195to select between
196.Nm
197and
198.Nm vmnet
199devices. VMnet minor numbers begin at
192.Nm
193device is also can be used with the VMware port as a replacement
194for the old VMnet device driver. The driver uses the minor number
195to select between
196.Nm
197and
198.Nm vmnet
199devices. VMnet minor numbers begin at
200.Va 0x10000
200.Va 0x10000
201+
201+
202.Va N .
202.Va N .
203Where
203Where
204.Va N
205is a VMnet unit number. In this case control device is expected to be
204.Va N
205is a VMnet unit number. In this case control device is expected to be
206.Pa /dev/vmnet Ns Sy N ,
207and network interface will be
208.Sy vmnet Ns Ar N .
209Additionally, VMnet devices do not ifconfig themselves down when the
206.Pa /dev/vmnet Ns Sy N ,
207and network interface will be
208.Sy vmnet Ns Ar N .
209Additionally, VMnet devices do not ifconfig themselves down when the
210control device is closed. Everything else is the same.
210control device is closed. Everything else is the same.
211.Pp
212In addition to mentioned above
213.Xr ioctl 2
214there is one additional one for the VMware port.
215.Bl -tag -width VMIO_SIOCSETMACADDR
216.It Dv VMIO_SIOCSIFFLAGS
211.Pp
212In addition to mentioned above
213.Xr ioctl 2
214there is one additional one for the VMware port.
215.Bl -tag -width VMIO_SIOCSETMACADDR
216.It Dv VMIO_SIOCSIFFLAGS
217VMware
217VMware
218.Dv SIOCSIFFLAGS .
219.El
220.Sh SEE ALSO
221.Xr inet 4 ,
222.Xr intro 4
223.\" .Sh BUGS
224.Sh AUTHORS
225This man page has been obtained from
226.Fx .
218.Dv SIOCSIFFLAGS .
219.El
220.Sh SEE ALSO
221.Xr inet 4 ,
222.Xr intro 4
223.\" .Sh BUGS
224.Sh AUTHORS
225This man page has been obtained from
226.Fx .