@@ -48,11 +48,12 @@ static void print_usage(const char *argv0) {
4848 "specified\n" );
4949 printf ("--vmnet-interface-id=UUID vmnet interface ID (default: "
5050 "random)\n" );
51- printf ("--vmnet-network-identifier=UUID vmnet network identifier (UUID string, \"random\", "
52- "or \"\")\n"
53- " When vmnet mode is \"host\" and --vmnet-gateway is "
54- "not set, the internal DHCP will be disabled.\n"
55- " (default: \"\")\n" );
51+ printf ("--vmnet-network-identifier=UUID The identifier(uuid) to uniquely identify the network. \n"
52+ " This property is only applicable to a vmnet_interface\n"
53+ " in VMNET_HOST_MODE.\n"
54+ " If this property is set, the vmnet_interface is added to \n"
55+ " an isolated network with the specified\n"
56+ " identifier. No DHCP service is provided on this network.\n" );
5657
5758 printf ("--vmnet-nat66-prefix=PREFIX:: The IPv6 prefix to use with "
5859 "shared mode.\n" );
@@ -143,12 +144,8 @@ struct cli_options *cli_options_parse(int argc, char *argv[]) {
143144 res -> vmnet_nat66_prefix = strdup (optarg );
144145 break ;
145146 case CLI_OPT_VMNET_NETWORK_IDENTIFIER :
146- if (strcmp (optarg , "random" ) == 0 ) {
147- uuid_generate_random (res -> vmnet_network_identifier );
148- } else if (strcmp (optarg , "" ) == 0 ) {
149- uuid_clear (res -> vmnet_network_identifier );
150- } else if (uuid_parse (optarg , res -> vmnet_network_identifier ) < 0 ) {
151- ERRORF ("Failed to parse UUID \"%s\"" , optarg );
147+ if (uuid_parse (optarg , res -> vmnet_network_identifier ) < 0 ) {
148+ ERRORF ("Failed to parse network identifier UUID \"%s\"" , optarg );
152149 goto error ;
153150 }
154151 break ;
0 commit comments