From 00a08dc01ad4d1087bd88b2079b85e8205966a60 Mon Sep 17 00:00:00 2001 From: Nick Sayer Date: Wed, 2 Aug 2000 17:27:39 +0000 Subject: [PATCH] Minor man page corrections and fixups to document the difference between tap and vmnet style devices. Submitted by: Vladimir --- share/man/man4/tap.4 | 62 +++++++++++++++++++++++++++++--------------- 1 file changed, 41 insertions(+), 21 deletions(-) diff --git a/share/man/man4/tap.4 b/share/man/man4/tap.4 index fba5466cd0b..2f9847362cd 100644 --- a/share/man/man4/tap.4 +++ b/share/man/man4/tap.4 @@ -147,23 +147,41 @@ Retrieve the process group value for signals into the argument .Va int value. -.It SIOCGIFADDR +.It Dv SIOCGIFADDR Retrieve the Media Access Control -.Pq MAC -address. This command should be executed on descriptor, associated with -control device -.Pq Pa /dev/tap Ns Sy N . +.Pq Dv MAC +address of the +.Dq remote +side. This command is used by the VMware port and expected to be executed on +descriptor, associated with control device +.Po +usually +.Pa /dev/vmnet Ns Sy N +or +.Pa /dev/tap Ns Sy N +.Pc . The .Va buffer , -which is passed as argument, is expected to have enought space to store -.Pq MAC +which is passed as the argument, is expected to have enough space to store +the +.Dv MAC +address. At the open time both +.Dq local +and +.Dq remote +.Dv MAC +addresses are the same, so this command could be used to retrieve the +.Dq local +.Dv MAC address. -.It SIOCSIFADDR +.It Dv SIOCSIFADDR Set the Media Access Control -.Pq MAC -address. This command should be executed on a descriptor, associated with -control device -.Pq Pa /dev/tap Ns Sy N . +.Pq Dv MAC +address of the +.Dq remote +side. This command is used by VMware port and expected to be executed on +a descriptor, associated with control device +.Pq usually Pa /dev/vmnet Ns Sy N . .El .Pp The control device also supports @@ -171,24 +189,25 @@ The control device also supports for read; selecting for write is pointless, and always succeeds, since writes are always non-blocking. .Pp -On the last close of the data device, by default, the interface is +On the last close of the data device, the interface is brought down .Po as if with .Dq ifconfig tap Ns Sy N No down -.Pc . +.Pc unless the devices is a VMnet device. All queued frames are thrown away. If the interface is up when the data -device is not open output frames are always thrown away rather than +device is not open, output frames are thrown away rather than letting them pile up. .Pp The .Nm tap -device is also can be used with VMware port as a replacement -of VMnet device driver. The driver uses minor number to select between +device is also can be used with the VMware port as a replacement +for the old VMnet device driver. The driver uses the minor number +to select between .Nm tap and .Nm vmnet -devices. VMnet minor numbering is +devices. VMnet minor numbers begin at .Va 0x10000 + .Va N . @@ -198,13 +217,14 @@ is a VMnet unit number. In this case control device is expected to be .Pa /dev/vmnet Ns Sy N , and network interface will be .Sy vmnet Ns Ar N . -Everything else is the same. +Additionally, VMnet devices do not ifconfig themselves down when the +control device is closed. Everything else is the same. .Pp In addition to mentioned above .Xr ioctl 2 -there are additional one for VMware port. +there is one additional one for the VMware port. .Bl -tag -width VMIO_SIOCSETMACADDR -.It VMIO_SIOCSIFFLAGS +.It Dv VMIO_SIOCSIFFLAGS VMware .Dv SIOCSIFFLAGS . .El