1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303
|
From: Alexis Murzeau <amubtdx@gmail.com>
Date: Thu, 16 May 2019 00:04:47 +0200
Subject: Remove VLAN stuff, QEMU doesn't support it anymore
If QEMU is started with vlan argument, it will fail and exit with an
error. Remove the vlan argument and related stuff (like UI objects) so
QEMU can work again.
Forwarded: https://github.com/tobimensch/aqemu/pull/61
---
src/Network_Widget.cpp | 103 ++---
src/Network_Widget.ui | 910 +++++++++++++++++++++------------------------
src/Old_Network_Widget.cpp | 32 +-
src/Old_Network_Widget.h | 1 -
src/Old_Network_Widget.ui | 59 +--
src/VM.cpp | 99 ++---
src/VM_Devices.cpp | 39 --
src/VM_Devices.h | 12 +-
8 files changed, 503 insertions(+), 752 deletions(-)
diff --git a/src/Network_Widget.cpp b/src/Network_Widget.cpp
index de1d2a2..6ef0b78 100644
--- a/src/Network_Widget.cpp
+++ b/src/Network_Widget.cpp
@@ -254,12 +254,6 @@ void Network_Widget::Connect_Slots()
connect( ui.Edit_macaddr, SIGNAL(textChanged(const QString &)),
this, SIGNAL(Changed()) );
- connect( ui.CH_vlan, SIGNAL(clicked()),
- this, SIGNAL(Changed()) );
-
- connect( ui.SB_vlan, SIGNAL(valueChanged(int)),
- this, SIGNAL(Changed()) );
-
connect( ui.CH_name, SIGNAL(clicked()),
this, SIGNAL(Changed()) );
@@ -480,12 +474,6 @@ void Network_Widget::Disconnect_Slots()
disconnect( ui.Edit_macaddr, SIGNAL(textChanged(const QString &)),
this, SIGNAL(Changed()) );
- disconnect( ui.CH_vlan, SIGNAL(clicked()),
- this, SIGNAL(Changed()) );
-
- disconnect( ui.SB_vlan, SIGNAL(valueChanged(int)),
- this, SIGNAL(Changed()) );
-
disconnect( ui.CH_name, SIGNAL(clicked()),
this, SIGNAL(Changed()) );
@@ -761,37 +749,37 @@ void Network_Widget::on_Items_List_currentItemChanged( QListWidgetItem *current,
void Network_Widget::on_TB_Help_clicked()
{
- // -net nic[,vlan=n][,macaddr=addr][,model=type][,name=name]
+ // -net nic[,macaddr=addr][,model=type][,name=name]
if( ui.CB_Network_Type->currentText() == "nic" )
- QMessageBox::information( this, tr("nic"), tr("-net nic[,vlan=n][,macaddr=addr][,model=type][,name=name] \nCreate a new Network Interface Card and connect it to VLAN n (n = 0 is the default). The NIC is an ne2k_pci by default on the PC target. Optionally, the MAC address can be changed to addr and a name can be assigned for use in monitor commands. If no \'-net\' option is specified, a single NIC is created. Qemu can emulate several different models of network card. Valid values for type are i82551, i82557b, i82559er, ne2k_pci, ne2k_isa, pcnet, rtl8139, e1000, smc91c111, lance and mcf_fec. Not all devices are supported on all targets. Use -net nic,model=? for a list of available devices for your target.") );
+ QMessageBox::information( this, tr("nic"), tr("-net nic[,macaddr=addr][,model=type][,name=name] \nCreate a new Network Interface Card and connect it to emulated hub with ID 0 (i.e. the default hub). The NIC is an ne2k_pci by default on the PC target. Optionally, the MAC address can be changed to addr and a name can be assigned for use in monitor commands. If no \'-net\' option is specified, a single NIC is created. Qemu can emulate several different models of network card. Valid values for type are i82551, i82557b, i82559er, ne2k_pci, ne2k_isa, pcnet, rtl8139, e1000, smc91c111, lance and mcf_fec. Not all devices are supported on all targets. Use -net nic,model=? for a list of available devices for your target.") );
- // -net user[,vlan=n][,hostname=name][,name=name]
+ // -net user[,hostname=name][,name=name]
else if( ui.CB_Network_Type->currentText() == "user" )
- QMessageBox::information( this, tr("user"), tr("-net user[,vlan=n][,hostname=name][,name=name] \nUse the user mode network stack which requires no administrator privilege to run. \'hostname=name\' can be used to specify the client hostname reported by the builtin DHCP server.") );
+ QMessageBox::information( this, tr("user"), tr("-net user[,hostname=name][,name=name] \nUse the user mode network stack which requires no administrator privilege to run. \'hostname=name\' can be used to specify the client hostname reported by the builtin DHCP server.") );
// -net channel,port:dev
else if( ui.CB_Network_Type->currentText() == "channel" )
QMessageBox::information( this, tr("channel"), tr("-net channel,port:dev \nForward \'user\' TCP connection to port port to character device dev") );
- // -net tap[,vlan=n][,name=name][,fd=h][,ifname=name][,script=file][,downscript=dfile]
+ // -net tap[,name=name][,fd=h][,ifname=name][,script=file][,downscript=dfile]
else if( ui.CB_Network_Type->currentText() == "tap" )
- QMessageBox::information( this, tr("tap"), tr("-net tap[,vlan=n][,name=name][,fd=h][,ifname=name][,script=file][,downscript=dfile] \nConnect the host TAP network interface name to VLAN n, use the network script file to configure it and the network script dfile to deconfigure it. If name is not provided, the OS automatically provides one. \'fd\'=h can be used to specify the handle of an already opened host TAP interface. The default network configure script is \'/etc/qemu-ifup\' and the default network deconfigure script is \'/etc/qemu-ifdown\'. Use \'script=no\' or \'downscript=no\' to disable script execution.") );
+ QMessageBox::information( this, tr("tap"), tr("-net tap[,name=name][,fd=h][,ifname=name][,script=file][,downscript=dfile] \nConnect the host TAP network interface name to emulated hub with ID 0 (i.e. the default hub), use the network script file to configure it and the network script dfile to deconfigure it. If name is not provided, the OS automatically provides one. \'fd\'=h can be used to specify the handle of an already opened host TAP interface. The default network configure script is \'/etc/qemu-ifup\' and the default network deconfigure script is \'/etc/qemu-ifdown\'. Use \'script=no\' or \'downscript=no\' to disable script execution.") );
- // -net socket[,vlan=n][,name=name][,fd=h][,listen=[host]:port][,connect=host:port]
+ // -net socket[,name=name][,fd=h][,listen=[host]:port][,connect=host:port]
else if( ui.CB_Network_Type->currentText() == "socket" )
- QMessageBox::information( this, tr("socket"), tr("-net socket[,vlan=n][,name=name][,fd=h][,listen=[host]:port][,connect=host:port] \nConnect the VLAN n to a remote VLAN in another QEMU virtual machine using a TCP socket connection. If \'listen\' is specified, QEMU waits for incoming connections on port (host is optional). \'connect\' is used to connect to another QEMU instance using the \'listen\' option. \'fd\'=h specifies an already opened TCP socket.") );
+ QMessageBox::information( this, tr("socket"), tr("-net socket[,name=name][,fd=h][,listen=[host]:port][,connect=host:port] \nConnect the guest's network to another QEMU virtual machine using a TCP socket connection. If \'listen\' is specified, QEMU waits for incoming connections on port (host is optional). \'connect\' is used to connect to another QEMU instance using the \'listen\' option. \'fd\'=h specifies an already opened TCP socket.") );
- // -net socket[,vlan=n][,name=name][,fd=h][,mcast=maddr:port]
+ // -net socket[,name=name][,fd=h][,mcast=maddr:port]
else if( ui.CB_Network_Type->currentText() == "multicast socket" )
- QMessageBox::information( this, tr("socket"), tr("-net socket[,vlan=n][,name=name][,fd=h][,mcast=maddr:port] \nCreate a VLAN n shared with another QEMU virtual machines using a UDP multicast socket, effectively making a bus for every QEMU with same multicast address maddr and port. \nNOTES: \n1. Several QEMU can be running on different hosts and share same bus (assuming correct multicast setup for these hosts). \n2. mcast support is compatible with User Mode Linux (argument \'ethN=mcast\'), see http://user-mode-linux.sf.net. \n3. Use \'fd=h\' to specify an already opened UDP multicast socket.") );
+ QMessageBox::information( this, tr("socket"), tr("-net socket[,name=name][,fd=h][,mcast=maddr:port] \nConfigure a socket host network backend to share the guest's network traffic with another QEMU virtual machines using a UDP multicast socket, effectively making a bus for every QEMU with same multicast address maddr and port. \nNOTES: \n1. Several QEMU can be running on different hosts and share same bus (assuming correct multicast setup for these hosts). \n2. mcast support is compatible with User Mode Linux (argument \'ethN=mcast\'), see http://user-mode-linux.sf.net. \n3. Use \'fd=h\' to specify an already opened UDP multicast socket.") );
- // -net vde[,vlan=n][,name=name][,sock=socketpath][,port=n][,group=groupname][,mode=octalmode]
+ // -net vde[,name=name][,sock=socketpath][,port=n][,group=groupname][,mode=octalmode]
else if( ui.CB_Network_Type->currentText() == "vde" )
- QMessageBox::information( this, tr("vde"), tr("-net vde[,vlan=n][,name=name][,sock=socketpath][,port=n][,group=groupname][,mode=octalmode] \nConnect VLAN n to PORT n of a vde switch running on host and listening for incoming connections on socketpath. Use GROUP groupname and MODE octalmode to change default ownership and permissions for communication port. This option is available only if QEMU has been compiled with vde support enabled.") );
+ QMessageBox::information( this, tr("vde"), tr("-net vde[,name=name][,sock=socketpath][,port=n][,group=groupname][,mode=octalmode] \nConfigure VDE backend to connect to PORT n of a vde switch running on host and listening for incoming connections on socketpath. Use GROUP groupname and MODE octalmode to change default ownership and permissions for communication port. This option is available only if QEMU has been compiled with vde support enabled.") );
- // -net dump[,vlan=n][,file=file][,len=len]
+ // -net dump[,file=file][,len=len]
else if( ui.CB_Network_Type->currentText() == "dump" )
- QMessageBox::information( this, tr("dump"), tr("-net dump[,vlan=n][,file=f][,len=n] \ndump traffic on vlan \'n\' to file \'f\' (max n bytes per packet)") );
+ QMessageBox::information( this, tr("dump"), tr("-net dump[,file=f][,len=n] \ndump traffic to file \'f\' (max n bytes per packet)") );
else
{
@@ -823,9 +811,6 @@ void Network_Widget::on_TB_Browse_downscript_clicked()
void Network_Widget::on_CB_Network_Type_currentIndexChanged( int index )
{
// Hide All
- ui.CH_vlan->setVisible( false );
- ui.SB_vlan->setVisible( false );
-
ui.CH_macaddr->setVisible( false );
ui.Edit_macaddr->setVisible( false );
ui.TB_Generate_New_MAC->setVisible( false );
@@ -935,12 +920,9 @@ void Network_Widget::on_CB_Network_Type_currentIndexChanged( int index )
ui.CH_vhostfd->setVisible( false );
ui.SB_vhostfd->setVisible( false );
- // -net nic[,vlan=n][,macaddr=mac][,model=type][,name=str][,addr=str][,vectors=v]
+ // -net nic[,macaddr=mac][,model=type][,name=str][,addr=str][,vectors=v]
if( ui.CB_Network_Type->currentText() == "nic" )
{
- ui.CH_vlan->setVisible( true );
- ui.SB_vlan->setVisible( true );
-
ui.CH_macaddr->setVisible( true );
ui.Edit_macaddr->setVisible( true );
ui.TB_Generate_New_MAC->setVisible( true );
@@ -957,14 +939,11 @@ void Network_Widget::on_CB_Network_Type_currentIndexChanged( int index )
ui.CH_vectors->setVisible( true );
ui.SB_vectors->setVisible( true );
}
- // -net user[,vlan=n][,name=str][,net=addr[/mask]][,host=addr][,restrict=y|n]
+ // -net user[,name=str][,net=addr[/mask]][,host=addr][,restrict=y|n]
// [,hostname=host][,dhcpstart=addr][,dns=addr][,tftp=dir][,bootfile=f]
// [,hostfwd=rule][,guestfwd=rule][,smb=dir[,smbserver=addr]]
else if( ui.CB_Network_Type->currentText() == "user" )
{
- ui.CH_vlan->setVisible( true );
- ui.SB_vlan->setVisible( true );
-
ui.CH_hostname->setVisible( true );
ui.Edit_hostname->setVisible( true );
@@ -1012,13 +991,10 @@ void Network_Widget::on_CB_Network_Type_currentIndexChanged( int index )
ui.Label_port_dev->setVisible( true );
ui.Edit_port_dev->setVisible( true );
}
- // -net tap[,vlan=n][,name=str][,fd=h][,ifname=name][,script=file][,downscript=dfile]
+ // -net tap[,name=str][,fd=h][,ifname=name][,script=file][,downscript=dfile]
// [,sndbuf=nbytes][,vnet_hdr=on|off][,vhost=on|off][,vhostfd=h]
else if( ui.CB_Network_Type->currentText() == "tap" )
{
- ui.CH_vlan->setVisible( true );
- ui.SB_vlan->setVisible( true );
-
ui.CH_name->setVisible( true );
ui.Edit_name->setVisible( true );
@@ -1048,12 +1024,9 @@ void Network_Widget::on_CB_Network_Type_currentIndexChanged( int index )
ui.CH_vhostfd->setVisible( true );
ui.SB_vhostfd->setVisible( true );
}
- // -net socket[,vlan=n][,name=str][,fd=h][,listen=[host]:port][,connect=host:port]
+ // -net socket[,name=str][,fd=h][,listen=[host]:port][,connect=host:port]
else if( ui.CB_Network_Type->currentText() == "socket" )
{
- ui.CH_vlan->setVisible( true );
- ui.SB_vlan->setVisible( true );
-
ui.CH_name->setVisible( true );
ui.Edit_name->setVisible( true );
@@ -1066,12 +1039,9 @@ void Network_Widget::on_CB_Network_Type_currentIndexChanged( int index )
ui.CH_connect->setVisible( true );
ui.Edit_connect->setVisible( true );
}
- // -net socket[,vlan=n][,name=str][,fd=h][,mcast=maddr:port]
+ // -net socket[,name=str][,fd=h][,mcast=maddr:port]
else if( ui.CB_Network_Type->currentText() == "multicast socket" )
{
- ui.CH_vlan->setVisible( true );
- ui.SB_vlan->setVisible( true );
-
ui.CH_name->setVisible( true );
ui.Edit_name->setVisible( true );
@@ -1081,12 +1051,9 @@ void Network_Widget::on_CB_Network_Type_currentIndexChanged( int index )
ui.CH_mcast->setVisible( true );
ui.Edit_mcast->setVisible( true );
}
- // -net vde[,vlan=n][,name=str][,sock=socketpath][,port=n][,group=groupname][,mode=octalmode]
+ // -net vde[,name=str][,sock=socketpath][,port=n][,group=groupname][,mode=octalmode]
else if( ui.CB_Network_Type->currentText() == "vde" )
{
- ui.CH_vlan->setVisible( true );
- ui.SB_vlan->setVisible( true );
-
ui.CH_name->setVisible( true );
ui.Edit_name->setVisible( true );
@@ -1102,12 +1069,9 @@ void Network_Widget::on_CB_Network_Type_currentIndexChanged( int index )
ui.CH_mode->setVisible( true );
ui.Edit_mode->setVisible( true );
}
- // -net dump[,vlan=n][,file=file][,len=len]
+ // -net dump[,file=file][,len=len]
else if( ui.CB_Network_Type->currentText() == "dump" )
{
- ui.CH_vlan->setVisible( true );
- ui.SB_vlan->setVisible( true );
-
ui.CH_file->setVisible( true );
ui.Edit_file->setVisible( true );
@@ -1307,9 +1271,6 @@ void Network_Widget::on_CB_Network_Type_currentIndexChanged( int index )
if( ! PSO_Net_hostfwd )
if( ! PSO_Net_guestfwd )
- ui.CH_vlan->setVisible( false );
- ui.SB_vlan->setVisible( false );
-
ui.CH_macaddr->setVisible( false );
ui.Edit_macaddr->setVisible( false );
ui.TB_Generate_New_MAC->setVisible( false );
@@ -1421,10 +1382,6 @@ VM_Net_Card_Nativ Network_Widget::Get_Net_Card_From_Ui() const
card.Use_MAC_Address( ui.CH_macaddr->isChecked() );
card.Set_MAC_Address( ui.Edit_macaddr->text() );
- // VLAN
- card.Use_VLAN( ui.CH_vlan->isChecked() );
- card.Set_VLAN( ui.SB_vlan->value() );
-
// name
card.Use_Name( ui.CH_name->isChecked() );
card.Set_Name( ui.Edit_name->text() );
@@ -1655,10 +1612,6 @@ void Network_Widget::Set_Net_Card_To_Ui( const VM_Net_Card_Nativ &card )
ui.CH_macaddr->setChecked( card.Use_MAC_Address() );
ui.Edit_macaddr->setText( card.Get_MAC_Address() );
- // VLAN
- ui.CH_vlan->setChecked( card.Use_VLAN() );
- ui.SB_vlan->setValue( card.Get_VLAN() );
-
// name
ui.CH_name->setChecked( card.Use_Name() );
ui.Edit_name->setText( card.Get_Name() );
@@ -1833,12 +1786,12 @@ bool Network_Widget::Net_Card_is_Valid()
switch( ui.CB_Network_Type->currentIndex() )
{
- // -net nic[,vlan=n][,macaddr=addr][,model=type][,name=name]
+ // -net nic[,macaddr=addr][,model=type][,name=name]
case 0:
u_macaddr = u_name = true;
break;
- // -net user[,vlan=n][,hostname=name][,name=name]
+ // -net user[,hostname=name][,name=name]
case 1:
u_hostname = u_name = true;
break;
@@ -1848,27 +1801,27 @@ bool Network_Widget::Net_Card_is_Valid()
u_port_dev = true;
break;
- // -net tap[,vlan=n][,name=name][,fd=h][,ifname=name][,script=file][,downscript=dfile]
+ // -net tap[,name=name][,fd=h][,ifname=name][,script=file][,downscript=dfile]
case 3:
u_name = u_ifname = u_script = u_downscript = true;
break;
- // -net socket[,vlan=n][,name=name][,fd=h][,listen=[host]:port][,connect=host:port]
+ // -net socket[,name=name][,fd=h][,listen=[host]:port][,connect=host:port]
case 4:
u_name = u_listen = u_connect = true;
break;
- // -net socket[,vlan=n][,name=name][,fd=h][,mcast=maddr:port]
+ // -net socket[,name=name][,fd=h][,mcast=maddr:port]
case 5:
u_name = u_mcast = true;
break;
- // -net vde[,vlan=n][,name=name][,sock=socketpath][,port=n][,group=groupname][,mode=octalmode]
+ // -net vde[,name=name][,sock=socketpath][,port=n][,group=groupname][,mode=octalmode]
case 6:
u_name = u_sock = u_group = u_mode = true;
break;
- // -net dump[,vlan=n][,file=file][,len=len]
+ // -net dump[,file=file][,len=len]
case 7:
u_file = u_len = true;
break;
diff --git a/src/Network_Widget.ui b/src/Network_Widget.ui
index 6562ad8..f85f61d 100644
--- a/src/Network_Widget.ui
+++ b/src/Network_Widget.ui
@@ -151,8 +151,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>347</width>
- <height>1579</height>
+ <width>361</width>
+ <height>1073</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
@@ -183,81 +183,8 @@
<property name="bottomMargin">
<number>0</number>
</property>
- <item row="0" column="0">
- <widget class="QLabel" name="Label_Network_Type">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Connection type</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout_3">
- <property name="spacing">
- <number>4</number>
- </property>
- <property name="sizeConstraint">
- <enum>QLayout::SetMinimumSize</enum>
- </property>
- <item>
- <widget class="QComboBox" name="CB_Network_Type">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="currentIndex">
- <number>-1</number>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="TB_Help">
- <property name="text">
- <string>?</string>
- </property>
- <property name="icon">
- <iconset resource="../resources/icons.qrc">
- <normaloff>:/help.png</normaloff>:/help.png</iconset>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="Label_model">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Model</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QComboBox" name="CB_model">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QCheckBox" name="CH_macaddr">
+ <item row="16" column="0">
+ <widget class="QCheckBox" name="CH_mode">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -265,7 +192,7 @@
</sizepolicy>
</property>
<property name="text">
- <string>macaddr</string>
+ <string>mode</string>
</property>
</widget>
</item>
@@ -312,8 +239,8 @@
</item>
</layout>
</item>
- <item row="3" column="0">
- <widget class="QCheckBox" name="CH_vlan">
+ <item row="14" column="0">
+ <widget class="QCheckBox" name="CH_port">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -321,25 +248,12 @@
</sizepolicy>
</property>
<property name="text">
- <string>vlan</string>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QSpinBox" name="SB_vlan">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <string>port</string>
</property>
</widget>
</item>
- <item row="4" column="0">
- <widget class="QCheckBox" name="CH_name">
+ <item row="2" column="0">
+ <widget class="QCheckBox" name="CH_macaddr">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -347,25 +261,12 @@
</sizepolicy>
</property>
<property name="text">
- <string>name</string>
- </property>
- </widget>
- </item>
- <item row="4" column="1">
- <widget class="QLineEdit" name="Edit_name">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <string>macaddr</string>
</property>
</widget>
</item>
- <item row="5" column="0">
- <widget class="QCheckBox" name="CH_hostname">
+ <item row="0" column="0">
+ <widget class="QLabel" name="Label_Network_Type">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -373,12 +274,12 @@
</sizepolicy>
</property>
<property name="text">
- <string>hostname</string>
+ <string>Connection type</string>
</property>
</widget>
</item>
- <item row="5" column="1">
- <widget class="QLineEdit" name="Edit_hostname">
+ <item row="3" column="1">
+ <widget class="QLineEdit" name="Edit_name">
<property name="enabled">
<bool>false</bool>
</property>
@@ -391,29 +292,6 @@
</widget>
</item>
<item row="6" column="0">
- <widget class="QLabel" name="Label_port_dev">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>port:dev</string>
- </property>
- </widget>
- </item>
- <item row="6" column="1">
- <widget class="QLineEdit" name="Edit_port_dev">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item row="7" column="0">
<widget class="QCheckBox" name="CH_fd">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
@@ -426,7 +304,7 @@
</property>
</widget>
</item>
- <item row="7" column="1">
+ <item row="6" column="1">
<widget class="QSpinBox" name="SB_fd">
<property name="enabled">
<bool>false</bool>
@@ -439,8 +317,8 @@
</property>
</widget>
</item>
- <item row="8" column="0">
- <widget class="QCheckBox" name="CH_ifname">
+ <item row="18" column="0">
+ <widget class="QCheckBox" name="CH_len">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -448,12 +326,19 @@
</sizepolicy>
</property>
<property name="text">
- <string>ifname</string>
+ <string>len</string>
</property>
</widget>
</item>
- <item row="8" column="1">
- <widget class="QLineEdit" name="Edit_ifname">
+ <item row="19" column="1">
+ <widget class="QLineEdit" name="Edit_addr">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="17" column="1">
+ <widget class="QLineEdit" name="Edit_file">
<property name="enabled">
<bool>false</bool>
</property>
@@ -466,7 +351,7 @@
</widget>
</item>
<item row="9" column="0">
- <widget class="QCheckBox" name="CH_script">
+ <widget class="QCheckBox" name="CH_downscript">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -474,62 +359,19 @@
</sizepolicy>
</property>
<property name="text">
- <string>script</string>
+ <string>downscript</string>
</property>
</widget>
</item>
- <item row="9" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout">
- <property name="spacing">
- <number>4</number>
- </property>
- <property name="sizeConstraint">
- <enum>QLayout::SetMinimumSize</enum>
- </property>
- <item>
- <widget class="QLineEdit" name="Edit_script">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="TB_Browse_script">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>...</string>
- </property>
- <property name="icon">
- <iconset resource="../resources/icons.qrc">
- <normaloff>:/open-file.png</normaloff>:/open-file.png</iconset>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="10" column="0">
- <widget class="QCheckBox" name="CH_downscript">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
+ <item row="33" column="0">
+ <widget class="QCheckBox" name="CH_vhostfd">
<property name="text">
- <string>downscript</string>
+ <string>vhostfd</string>
</property>
</widget>
</item>
- <item row="10" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item row="0" column="1">
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="spacing">
<number>4</number>
</property>
@@ -537,62 +379,70 @@
<enum>QLayout::SetMinimumSize</enum>
</property>
<item>
- <widget class="QLineEdit" name="Edit_downscript">
- <property name="enabled">
- <bool>false</bool>
- </property>
+ <widget class="QComboBox" name="CB_Network_Type">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
+ <property name="currentIndex">
+ <number>-1</number>
+ </property>
</widget>
</item>
<item>
- <widget class="QToolButton" name="TB_Browse_downscript">
- <property name="enabled">
- <bool>false</bool>
- </property>
+ <widget class="QToolButton" name="TB_Help">
<property name="text">
- <string>...</string>
+ <string>?</string>
</property>
<property name="icon">
<iconset resource="../resources/icons.qrc">
- <normaloff>:/open-file.png</normaloff>:/open-file.png</iconset>
+ <normaloff>:/help.png</normaloff>:/help.png</iconset>
</property>
</widget>
</item>
</layout>
</item>
- <item row="11" column="0">
- <widget class="QCheckBox" name="CH_listen">
+ <item row="16" column="1">
+ <widget class="QLineEdit" name="Edit_mode">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
<property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
+ </widget>
+ </item>
+ <item row="31" column="0">
+ <widget class="QCheckBox" name="CH_vnet_hdr">
<property name="text">
- <string>listen</string>
+ <string>vnet_hdr</string>
</property>
</widget>
</item>
- <item row="11" column="1">
- <widget class="QLineEdit" name="Edit_listen">
+ <item row="30" column="0">
+ <widget class="QCheckBox" name="CH_sndbuf">
+ <property name="text">
+ <string>sndbuf</string>
+ </property>
+ </widget>
+ </item>
+ <item row="33" column="1">
+ <widget class="QSpinBox" name="SB_vhostfd">
<property name="enabled">
<bool>false</bool>
</property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <property name="maximum">
+ <number>999999999</number>
</property>
</widget>
</item>
- <item row="12" column="0">
- <widget class="QCheckBox" name="CH_connect">
+ <item row="17" column="0">
+ <widget class="QCheckBox" name="CH_file">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -600,12 +450,46 @@
</sizepolicy>
</property>
<property name="text">
- <string>connect</string>
+ <string>file</string>
</property>
</widget>
</item>
- <item row="12" column="1">
- <widget class="QLineEdit" name="Edit_connect">
+ <item row="30" column="1">
+ <widget class="QSpinBox" name="SB_sndbuf">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="maximum">
+ <number>999999999</number>
+ </property>
+ </widget>
+ </item>
+ <item row="32" column="1">
+ <widget class="QComboBox" name="CB_vhost">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <item>
+ <property name="text">
+ <string>on</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>off</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="35" column="1">
+ <widget class="QLineEdit" name="Edit_guestfwd">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QComboBox" name="CB_model">
<property name="enabled">
<bool>false</bool>
</property>
@@ -617,7 +501,7 @@
</property>
</widget>
</item>
- <item row="13" column="0">
+ <item row="12" column="0">
<widget class="QCheckBox" name="CH_mcast">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
@@ -630,20 +514,7 @@
</property>
</widget>
</item>
- <item row="13" column="1">
- <widget class="QLineEdit" name="Edit_mcast">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item row="14" column="0">
+ <item row="13" column="0">
<widget class="QCheckBox" name="CH_sock">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
@@ -656,8 +527,15 @@
</property>
</widget>
</item>
+ <item row="32" column="0">
+ <widget class="QCheckBox" name="CH_vhost">
+ <property name="text">
+ <string>vhost</string>
+ </property>
+ </widget>
+ </item>
<item row="14" column="1">
- <widget class="QLineEdit" name="Edit_sock">
+ <widget class="QSpinBox" name="SB_port">
<property name="enabled">
<bool>false</bool>
</property>
@@ -667,10 +545,48 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
+ <property name="maximum">
+ <number>65000</number>
+ </property>
</widget>
</item>
- <item row="15" column="0">
- <widget class="QCheckBox" name="CH_port">
+ <item row="25" column="0">
+ <widget class="QCheckBox" name="CH_dns">
+ <property name="text">
+ <string>dns</string>
+ </property>
+ </widget>
+ </item>
+ <item row="21" column="0">
+ <widget class="QCheckBox" name="CH_net">
+ <property name="text">
+ <string>net</string>
+ </property>
+ </widget>
+ </item>
+ <item row="29" column="1">
+ <widget class="QLineEdit" name="Edit_smbserver">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="24" column="1">
+ <widget class="QLineEdit" name="Edit_dhcpstart">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="34" column="0">
+ <widget class="QCheckBox" name="CH_hostfwd">
+ <property name="text">
+ <string>hostfwd</string>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="0">
+ <widget class="QCheckBox" name="CH_script">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -678,28 +594,43 @@
</sizepolicy>
</property>
<property name="text">
- <string>port</string>
+ <string>script</string>
</property>
</widget>
</item>
- <item row="15" column="1">
- <widget class="QSpinBox" name="SB_port">
+ <item row="31" column="1">
+ <widget class="QComboBox" name="CB_vnet_hdr">
<property name="enabled">
<bool>false</bool>
</property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <item>
+ <property name="text">
+ <string>on</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>off</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="35" column="0">
+ <widget class="QCheckBox" name="CH_guestfwd">
+ <property name="text">
+ <string>guestfwd</string>
</property>
- <property name="maximum">
- <number>65000</number>
+ </widget>
+ </item>
+ <item row="34" column="1">
+ <widget class="QLineEdit" name="Edit_hostfwd">
+ <property name="enabled">
+ <bool>false</bool>
</property>
</widget>
</item>
- <item row="16" column="0">
- <widget class="QCheckBox" name="CH_group">
+ <item row="5" column="0">
+ <widget class="QLabel" name="Label_port_dev">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -707,12 +638,26 @@
</sizepolicy>
</property>
<property name="text">
- <string>group</string>
+ <string>port:dev</string>
</property>
</widget>
</item>
- <item row="16" column="1">
- <widget class="QLineEdit" name="Edit_group">
+ <item row="26" column="0">
+ <widget class="QCheckBox" name="CH_tftp">
+ <property name="text">
+ <string>tftp</string>
+ </property>
+ </widget>
+ </item>
+ <item row="25" column="1">
+ <widget class="QLineEdit" name="Edit_dns">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="1">
+ <widget class="QLineEdit" name="Edit_ifname">
<property name="enabled">
<bool>false</bool>
</property>
@@ -724,8 +669,15 @@
</property>
</widget>
</item>
- <item row="17" column="0">
- <widget class="QCheckBox" name="CH_mode">
+ <item row="26" column="1">
+ <widget class="QLineEdit" name="Edit_tftp">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="Label_model">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -733,38 +685,38 @@
</sizepolicy>
</property>
<property name="text">
- <string>mode</string>
+ <string>Model</string>
</property>
</widget>
</item>
- <item row="17" column="1">
- <widget class="QLineEdit" name="Edit_mode">
- <property name="enabled">
- <bool>false</bool>
- </property>
+ <item row="15" column="0">
+ <widget class="QCheckBox" name="CH_group">
<property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
+ <property name="text">
+ <string>group</string>
+ </property>
</widget>
</item>
- <item row="18" column="0">
- <widget class="QCheckBox" name="CH_file">
+ <item row="4" column="1">
+ <widget class="QLineEdit" name="Edit_hostname">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
<property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="text">
- <string>file</string>
- </property>
</widget>
</item>
- <item row="18" column="1">
- <widget class="QLineEdit" name="Edit_file">
+ <item row="12" column="1">
+ <widget class="QLineEdit" name="Edit_mcast">
<property name="enabled">
<bool>false</bool>
</property>
@@ -776,8 +728,8 @@
</property>
</widget>
</item>
- <item row="19" column="0">
- <widget class="QCheckBox" name="CH_len">
+ <item row="4" column="0">
+ <widget class="QCheckBox" name="CH_hostname">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -785,11 +737,11 @@
</sizepolicy>
</property>
<property name="text">
- <string>len</string>
+ <string>hostname</string>
</property>
</widget>
</item>
- <item row="19" column="1">
+ <item row="18" column="1">
<widget class="QComboBox" name="CB_len">
<property name="enabled">
<bool>false</bool>
@@ -832,139 +784,261 @@
</item>
</widget>
</item>
- <item row="20" column="0">
- <widget class="QCheckBox" name="CH_addr">
+ <item row="15" column="1">
+ <widget class="QLineEdit" name="Edit_group">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item row="13" column="1">
+ <widget class="QLineEdit" name="Edit_sock">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item row="24" column="0">
+ <widget class="QCheckBox" name="CH_dhcpstart">
<property name="text">
- <string>addr</string>
+ <string>dhcpstart</string>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="0">
+ <widget class="QCheckBox" name="CH_ifname">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>ifname</string>
</property>
</widget>
</item>
- <item row="20" column="1">
- <widget class="QLineEdit" name="Edit_addr">
- <property name="enabled">
- <bool>false</bool>
+ <item row="9" column="1">
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <property name="spacing">
+ <number>4</number>
+ </property>
+ <property name="sizeConstraint">
+ <enum>QLayout::SetMinimumSize</enum>
+ </property>
+ <item>
+ <widget class="QLineEdit" name="Edit_downscript">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="TB_Browse_downscript">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../resources/icons.qrc">
+ <normaloff>:/open-file.png</normaloff>:/open-file.png</iconset>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="11" column="0">
+ <widget class="QCheckBox" name="CH_connect">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>connect</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QCheckBox" name="CH_name">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>name</string>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="1">
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <property name="spacing">
+ <number>4</number>
+ </property>
+ <property name="sizeConstraint">
+ <enum>QLayout::SetMinimumSize</enum>
+ </property>
+ <item>
+ <widget class="QLineEdit" name="Edit_script">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="TB_Browse_script">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../resources/icons.qrc">
+ <normaloff>:/open-file.png</normaloff>:/open-file.png</iconset>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="5" column="1">
+ <widget class="QLineEdit" name="Edit_port_dev">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
</widget>
</item>
- <item row="21" column="0">
- <widget class="QCheckBox" name="CH_vectors">
+ <item row="27" column="0">
+ <widget class="QCheckBox" name="CH_bootfile">
<property name="text">
- <string>vectors</string>
+ <string>bootfile</string>
</property>
</widget>
</item>
- <item row="21" column="1">
- <widget class="QSpinBox" name="SB_vectors">
+ <item row="11" column="1">
+ <widget class="QLineEdit" name="Edit_connect">
<property name="enabled">
<bool>false</bool>
</property>
- <property name="maximum">
- <number>999999999</number>
- </property>
- </widget>
- </item>
- <item row="22" column="0">
- <widget class="QCheckBox" name="CH_net">
- <property name="text">
- <string>net</string>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
</widget>
</item>
- <item row="22" column="1">
+ <item row="21" column="1">
<widget class="QLineEdit" name="Edit_net">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
- <item row="23" column="0">
- <widget class="QCheckBox" name="CH_host">
- <property name="text">
- <string>host</string>
- </property>
- </widget>
- </item>
- <item row="23" column="1">
- <widget class="QLineEdit" name="Edit_host">
+ <item row="10" column="1">
+ <widget class="QLineEdit" name="Edit_listen">
<property name="enabled">
<bool>false</bool>
</property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
</widget>
</item>
- <item row="24" column="0">
+ <item row="23" column="0">
<widget class="QCheckBox" name="CH_restrict">
<property name="text">
<string>restrict</string>
</property>
</widget>
</item>
- <item row="24" column="1">
- <widget class="QComboBox" name="CB_restrict">
- <property name="enabled">
- <bool>false</bool>
+ <item row="19" column="0">
+ <widget class="QCheckBox" name="CH_addr">
+ <property name="text">
+ <string>addr</string>
</property>
- <item>
- <property name="text">
- <string>y</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>n</string>
- </property>
- </item>
</widget>
</item>
- <item row="25" column="0">
- <widget class="QCheckBox" name="CH_dhcpstart">
+ <item row="10" column="0">
+ <widget class="QCheckBox" name="CH_listen">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
- <string>dhcpstart</string>
+ <string>listen</string>
</property>
</widget>
</item>
- <item row="25" column="1">
- <widget class="QLineEdit" name="Edit_dhcpstart">
+ <item row="22" column="1">
+ <widget class="QLineEdit" name="Edit_host">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
- <item row="26" column="0">
- <widget class="QCheckBox" name="CH_dns">
- <property name="text">
- <string>dns</string>
- </property>
- </widget>
- </item>
- <item row="26" column="1">
- <widget class="QLineEdit" name="Edit_dns">
+ <item row="20" column="1">
+ <widget class="QSpinBox" name="SB_vectors">
<property name="enabled">
<bool>false</bool>
</property>
- </widget>
- </item>
- <item row="27" column="0">
- <widget class="QCheckBox" name="CH_tftp">
- <property name="text">
- <string>tftp</string>
+ <property name="maximum">
+ <number>999999999</number>
</property>
</widget>
</item>
- <item row="27" column="1">
- <widget class="QLineEdit" name="Edit_tftp">
- <property name="enabled">
- <bool>false</bool>
+ <item row="28" column="0">
+ <widget class="QCheckBox" name="CH_smb">
+ <property name="text">
+ <string>smb</string>
</property>
</widget>
</item>
- <item row="28" column="0">
- <widget class="QCheckBox" name="CH_bootfile">
+ <item row="29" column="0">
+ <widget class="QCheckBox" name="CH_smbserver">
<property name="text">
- <string>bootfile</string>
+ <string>smbserver</string>
</property>
</widget>
</item>
- <item row="28" column="1">
+ <item row="27" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<property name="spacing">
<number>4</number>
@@ -992,14 +1066,7 @@
</item>
</layout>
</item>
- <item row="29" column="0">
- <widget class="QCheckBox" name="CH_smb">
- <property name="text">
- <string>smb</string>
- </property>
- </widget>
- </item>
- <item row="29" column="1">
+ <item row="28" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_6">
<property name="spacing">
<number>4</number>
@@ -1027,127 +1094,34 @@
</item>
</layout>
</item>
- <item row="30" column="0">
- <widget class="QCheckBox" name="CH_smbserver">
- <property name="text">
- <string>smbserver</string>
- </property>
- </widget>
- </item>
- <item row="30" column="1">
- <widget class="QLineEdit" name="Edit_smbserver">
- <property name="enabled">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="31" column="0">
- <widget class="QCheckBox" name="CH_sndbuf">
- <property name="text">
- <string>sndbuf</string>
- </property>
- </widget>
- </item>
- <item row="31" column="1">
- <widget class="QSpinBox" name="SB_sndbuf">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="maximum">
- <number>999999999</number>
- </property>
- </widget>
- </item>
- <item row="32" column="0">
- <widget class="QCheckBox" name="CH_vnet_hdr">
- <property name="text">
- <string>vnet_hdr</string>
- </property>
- </widget>
- </item>
- <item row="32" column="1">
- <widget class="QComboBox" name="CB_vnet_hdr">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <item>
- <property name="text">
- <string>on</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>off</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="33" column="0">
- <widget class="QCheckBox" name="CH_vhost">
- <property name="text">
- <string>vhost</string>
- </property>
- </widget>
- </item>
- <item row="33" column="1">
- <widget class="QComboBox" name="CB_vhost">
+ <item row="23" column="1">
+ <widget class="QComboBox" name="CB_restrict">
<property name="enabled">
<bool>false</bool>
</property>
<item>
<property name="text">
- <string>on</string>
+ <string>y</string>
</property>
</item>
<item>
<property name="text">
- <string>off</string>
+ <string>n</string>
</property>
</item>
</widget>
</item>
- <item row="34" column="0">
- <widget class="QCheckBox" name="CH_vhostfd">
- <property name="text">
- <string>vhostfd</string>
- </property>
- </widget>
- </item>
- <item row="34" column="1">
- <widget class="QSpinBox" name="SB_vhostfd">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="maximum">
- <number>999999999</number>
- </property>
- </widget>
- </item>
- <item row="35" column="0">
- <widget class="QCheckBox" name="CH_hostfwd">
+ <item row="20" column="0">
+ <widget class="QCheckBox" name="CH_vectors">
<property name="text">
- <string>hostfwd</string>
- </property>
- </widget>
- </item>
- <item row="35" column="1">
- <widget class="QLineEdit" name="Edit_hostfwd">
- <property name="enabled">
- <bool>false</bool>
+ <string>vectors</string>
</property>
</widget>
</item>
- <item row="36" column="0">
- <widget class="QCheckBox" name="CH_guestfwd">
+ <item row="22" column="0">
+ <widget class="QCheckBox" name="CH_host">
<property name="text">
- <string>guestfwd</string>
- </property>
- </widget>
- </item>
- <item row="36" column="1">
- <widget class="QLineEdit" name="Edit_guestfwd">
- <property name="enabled">
- <bool>false</bool>
+ <string>host</string>
</property>
</widget>
</item>
@@ -1180,8 +1154,6 @@
<tabstop>TB_Generate_New_MAC</tabstop>
<tabstop>CB_Network_Type</tabstop>
<tabstop>TB_Help</tabstop>
- <tabstop>CH_vlan</tabstop>
- <tabstop>SB_vlan</tabstop>
<tabstop>CH_name</tabstop>
<tabstop>Edit_name</tabstop>
<tabstop>CH_hostname</tabstop>
@@ -1223,22 +1195,6 @@
<include location="../resources/icons.qrc"/>
</resources>
<connections>
- <connection>
- <sender>CH_vlan</sender>
- <signal>toggled(bool)</signal>
- <receiver>SB_vlan</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>57</x>
- <y>260</y>
- </hint>
- <hint type="destinationlabel">
- <x>278</x>
- <y>256</y>
- </hint>
- </hints>
- </connection>
<connection>
<sender>CH_macaddr</sender>
<signal>toggled(bool)</signal>
diff --git a/src/Old_Network_Widget.cpp b/src/Old_Network_Widget.cpp
index eb8c88e..b276507 100644
--- a/src/Old_Network_Widget.cpp
+++ b/src/Old_Network_Widget.cpp
@@ -140,9 +140,6 @@ void Old_Network_Widget::Connect_Slots()
connect( ui.SB_Port, SIGNAL(valueChanged(int)),
this, SIGNAL(Changed()) );
- connect( ui.SB_VLAN, SIGNAL(valueChanged(int)),
- this, SIGNAL(Changed()) );
-
connect( ui.CH_TUN_TAP_Script, SIGNAL(clicked()),
this, SIGNAL(Changed()) );
@@ -176,9 +173,6 @@ void Old_Network_Widget::Disconnect_Slots()
disconnect( ui.SB_Port, SIGNAL(valueChanged(int)),
this, SIGNAL(Changed()) );
- disconnect( ui.SB_VLAN, SIGNAL(valueChanged(int)),
- this, SIGNAL(Changed()) );
-
disconnect( ui.CH_TUN_TAP_Script, SIGNAL(clicked()),
this, SIGNAL(Changed()) );
@@ -310,8 +304,6 @@ void Old_Network_Widget::on_CB_Connection_Mode_currentIndexChanged( int index )
ui.Label_MAC->setEnabled( true );
ui.Edit_MAC_Address->setEnabled( true );
ui.TB_Generate_New_MAC->setEnabled( true );
- ui.Label_VLAN->setEnabled( true );
- ui.SB_VLAN->setEnabled( true );
ui.CH_TUN_TAP_Script->setEnabled( false );
ui.Edit_TUN_TAP_Script->setEnabled( false );
ui.TB_Browse_TUN_Script->setEnabled( false );
@@ -334,8 +326,6 @@ void Old_Network_Widget::on_CB_Connection_Mode_currentIndexChanged( int index )
ui.Label_MAC->setEnabled( true );
ui.Edit_MAC_Address->setEnabled( true );
ui.TB_Generate_New_MAC->setEnabled( true );
- ui.Label_VLAN->setEnabled( true );
- ui.SB_VLAN->setEnabled( true );
ui.CH_TUN_TAP_Script->setEnabled( true );
ui.Edit_TUN_TAP_Script->setEnabled( true );
ui.TB_Browse_TUN_Script->setEnabled( true );
@@ -358,8 +348,6 @@ void Old_Network_Widget::on_CB_Connection_Mode_currentIndexChanged( int index )
ui.Label_MAC->setEnabled( true );
ui.Edit_MAC_Address->setEnabled( true );
ui.TB_Generate_New_MAC->setEnabled( true );
- ui.Label_VLAN->setEnabled( true );
- ui.SB_VLAN->setEnabled( true );
ui.CH_TUN_TAP_Script->setEnabled( false );
ui.Edit_TUN_TAP_Script->setEnabled( false );
ui.TB_Browse_TUN_Script->setEnabled( false );
@@ -382,8 +370,6 @@ void Old_Network_Widget::on_CB_Connection_Mode_currentIndexChanged( int index )
ui.Label_MAC->setEnabled( true );
ui.Edit_MAC_Address->setEnabled( true );
ui.TB_Generate_New_MAC->setEnabled( true );
- ui.Label_VLAN->setEnabled( true );
- ui.SB_VLAN->setEnabled( true );
ui.CH_TUN_TAP_Script->setEnabled( false );
ui.Edit_TUN_TAP_Script->setEnabled( false );
ui.TB_Browse_TUN_Script->setEnabled( false );
@@ -406,8 +392,6 @@ void Old_Network_Widget::on_CB_Connection_Mode_currentIndexChanged( int index )
ui.Label_MAC->setEnabled( true );
ui.Edit_MAC_Address->setEnabled( true );
ui.TB_Generate_New_MAC->setEnabled( true );
- ui.Label_VLAN->setEnabled( true );
- ui.SB_VLAN->setEnabled( true );
ui.CH_TUN_TAP_Script->setEnabled( false );
ui.Edit_TUN_TAP_Script->setEnabled( false );
ui.TB_Browse_TUN_Script->setEnabled( false );
@@ -430,8 +414,6 @@ void Old_Network_Widget::on_CB_Connection_Mode_currentIndexChanged( int index )
ui.Label_MAC->setEnabled( true );
ui.Edit_MAC_Address->setEnabled( true );
ui.TB_Generate_New_MAC->setEnabled( true );
- ui.Label_VLAN->setEnabled( true );
- ui.SB_VLAN->setEnabled( true );
ui.CH_TUN_TAP_Script->setEnabled( false );
ui.Edit_TUN_TAP_Script->setEnabled( false );
ui.TB_Browse_TUN_Script->setEnabled( false );
@@ -441,7 +423,7 @@ void Old_Network_Widget::on_CB_Connection_Mode_currentIndexChanged( int index )
ui.SB_File_Descriptor->setEnabled( false );
break;
- case 6: // create shared VLAN via UDP multicast socket
+ case 6: // use an UDP multicast socket
if(set_net_mode)
Network_Cards[ ui.Network_Cards_List->currentRow() ].Set_Net_Mode( VM::Net_Mode_Multicast );
@@ -454,8 +436,6 @@ void Old_Network_Widget::on_CB_Connection_Mode_currentIndexChanged( int index )
ui.Label_MAC->setEnabled( true );
ui.Edit_MAC_Address->setEnabled( true );
ui.TB_Generate_New_MAC->setEnabled( true );
- ui.Label_VLAN->setEnabled( true );
- ui.SB_VLAN->setEnabled( true );
ui.CH_TUN_TAP_Script->setEnabled( false );
ui.Edit_TUN_TAP_Script->setEnabled( false );
ui.TB_Browse_TUN_Script->setEnabled( false );
@@ -478,8 +458,6 @@ void Old_Network_Widget::on_CB_Connection_Mode_currentIndexChanged( int index )
ui.Label_MAC->setEnabled( true );
ui.Edit_MAC_Address->setEnabled( true );
ui.TB_Generate_New_MAC->setEnabled( true );
- ui.Label_VLAN->setEnabled( true );
- ui.SB_VLAN->setEnabled( true );
ui.CH_TUN_TAP_Script->setEnabled( false );
ui.Edit_TUN_TAP_Script->setEnabled( false );
ui.TB_Browse_TUN_Script->setEnabled( false );
@@ -502,8 +480,6 @@ void Old_Network_Widget::on_CB_Connection_Mode_currentIndexChanged( int index )
ui.Label_MAC->setEnabled( false );
ui.Edit_MAC_Address->setEnabled( false );
ui.TB_Generate_New_MAC->setEnabled( false );
- ui.Label_VLAN->setEnabled( false );
- ui.SB_VLAN->setEnabled( false );
ui.CH_TUN_TAP_Script->setEnabled( false );
ui.Edit_TUN_TAP_Script->setEnabled( false );
ui.TB_Browse_TUN_Script->setEnabled( false );
@@ -555,11 +531,6 @@ void Old_Network_Widget::on_SB_Port_valueChanged( int i )
Network_Cards[ ui.Network_Cards_List->currentRow() ].Set_Port( i );
}
-void Old_Network_Widget::on_SB_VLAN_valueChanged( int i )
-{
- Network_Cards[ ui.Network_Cards_List->currentRow() ].Set_VLAN( i );
-}
-
void Old_Network_Widget::on_CH_TUN_TAP_Script_stateChanged( int state )
{
if( state == Qt::Checked ) Network_Cards[ ui.Network_Cards_List->currentRow() ].Set_Use_TUN_TAP_Script( true );
@@ -657,7 +628,6 @@ void Old_Network_Widget::Set_Net_Card_To_Ui( const VM_Net_Card &card )
ui.Edit_IP_Address->setText( card.Get_IP_Address() );
ui.Edit_MAC_Address->setText( card.Get_MAC_Address() );
ui.SB_Port->setValue( card.Get_Port() );
- ui.SB_VLAN->setValue( card.Get_VLAN() );
ui.CH_TUN_TAP_Script->setChecked( card.Get_Use_TUN_TAP_Script() );
ui.Edit_TUN_TAP_Script->setText( card.Get_TUN_TAP_Script() );
ui.Edit_Interface_Name->setText( card.Get_Interface_Name() );
diff --git a/src/Old_Network_Widget.h b/src/Old_Network_Widget.h
index 52fb937..f2d084c 100644
--- a/src/Old_Network_Widget.h
+++ b/src/Old_Network_Widget.h
@@ -54,7 +54,6 @@ class Old_Network_Widget: public QWidget
void on_Edit_IP_Address_textChanged();
void on_Edit_MAC_Address_textChanged();
void on_SB_Port_valueChanged( int i );
- void on_SB_VLAN_valueChanged( int i );
void on_CH_TUN_TAP_Script_stateChanged( int state );
void on_Edit_TUN_TAP_Script_textChanged();
void on_Edit_Interface_Name_textChanged();
diff --git a/src/Old_Network_Widget.ui b/src/Old_Network_Widget.ui
index caaef00..6c7b071 100644
--- a/src/Old_Network_Widget.ui
+++ b/src/Old_Network_Widget.ui
@@ -163,7 +163,7 @@
</property>
</widget>
</item>
- <item row="6" column="1">
+ <item row="5" column="1">
<widget class="QLineEdit" name="Edit_MAC_Address">
<property name="text">
<string/>
@@ -176,7 +176,7 @@
</property>
</widget>
</item>
- <item row="8" column="2">
+ <item row="7" column="2">
<widget class="QToolButton" name="TB_Browse_TUN_Script">
<property name="text">
<string>...</string>
@@ -215,7 +215,7 @@
</property>
</widget>
</item>
- <item row="6" column="5">
+ <item row="5" column="5">
<widget class="QSpinBox" name="SB_File_Descriptor">
<property name="minimumSize">
<size>
@@ -243,23 +243,7 @@
</property>
</widget>
</item>
- <item row="3" column="5">
- <widget class="QSpinBox" name="SB_VLAN">
- <property name="minimumSize">
- <size>
- <width>80</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>80</width>
- <height>16777215</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="6" column="2">
+ <item row="5" column="2">
<widget class="QToolButton" name="TB_Generate_New_MAC">
<property name="toolTip">
<string>Generate New MAC</string>
@@ -273,25 +257,6 @@
</property>
</widget>
</item>
- <item row="3" column="4">
- <widget class="QLabel" name="Label_VLAN">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>V&LAN:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- <property name="buddy">
- <cstring>SB_VLAN</cstring>
- </property>
- </widget>
- </item>
<item row="0" column="1" colspan="5">
<widget class="QComboBox" name="CB_Network_Card_Model">
<property name="maxCount">
@@ -302,7 +267,7 @@
<item row="3" column="1">
<widget class="QLineEdit" name="Edit_Hostname"/>
</item>
- <item row="9" column="0">
+ <item row="8" column="0">
<widget class="QLabel" name="Label_If_Name">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
@@ -373,7 +338,7 @@
</item>
<item>
<property name="text">
- <string>Create shared VLAN via UDP multicast socket</string>
+ <string>Use an UDP multicast socket</string>
</property>
</item>
<item>
@@ -388,7 +353,7 @@
</item>
</widget>
</item>
- <item row="6" column="4">
+ <item row="5" column="4">
<widget class="QLabel" name="Label_File_Descriptor">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
@@ -407,7 +372,7 @@
</property>
</widget>
</item>
- <item row="8" column="0" alignment="Qt::AlignRight">
+ <item row="7" column="0" alignment="Qt::AlignRight">
<widget class="QCheckBox" name="CH_TUN_TAP_Script">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
@@ -442,7 +407,7 @@
</property>
</spacer>
</item>
- <item row="8" column="1">
+ <item row="7" column="1">
<widget class="QLineEdit" name="Edit_TUN_TAP_Script"/>
</item>
<item row="3" column="3">
@@ -461,10 +426,10 @@
</property>
</spacer>
</item>
- <item row="9" column="1">
+ <item row="8" column="1">
<widget class="QLineEdit" name="Edit_Interface_Name"/>
</item>
- <item row="6" column="0">
+ <item row="5" column="0">
<widget class="QLabel" name="Label_MAC">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
@@ -483,7 +448,7 @@
</property>
</widget>
</item>
- <item row="7" column="0">
+ <item row="6" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
diff --git a/src/VM.cpp b/src/VM.cpp
index f2e3380..696b8ff 100644
--- a/src/VM.cpp
+++ b/src/VM.cpp
@@ -1930,12 +1930,6 @@ bool Virtual_Machine::Create_VM_File( const QString &file_name, bool template_mo
Dom_Text = New_Dom_Document.createTextNode( QString::number(Network_Cards[nx].Get_Port()) );
Sec_Element.appendChild( Dom_Text );
- // VLAN
- Sec_Element = New_Dom_Document.createElement( "VLAN" );
- Dom_Element.appendChild( Sec_Element );
- Dom_Text = New_Dom_Document.createTextNode( QString::number(Network_Cards[nx].Get_VLAN()) );
- Sec_Element.appendChild( Dom_Text );
-
// Use TUN TAP Script
Sec_Element = New_Dom_Document.createElement( "Use_TUN_TAP_Script" );
Dom_Element.appendChild( Sec_Element );
@@ -2053,17 +2047,6 @@ bool Virtual_Machine::Create_VM_File( const QString &file_name, bool template_mo
Dom_Text = New_Dom_Document.createTextNode( Network_Cards_Nativ[nx].Get_MAC_Address() );
Sec_Element.appendChild( Dom_Text );
- // VLAN
- Sec_Element = New_Dom_Document.createElement( "Use_VLAN" );
- Dom_Element.appendChild( Sec_Element );
- Dom_Text = New_Dom_Document.createTextNode( Network_Cards_Nativ[nx].Use_VLAN() ? "yes" : "no" );
- Sec_Element.appendChild( Dom_Text );
-
- Sec_Element = New_Dom_Document.createElement( "VLAN" );
- Dom_Element.appendChild( Sec_Element );
- Dom_Text = New_Dom_Document.createTextNode( QString::number(Network_Cards_Nativ[nx].Get_VLAN()) );
- Sec_Element.appendChild( Dom_Text );
-
// Name
Sec_Element = New_Dom_Document.createElement( "Use_Name" );
Dom_Element.appendChild( Sec_Element );
@@ -4182,9 +4165,6 @@ bool Virtual_Machine::Load_VM( const QString &file_name )
// Port
tmp_card.Set_Port( Second_Element.firstChildElement("Port").text().toInt() );
- // VLAN
- tmp_card.Set_VLAN( Second_Element.firstChildElement("VLAN").text().toInt() );
-
// Use TUN TAP Script
tmp_card.Set_Use_TUN_TAP_Script( ! (Second_Element.firstChildElement("Use_TUN_TAP_Script").text() == "false") );
@@ -4244,12 +4224,6 @@ bool Virtual_Machine::Load_VM( const QString &file_name )
tmp_card.Set_Card_Model( Second_Element.firstChildElement("Card_Model").text() );
tmp_card.Use_MAC_Address( Second_Element.firstChildElement("Use_MAC_Address").text() == "yes" );
- tmp_card.Set_MAC_Address( Second_Element.firstChildElement("MAC_Address").text() );
- tmp_card.Use_VLAN( Second_Element.firstChildElement("Use_VLAN").text() == "yes" );
-
- tmp_card.Set_VLAN( Second_Element.firstChildElement("VLAN").text().toInt() );
- tmp_card.Use_Name( Second_Element.firstChildElement("Use_Name").text() == "yes" );
-
tmp_card.Set_Name( Second_Element.firstChildElement("Name").text() );
tmp_card.Use_Hostname( Second_Element.firstChildElement("Use_Hostname").text() == "yes" );
@@ -5702,30 +5676,30 @@ QStringList Virtual_Machine::Build_QEMU_Args()
for( int nc = 0; nc < Network_Cards_Nativ.count(); nc++ )
{
QString nic_str = "";
- bool u_vlan, u_macaddr, u_model, u_name, u_hostname, u_port_dev, u_fd, u_ifname, u_script,
+ bool u_macaddr, u_model, u_name, u_hostname, u_port_dev, u_fd, u_ifname, u_script,
u_downscript, u_listen, u_connect, u_mcast, u_sock, u_port, u_group, u_mode, u_file,
u_len, u_addr, u_vectors, u_net, u_host, u_restrict, u_dhcpstart, u_dns, u_tftp, u_bootfile,
u_hostfwd, u_guestfwd, u_smb, u_smbserver, u_sndbuf, u_vnet_hdr, u_vhost, u_vhostfd;
- u_vlan = u_macaddr = u_model = u_name = u_hostname = u_port_dev = u_fd = u_ifname = u_script =
+ u_macaddr = u_model = u_name = u_hostname = u_port_dev = u_fd = u_ifname = u_script =
u_downscript = u_listen = u_connect = u_mcast = u_sock = u_port = u_group = u_mode = u_file =
u_len = u_addr = u_vectors = u_net = u_host = u_restrict = u_dhcpstart = u_dns = u_tftp = u_bootfile =
u_hostfwd = u_guestfwd = u_smb = u_smbserver = u_sndbuf = u_vnet_hdr = u_vhost = u_vhostfd = false;
switch( Network_Cards_Nativ[nc].Get_Network_Type() )
{
- // -net nic[,vlan=n][,macaddr=mac][,model=type][,name=str][,addr=str][,vectors=v]
+ // -net nic[,macaddr=mac][,model=type][,name=str][,addr=str][,vectors=v]
case VM::Net_Mode_Nativ_NIC:
nic_str += "nic";
- u_vlan = u_macaddr = u_model = u_name = u_addr = u_vectors = true;
+ u_macaddr = u_model = u_name = u_addr = u_vectors = true;
break;
- // -net user[,vlan=n][,name=str][,net=addr[/mask]][,host=addr][,restrict=y|n]
+ // -net user[,name=str][,net=addr[/mask]][,host=addr][,restrict=y|n]
// [,hostname=host][,dhcpstart=addr][,dns=addr][,tftp=dir][,bootfile=f]
// [,hostfwd=rule][,guestfwd=rule][,smb=dir[,smbserver=addr]]
case VM::Net_Mode_Nativ_User:
nic_str += "user";
- u_vlan = u_name = u_net = u_host = u_restrict = u_hostname = u_dhcpstart = u_dns =
+ u_name = u_net = u_host = u_restrict = u_hostname = u_dhcpstart = u_dns =
u_tftp = u_bootfile = u_hostfwd = u_guestfwd = u_smb = u_smbserver = true;
break;
@@ -5735,37 +5709,37 @@ QStringList Virtual_Machine::Build_QEMU_Args()
u_port_dev = true;
break;
- // -net tap[,vlan=n][,name=str][,fd=h][,ifname=name][,script=file][,downscript=dfile]
+ // -net tap[,name=str][,fd=h][,ifname=name][,script=file][,downscript=dfile]
// [,sndbuf=nbytes][,vnet_hdr=on|off][,vhost=on|off][,vhostfd=h]
case VM::Net_Mode_Nativ_TAP:
nic_str += "tap";
- u_vlan = u_name = u_fd = u_ifname = u_script = u_downscript = u_sndbuf = u_vnet_hdr = u_vhost = u_vhostfd = true;
+ u_name = u_fd = u_ifname = u_script = u_downscript = u_sndbuf = u_vnet_hdr = u_vhost = u_vhostfd = true;
break;
- // -net socket[,vlan=n][,name=str][,fd=h][,listen=[host]:port][,connect=host:port]
+ // -net socket[,name=str][,fd=h][,listen=[host]:port][,connect=host:port]
case VM::Net_Mode_Nativ_Socket:
nic_str += "socket";
- u_vlan = u_name = u_fd = u_listen = u_connect = true;
+ u_name = u_fd = u_listen = u_connect = true;
break;
- // -net socket[,vlan=n][,name=str][,fd=h][,mcast=maddr:port]
+ // -net socket[,name=str][,fd=h][,mcast=maddr:port]
case VM::Net_Mode_Nativ_MulticastSocket:
nic_str += "socket";
- u_vlan = u_name = u_fd = u_mcast = true;
+ u_name = u_fd = u_mcast = true;
break;
- // -net vde[,vlan=n][,name=str][,sock=socketpath][,port=n][,group=groupname][,mode=octalmode]
+ // -net vde[,name=str][,sock=socketpath][,port=n][,group=groupname][,mode=octalmode]
case VM::Net_Mode_Nativ_VDE:
if( ! Current_Emulator_Devices.PSO_Net_type_vde ) continue;
nic_str += "vde";
- u_vlan = u_name = u_sock = u_port = u_group = u_mode = true;
+ u_name = u_sock = u_port = u_group = u_mode = true;
break;
- // -net dump[,vlan=n][,file=file][,len=len]
+ // -net dump[,file=file][,len=len]
case VM::Net_Mode_Nativ_Dump:
if( ! Current_Emulator_Devices.PSO_Net_type_dump ) continue;
nic_str += "dump";
- u_vlan = u_file = u_len = true;
+ u_file = u_len = true;
break;
default:
@@ -5773,9 +5747,6 @@ QStringList Virtual_Machine::Build_QEMU_Args()
}
// Create String
- if( Network_Cards_Nativ[nc].Use_VLAN() && u_vlan )
- nic_str += ",vlan=" + QString::number( Network_Cards_Nativ[nc].Get_VLAN() );
-
if( Network_Cards_Nativ[nc].Use_MAC_Address() && u_macaddr )
nic_str += ",macaddr=" + Network_Cards_Nativ[ nc ].Get_MAC_Address();
@@ -5935,7 +5906,7 @@ QStringList Virtual_Machine::Build_QEMU_Args()
for( int nc = 0; nc < Network_Cards.count(); nc++ )
{
Args << "-net";
- QString nic_str = "nic,vlan=" + QString::number( Network_Cards[nc].Get_VLAN() );
+ QString nic_str = "nic";
if( ! Network_Cards[nc].Get_MAC_Address().isEmpty() ) // Use MAC?
nic_str += ",macaddr=" + Network_Cards[nc].Get_MAC_Address();
@@ -5955,16 +5926,13 @@ QStringList Virtual_Machine::Build_QEMU_Args()
case VM::Net_Mode_Usermode:
if( Network_Cards[nc].Get_Hostname().isEmpty() )
- Args << "-net" << QString( "user,vlan=" + QString::number(Network_Cards[nc].Get_VLAN()) );
- else
- Args << "-net" << QString( "user,vlan=" + QString::number(Network_Cards[nc].Get_VLAN()) +
- ",hostname=" + Network_Cards[nc].Get_Hostname() );
+ Args << "-net" << QString( "user" );
break;
case VM::Net_Mode_Tuntap:
Args << "-net" ;
- tap_tmp = QString( "tap,vlan=" + QString::number(Network_Cards[nc].Get_VLAN()) );
+ tap_tmp = QString( "tap" );
if( ! Network_Cards[nc].Get_Interface_Name().isEmpty() )
tap_tmp += QString( ",ifname=" + Network_Cards[nc].Get_Interface_Name() );
@@ -5988,7 +5956,7 @@ QStringList Virtual_Machine::Build_QEMU_Args()
break;
case VM::Net_Mode_Tuntapfd:
- Args << "-net" << QString( "tap,vlan=" + QString::number(Network_Cards[nc].Get_VLAN()) +
+ Args << "-net" << QString( "tap" +
((Network_Cards[nc].Get_File_Descriptor() > 0) ? ",fd=" + QString::number(Network_Cards[nc].Get_File_Descriptor()) : "") +
((Network_Cards[nc].Get_Interface_Name().isEmpty() == false) ? ",ifname=" + Network_Cards[nc].Get_Interface_Name() : "") );
break;
@@ -5996,53 +5964,42 @@ QStringList Virtual_Machine::Build_QEMU_Args()
case VM::Net_Mode_Tcplisten:
if( Network_Cards[nc].Get_IP_Address().isEmpty() )
{
- Args << "-net" << QString( "socket,vlan=" + QString::number(Network_Cards[nc].Get_VLAN()) +
- ",listen=:" + QString::number(Network_Cards[nc].Get_Port()) );
+ Args << "-net" << QString( "socket" );
}
else
{
- Args << "-net" << QString( "socket,vlan=" + QString::number(Network_Cards[nc].Get_VLAN()) +
- ",listen=" + Network_Cards[nc].Get_IP_Address() + ":" +
- QString::number(Network_Cards[nc].Get_Port()) );
+ Args << "-net" << QString( "socket" );
}
break;
case VM::Net_Mode_Tcpfd:
- Args << "-net" << QString( "socket,vlan=" + QString::number(Network_Cards[nc].Get_VLAN()) +
- ",fd=" + QString::number(Network_Cards[nc].Get_File_Descriptor()) );
+ Args << "-net" << QString( "socket" );
break;
case VM::Net_Mode_Tcpconnect:
if( Network_Cards[nc].Get_IP_Address().isEmpty() )
{
- Args << "-net" << QString( "socket,vlan=" + QString::number(Network_Cards[nc].Get_VLAN()) +
- ",connect=:" + QString::number(Network_Cards[nc].Get_Port()) );
+ Args << "-net" << QString( "socket" );
}
else
{
- Args << "-net" << QString( "socket,vlan=" + QString::number(Network_Cards[nc].Get_VLAN()) +
- ",connect=" + Network_Cards[nc].Get_IP_Address() +
- ":" + QString::number(Network_Cards[nc].Get_Port()) );
+ Args << "-net" << QString( "socket" );
}
break;
case VM::Net_Mode_Multicast:
if( Network_Cards[nc].Get_IP_Address().isEmpty() )
{
- Args << "-net" << QString( "socket,vlan=" + QString::number(Network_Cards[nc].Get_VLAN()) +
- ",mcast=:" + QString::number(Network_Cards[nc].Get_Port()) );
+ Args << "-net" << QString( "socket" );
}
else
{
- Args << "-net" << QString( "socket,vlan=" + QString::number(Network_Cards[nc].Get_VLAN()) +
- ",mcast=" + Network_Cards[nc].Get_IP_Address() +
- ":" + QString::number(Network_Cards[nc].Get_Port()) );
+ Args << "-net" << QString( "socket" );
}
break;
case VM::Net_Mode_Multicastfd:
- Args << "-net" << QString( "socket,vlan=" + QString::number(Network_Cards[nc].Get_VLAN()) +
- ",fd=" + QString::number(Network_Cards[nc].Get_File_Descriptor()) );
+ Args << "-net" << QString( "socket" );
break;
default:
diff --git a/src/VM_Devices.cpp b/src/VM_Devices.cpp
index bf41c56..bc8d546 100644
--- a/src/VM_Devices.cpp
+++ b/src/VM_Devices.cpp
@@ -2380,7 +2380,6 @@ VM_Net_Card_Nativ::VM_Net_Card_Nativ()
Network_Mode = VM::Net_Mode_Nativ_NIC;
Card_Model = "";
MAC = "";
- VLAN = 0;
Name = "";
Hostname = "";
PortDev = "";
@@ -2416,7 +2415,6 @@ VM_Net_Card_Nativ::VM_Net_Card_Nativ()
VHostFd = false;
_Use_MAC = false;
- _Use_VLAN = false;
_Use_Name = false;
_Use_Hostname = false;
_Use_File_Descriptor = false;
@@ -2456,7 +2454,6 @@ VM_Net_Card_Nativ::VM_Net_Card_Nativ( const VM_Net_Card_Nativ &nc )
Network_Mode = nc.Get_Network_Type();
Card_Model = nc.Get_Card_Model();
MAC = nc.Get_MAC_Address();
- VLAN = nc.Get_VLAN();
Name = nc.Get_Name();
Hostname = nc.Get_Hostname();
PortDev = nc.Get_PortDev();
@@ -2492,7 +2489,6 @@ VM_Net_Card_Nativ::VM_Net_Card_Nativ( const VM_Net_Card_Nativ &nc )
VHostFd = nc.Get_VHostFd();
_Use_MAC = nc.Use_MAC_Address();
- _Use_VLAN = nc.Use_VLAN();
_Use_Name = nc.Use_Name();
_Use_Hostname = nc.Use_Hostname();
_Use_File_Descriptor = nc.Use_File_Descriptor();
@@ -2532,7 +2528,6 @@ bool VM_Net_Card_Nativ::operator==( const VM_Net_Card_Nativ &nc ) const
if( Network_Mode == nc.Get_Network_Type() &&
Card_Model == nc.Get_Card_Model() &&
MAC == nc.Get_MAC_Address() &&
- VLAN == nc.Get_VLAN() &&
Name == nc.Get_Name() &&
Hostname == nc.Get_Hostname() &&
PortDev == nc.Get_PortDev() &&
@@ -2567,7 +2562,6 @@ bool VM_Net_Card_Nativ::operator==( const VM_Net_Card_Nativ &nc ) const
VHost == nc.Get_VHost() &&
VHostFd == nc.Get_VHostFd() &&
_Use_MAC == nc.Use_MAC_Address() &&
- _Use_VLAN == nc.Use_VLAN() &&
_Use_Name == nc.Use_Name() &&
_Use_Hostname == nc.Use_Hostname() &&
_Use_File_Descriptor == nc.Use_File_Descriptor() &&
@@ -2661,26 +2655,6 @@ void VM_Net_Card_Nativ::Set_MAC_Address( const QString &ma )
MAC = ma;
}
-bool VM_Net_Card_Nativ::Use_VLAN() const
-{
- return _Use_VLAN;
-}
-
-void VM_Net_Card_Nativ::Use_VLAN( bool use )
-{
- _Use_VLAN = use;
-}
-
-int VM_Net_Card_Nativ::Get_VLAN() const
-{
- return VLAN;
-}
-
-void VM_Net_Card_Nativ::Set_VLAN( int vl )
-{
- VLAN = vl;
-}
-
bool VM_Net_Card_Nativ::Use_Name() const
{
return _Use_Name;
@@ -3345,7 +3319,6 @@ VM_Net_Card::VM_Net_Card()
MAC = "";
Hostname = "";
Port = 0;
- VLAN = 0;
Use_TUN_TAP_Script = true;
TUN_TAP_Script = "";
Interface_Name = "";
@@ -3360,7 +3333,6 @@ VM_Net_Card::VM_Net_Card( const VM_Net_Card &nc )
IP = nc.Get_IP_Address();
MAC = nc.Get_MAC_Address();
Port = nc.Get_Port();
- VLAN = nc.Get_VLAN();
Use_TUN_TAP_Script = nc.Get_Use_TUN_TAP_Script();
TUN_TAP_Script = nc.Get_TUN_TAP_Script();
Interface_Name = nc.Get_Interface_Name();
@@ -3375,7 +3347,6 @@ bool VM_Net_Card::operator==( const VM_Net_Card &nc ) const
IP == nc.Get_IP_Address() &&
MAC == nc.Get_MAC_Address() &&
Port == nc.Get_Port() &&
- VLAN == nc.Get_VLAN() &&
Use_TUN_TAP_Script == nc.Get_Use_TUN_TAP_Script() &&
TUN_TAP_Script == nc.Get_TUN_TAP_Script() &&
Interface_Name == nc.Get_Interface_Name() &&
@@ -3596,16 +3567,6 @@ void VM_Net_Card::Set_Port( int p )
Port = p;
}
-int VM_Net_Card::Get_VLAN() const
-{
- return VLAN;
-}
-
-void VM_Net_Card::Set_VLAN( int vl )
-{
- VLAN = vl;
-}
-
bool VM_Net_Card::Get_Use_TUN_TAP_Script() const
{
return Use_TUN_TAP_Script;
diff --git a/src/VM_Devices.h b/src/VM_Devices.h
index e0537ba..02eb425 100644
--- a/src/VM_Devices.h
+++ b/src/VM_Devices.h
@@ -698,9 +698,6 @@ class VM_Net_Card
int Get_Port() const;
void Set_Port( int p );
- int Get_VLAN() const;
- void Set_VLAN( int vl );
-
bool Get_Use_TUN_TAP_Script() const;
void Set_Use_TUN_TAP_Script( bool use );
@@ -720,7 +717,6 @@ class VM_Net_Card
QString IP;
QString MAC;
int Port;
- int VLAN;
bool Use_TUN_TAP_Script;
QString TUN_TAP_Script;
QString Interface_Name;
@@ -750,11 +746,6 @@ class VM_Net_Card_Nativ
const QString &Get_MAC_Address() const;
void Set_MAC_Address( const QString &ma );
- bool Use_VLAN() const;
- void Use_VLAN( bool use );
- int Get_VLAN() const;
- void Set_VLAN( int vl );
-
bool Use_Name() const;
void Use_Name( bool use );
const QString &Get_Name() const;
@@ -922,7 +913,6 @@ class VM_Net_Card_Nativ
VM::Network_Mode_Nativ Network_Mode;
QString Card_Model;
QString MAC;
- int VLAN;
QString Name;
QString Hostname;
QString PortDev;
@@ -957,7 +947,7 @@ class VM_Net_Card_Nativ
bool VHost;
int VHostFd;
- bool _Use_MAC, _Use_VLAN, _Use_Name, _Use_Hostname, _Use_File_Descriptor,
+ bool _Use_MAC, _Use_Name, _Use_Hostname, _Use_File_Descriptor,
_Use_Interface_Name, _Use_TUN_TAP_Script, _Use_TUN_TAP_Down_Script,
_Use_Listen, _Use_Connect, _Use_MCast, _Use_Sock, _Use_Port, _Use_Group,
_Use_Mode, _Use_File, _Use_Len, _Use_Addr, _Use_Vectors, _Use_Net,
|