Revision: 407
http://vde.svn.sourceforge.net/vde/?rev=407&view=rev
Author: rd235
Date: 2010-04-26 17:00:47 +0000 (Mon, 26 Apr 2010)
Log Message:
-----------
Man page of slirpvde updated.
Modified Paths:
--------------
trunk/vde-2/man/slirpvde.1
trunk/vde-2/src/slirpvde/slirpvde.c
Modified: trunk/vde-2/man/slirpvde.1
===================================================================
--- trunk/vde-2/man/slirpvde.1 2010-04-26 11:03:41 UTC (rev 406)
+++ trunk/vde-2/man/slirpvde.1 2010-04-26 17:00:47 UTC (rev 407)
@@ -4,6 +4,9 @@
.SH SYNOPSIS
.B slirpvde
.I OPTIONS
+[
+.I socketdir
+]
.SH DESCRIPTION
\fBslirpvde\fP
is a slirp interface for a VDE network.
@@ -23,6 +26,24 @@
.TP
\fB-s, --sock, --socket, --vdesock, --unix\fP \fIdirectory\fP
specify the VDE switch directory (default /var/run/vde.ctl).
+The VDE switch directory can be also specified at the end of
+the command, as illustrated by the optional parameter \fIsocketdir\fP
+in the synopsis section, above.
+When '-' is used in place of the VDE switch directory, \fBslirpvde\fP
+works as a plug (see vde_plug(1)).
+The command:
+.br
+.in +5
+.B dpipe vde_plug = ssh remote.machine.org slirpvde -
+.in -5
+.br
+which is the same as:
+.br
+.in +5
+.B dpipe vde_plug = ssh remote.machine.org slirpvde -s -
+.in -5
+.br
+connects the default local switch to a remote slirpvde.
.TP
\fB-p, --pidfile\fP \fIfilename\fP
specify the name of the file which contains the PID of slirpvde.
@@ -33,21 +54,67 @@
\fB-m, --mod\fP \fImode\fP
specify the octal UNIX permissions for the VDE communication socket.
.TP
+\fB-P, --port\fP \fIport\fP
+specify the port of the vde switch whern slirpvde must be connected.
+.TP
\fB-d, --daemon\fP
detach from terminal and run \fBslirpvde\fP in background.
.TP
+\fB-H, --host\fP \fIaddress\fP \fR[ \fB / \fI masklen \fR]
+specify the host address (default 10.0.2.2/24).
+This option automatically defines the network.
+e.g.
+.in +5
+\fB -H 192.168.55.1 \fR
+.in -5
+or:
+.in +5
+\fB --host 10.1.2.3/16 \fR
+.in -5
+The default value for \fImasklen\fR is 24.
+If the host part of the address is zero this option defines only
+the network. The default host addr is addr 2, the default dns proxy is 3.
+e.g.
+.in +5
+\fB -H 10.1.0.0/16 \fR
+.in -5
+defines the network only. The host address is 10.1.0.2 and the DNS proxy
+10.1.0.3.
+.TP
+\fB-n, --network\fP \fIaddress\fP \fR[ \fB / \fI masklen \fR]
+specify the network address (default 10.0.2.0/24).
+Deprecated, it has been included for back compatibility only. It is
+an alias of \fB-H, --host\fR.
+.TP
+\fB-N, --dns\fP \fIaddress\fP
+Specify the address of the dns server. If this is an address inside
+the slirp network, slirvde acts as a dns proxy on that address.
+The slirpvde dhcp server sends this dns address to the clients.
+By default this is the host number 3 in the slirpvde network. Using the
+default network it is 10.0.2.3.
+Warning: do not use the same address for host and dns.
+.TP
\fB-D, --dhcp\fP
turn on the DHCP server for the network autoconfiguration of
all the units connected to the VDE.
+It is possible to specify the start address assigned by the DHCP server
+as follows:
+.in +5
+\fB --dhcp=10.1.1.44 \fR
+.in -5
+DHCP assign addresses starting at host number 15 by default. Using the
+default network it starts from 10.0.2.15
.TP
-\fB-n, --network\fP \fIaddress\fP
-specify the network address (default 10.0.2.0).
-.TP
\fB-L \fIport\fR:\fIvde_host\fR:\fIvde_hostport\fR
-specifyes a port redirection.
-All the packet received by the host running slirpvde at port \fIport\fR
+specifyes a TCP port redirection.
+All the TCP packets received by the host running slirpvde at port \fIport\fR
will be forwarded to \fIvde_host\fR at port \fIvde_hostport\fR.
.TP
+\fB-U \fIport\fR:\fIvde_host\fR:\fIvde_hostport\fR
+specifyes a UDP port redirection.
+All the UDP packets received by the host running slirpvde at port \fIport\fR
+will be forwarded to \fIvde_host\fR at port \fIvde_hostport\fR.
+.TP
\fB-X \fIvde_host\fR[:\fIdisplay\fR.[\fIscreen\fR]]i
redirect a X window screen of a virtual machine. Slirpvde gets the first
unused X display on the
host running slirpvde and redirects all the requests to \fIvde_host\fR.
@@ -56,6 +123,12 @@
\fB-x \fIport\fR:\fIunix_socket_path\fR]
redirect a port of the virtual router (usually 10.0.2.2) to a unix stream
socket.
It is used for example to redirect a X display of the hosting computer on the
virtual network. e.g. -x6000:/tmp/.X11-unix/X0. (A suitable xhost configuration
is needed (e.g. 'xhost local:').
+.TP
+\fB-t, --tftp\fP \fIpathname\fR
+slirpvde enables a tftp server sharing (read-only) the directory at
\fIpathname\fR.
+.TP
+\fB-q, --quiet\fP
+Quiet; do not write anything to standard output.
.SH NOTICE
Virtual Distributed Ethernet is not related in any way with
Modified: trunk/vde-2/src/slirpvde/slirpvde.c
===================================================================
--- trunk/vde-2/src/slirpvde/slirpvde.c 2010-04-26 11:03:41 UTC (rev 406)
+++ trunk/vde-2/src/slirpvde/slirpvde.c 2010-04-26 17:00:47 UTC (rev 407)
@@ -348,25 +348,6 @@
exit(-1);
}
-struct option slirpvdeopts[] = {
- {"socket",required_argument,NULL,'s'},
- {"sock",required_argument,NULL,'s'},
- {"vdesock",required_argument,NULL,'s'},
- {"unix",required_argument,NULL,'s'},
- {"pidfile", required_argument, NULL, 'p'},
- {"dhcp",optional_argument,NULL,'D'},
- {"daemon",no_argument,NULL,'d'},
- {"network",required_argument,NULL,'n'},
- {"nameserver",required_argument,NULL,'N'},
- {"dns",required_argument,NULL,'N'},
- {"host",required_argument,NULL,'h'},
- {"mod",required_argument,NULL,'m'},
- {"group",required_argument,NULL,'g'},
- {"port",required_argument,NULL,'P'},
- {"tftp",required_argument,NULL,'t'},
- {"quiet",no_argument,NULL,'q'},
- {NULL,no_argument,NULL,0}};
-
int main(int argc, char **argv)
{
char *sockname=NULL;
@@ -384,11 +365,31 @@
int datafd=0,ctlfd=0;
int quiet=0;
+ static struct option slirpvdeopts[] = {
+ {"socket",required_argument,NULL,'s'},
+ {"sock",required_argument,NULL,'s'},
+ {"vdesock",required_argument,NULL,'s'},
+ {"unix",required_argument,NULL,'s'},
+ {"pidfile", required_argument, NULL, 'p'},
+ {"dhcp",optional_argument,NULL,'D'},
+ {"daemon",no_argument,NULL,'d'},
+ {"network",required_argument,NULL,'n'},
+ {"nameserver",required_argument,NULL,'N'},
+ {"dns",required_argument,NULL,'N'},
+ {"host",required_argument,NULL,'H'},
+ {"mod",required_argument,NULL,'m'},
+ {"group",required_argument,NULL,'g'},
+ {"port",required_argument,NULL,'P'},
+ {"tftp",required_argument,NULL,'t'},
+ {"quiet",no_argument,NULL,'q'},
+ {"help",no_argument,NULL,'h'},
+ {NULL,no_argument,NULL,0}};
+
inet_aton(DEFAULT_IP_ADDR,&vhost);
prog=basename(argv[0]);
- while
((opt=GETOPT_LONG(argc,argv,"D::s:n:p:g:m:L:U:X:x:t:N:dq",slirpvdeopts,&longindx))
> 0) {
+ while
((opt=GETOPT_LONG(argc,argv,"Ds:n:H:p:g:m:L:U:X:x:t:N:dqh",slirpvdeopts,&longindx))
> 0) {
switch (opt) {
case 's' : sockname=optarg;
break;
@@ -398,7 +399,7 @@
break;
case 'd' : daemonize = 1;
break;
- case 'h' :
+ case 'H' :
case 'n' : {
char
*slash=strchr(optarg,'/');
if
(slash) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
vde-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vde-users