VirtualBox

Changeset 45117 in vbox for trunk/src/VBox/Main/idl


Ignore:
Timestamp:
Mar 21, 2013 8:16:22 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
84411
Message:

Main/NATNetwork API (xTracker/5894).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r45068 r45117  
    235235<library
    236236  name="VirtualBox"
    237   uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
     237  uuid="d7569351-1750-46f0-936e-bd127d5bc264"
    238238  version="1.3"
    239239  desc="VirtualBox Type Library"
     
    13161316  /////////////////////////////////////////////////////////////////////////
    13171317  -->
     1318  <!-- This is experimental interface to LWIP based NAT server -->
     1319  <interface name="INATNetwork" extends="$unknown"
     1320    uuid="03DFD6F7-1B78-48A3-8345-C785281E9523"
     1321    wsmap="managed">
     1322    <attribute name="NetworkName" type="wstring">
     1323      <desc>
     1324        TBD: the idea, technically we can start any number of the NAT networks,
     1325        but we should expect that at some point we will get collisions because of
     1326        port-forwanding rules. so perhaps we should support only single instance of NAT
     1327        network.
     1328      </desc>
     1329    </attribute>
     1330    <attribute name="enabled" type="boolean"/>
     1331    <attribute name="network" type="wstring">
     1332      <desc>
     1333        This is CIDR IPv4 string. Specifiying it user defines IPv4 addresses
     1334        of gateway (low address + 1) and dhcp server (= low address + 2).
     1335        Note: if there're defined IPv4 port-forward rules update of network
     1336        will be ignored (because new assignment could break existing rules).
     1337      </desc>
     1338    </attribute>
     1339    <attribute name="gateway" type="wstring" readonly="yes">
     1340      <desc>
     1341        This attribute is read-only. It's recalculated on changing
     1342        network attribute (low address of network + 1).
     1343      </desc>
     1344    </attribute>
     1345    <attribute name="IPv6Enabled" type="boolean">
     1346      <desc>
     1347        This attribute define whether gateway will support IPv6 or not.
     1348      </desc>
     1349    </attribute>
     1350    <attribute name="IPv6Prefix" type="wstring">
     1351      <desc>
     1352        This a CIDR IPv6 defining prefix for link-local addresses autoconfiguration     within network. Note: ignored if attribute ipv6enabled is false.
     1353      </desc>
     1354    </attribute>
     1355    <attribute name="advertiseDefaultIPv6RouteEnabled" type="boolean"/>
     1356    <attribute name="needDhcpServer" type="boolean"/>
     1357    <attribute name="eventSource" type="IEventSource" readonly="yes"/>
     1358    <attribute name="portForwardRules4" type="wstring" readonly="yes" safearray="yes">
     1359      <desc>Array of NAT port-forwarding rules in string representation,
     1360      in the following format:
     1361      "name:protocolid:[host ip]:host port:[guest ip]:guest port".
     1362      </desc>
     1363    </attribute>
     1364    <attribute name="portForwardRules6" type="wstring" readonly="yes" safearray="yes">
     1365      <desc>Array of NAT port-forwarding rules in string representation, in the
     1366      following format: "name:protocolid:[host ip]:host port:[guest ip]:guest port".
     1367      </desc>
     1368    </attribute>
     1369    <method name="addPortForwardRule">
     1370      <param name="isIpv6" type="boolean" dir="in"/>
     1371      <param name="ruleName" type="wstring" dir="in"/>
     1372      <param name="proto" type="NATProtocol" dir="in">
     1373        <desc>Protocol handled with the rule.</desc>
     1374      </param>
     1375      <param name="hostIP" type="wstring" dir="in">
     1376        <desc>IP of the host interface to which the rule should apply.
     1377        An empty ip address is acceptable, in which case the NAT engine
     1378        binds the handling socket to any interface.
     1379        </desc>
     1380      </param>
     1381      <param name="hostPort" type="unsigned short" dir="in">
     1382        <desc>The port number to listen on.</desc>
     1383      </param>
     1384      <param name="guestIP" type="wstring" dir="in">
     1385        <desc>The IP address of the guest which the NAT engine will forward
     1386        matching packets to. An empty IP address is not acceptable.</desc>
     1387        </param>
     1388        <param name="guestPort" type="unsigned short" dir="in">
     1389          <desc>The port number to forward.</desc>
     1390        </param>
     1391    </method>
     1392    <method name="removePortForwardRule">
     1393      <param name="iSipv6" type="boolean" dir="in"/>
     1394      <param name="ruleName" type="wstring" dir="in"/>
     1395    </method>
     1396    <method name="start">
     1397      <param name="trunkType" type="wstring" dir="in">
     1398        <desc>
     1399          Type of internal network trunk.
     1400        </desc>
     1401      </param>
     1402    </method>
     1403    <method name="stop"/>
     1404  </interface>
    13181405
    13191406  <interface
     
    14301517  <interface
    14311518    name="IVirtualBox" extends="$unknown"
    1432     uuid="3b2f08eb-b810-4715-bee0-bb06b9880ad2"
     1519    uuid="fafa4e17-1ee2-4905-a10e-fe7c18bf5554"
    14331520    wsmap="managed"
    14341521    >
     
    15981685      </desc>
    15991686    </attribute>
     1687    <!-- Array of NAT networks -->
     1688    <attribute name="NATNetworks" type="INATNetwork" safearray="yes" readonly="yes"/>
    16001689
    16011690    <attribute name="eventSource" type="IEventSource" readonly="yes">
     
    22752364    </method>
    22762365
     2366    <!-- bunch of metods to create NAT -->
     2367    <method name="createNATNetwork">
     2368      <!-- Here we create a record in NAT network array with name
     2369           and gateway/network parameters this information should
     2370           be enough for VBoxNet[Lwip]NAT and VBoxNetDHCP for
     2371           servicing the guests.
     2372      -->
     2373      <param name="networkName" type="wstring" dir="in"/>
     2374      <param name="network" type="INATNetwork" dir="out"/>
     2375    </method>
     2376 
     2377     <!--
     2378          Returns the NATNetwork by name, e.g. for adding porforward rule or delition.
     2379      -->
     2380     <method name="findNATNetworkByName">
     2381      <param name="networkName" type="wstring" dir="in"/>
     2382      <param name="network" type="INATNetwork" dir="out"/>
     2383    </method>
     2384    <!--
     2385        Deletes given NAT network.
     2386     -->
     2387    <method name="removeNATNetwork">
     2388       <param name="network" type="INATNetwork" dir="in"/>
     2389    </method>
    22772390
    22782391    <method name="checkFirmwarePresent">
     
    1872418837      </desc>
    1872518838    </const>
     18839    <const name="OnNATNetworkChanged" value="74">
     18840      <desc>
     18841        See <link to="INATNetworkChangedEvent">INATNetworkChangedEvent</link>.
     18842      </desc>
     18843    </const>
     18844    <const name="OnNATNetworkStartStop" value="75">
     18845      <desc>
     18846        See <link to="INATNetworkStartStopEvent">INATNetworkStartStopEvent</link>.
     18847      </desc>
     18848    </const>
     18849    <const name="OnNATNetworkAlter" value="76">
     18850      <desc>
     18851        See <link to="INATNetworkAlterEvent">INATNetworkAlterEvent</link>.
     18852      </desc>
     18853    </const>
     18854    <const name="OnNATNetworkCreationDeletion" value="77">
     18855      <desc>
     18856        See <link to="INATNetworkCreationDeletionEvent">INATNetworkCreationDeletionEvent</link>.
     18857      </desc>
     18858    </const>
     18859    <const name="OnNATNetworkSetting" value="78">
     18860      <desc>
     18861        See <link to="INATNetworkSettingEvent">INATNetworkSettingEvent</link>.
     18862      </desc>
     18863    </const>
     18864    <const name="OnNATNetworkPortForward" value="79">
     18865      <desc>
     18866        See <link to="INATNetworkPortForwardEvent">INATNetworkPortForwardEvent</link>.
     18867      </desc>
     18868    </const>
    1872618869
    1872718870    <!-- Last event marker -->
    18728     <const name="Last" value="74">
     18871    <const name="Last" value="80">
    1872918872      <desc>
    1873018873        Must be last event, used for iterations and structures relying on numerical event values.
     
    2018220325    </attribute>
    2018320326  </interface>
    20184 
     20327  <interface
     20328    name="INATNetworkChangedEvent" extends="IEvent"
     20329    uuid="101ae042-1a29-4a19-92cf-02285773f3b5"
     20330    wsmap="managed" autogen="VBoxEvent" id="OnNATNetworkChanged"
     20331    >
     20332    <!-- network name is common setting for all event types -->
     20333    <attribute name="NetworkName" type="wstring" readonly="yes"/>
     20334  </interface>
     20335  <!-- base class for start/stop events -->
     20336  <interface name="INATNetworkStartStopEvent" extends="INATNetworkChangedEvent"
     20337             uuid="269d8f6b-fa1e-4cee-91c7-6d8496bea3c1"
     20338             wsmap="managed" autogen="VBoxEvent" id="OnNATNetworkStartStop">
     20339    <attribute name="startEvent" type="boolean" readonly="yes">
     20340      <desc>
     20341        IsStartEvent is true when NAT network is started and false on stopping.
     20342      </desc>
     20343    </attribute>
     20344  </interface>
     20345 
     20346  <!-- base class for modification events -->
     20347  <interface name="INATNetworkAlterEvent" extends="INATNetworkChangedEvent"
     20348             uuid="3f5a0822-163a-43b1-ad16-8d58b0ef6e75"
     20349             wsmap="managed" autogen="VBoxEvent" id="OnNATNetworkAlter"/>
     20350 
     20351  <interface name="INATNetworkCreationDeletionEvent" extends="INATNetworkAlterEvent"
     20352             uuid="8d984a7e-b855-40b8-ab0c-44d3515b4528"
     20353             wsmap="managed" autogen="VBoxEvent" id="OnNATNetworkCreationDeletion">
     20354    <attribute name="creationEvent" type="boolean" readonly="yes"/>
     20355  </interface>
     20356  <interface name="INATNetworkSettingEvent" extends="INATNetworkAlterEvent"
     20357             uuid="9db3a9e6-7f29-4aae-a627-5a282c83092c"
     20358             wsmap="managed" autogen="VBoxEvent" id="OnNATNetworkSetting">
     20359    <attribute name="enabled" type="boolean" readonly="yes"/>
     20360    <attribute name="network" type="wstring" readonly="yes"/>
     20361    <attribute name="gateway" type="wstring" readonly="yes"/>
     20362    <attribute name="advertiseDefaultIPv6RouteEnabled" type="boolean" readonly="yes"/>
     20363    <attribute name="needDhcpServer" type="boolean" readonly="yes"/>
     20364  </interface>
     20365  <interface name="INATNetworkPortForwardEvent" extends="INATNetworkAlterEvent"
     20366             uuid="2514881b-23d0-430a-a7ff-7ed7f05534bc"
     20367             wsmap="managed" autogen="VBoxEvent" id="OnNATNetworkPortForward">
     20368    <attribute name="create" type="boolean" readonly="yes"/>
     20369    <attribute name="ipv6" type="boolean" readonly="yes"/>
     20370    <attribute name="name"  type="wstring" readonly="yes"/>
     20371    <attribute name="proto"  type="NATProtocol" readonly="yes"/>
     20372    <attribute name="hostIp"  type="wstring" readonly="yes"/>
     20373    <attribute name="hostPort"  type="long" readonly="yes"/>
     20374    <attribute name="guestIp"  type="wstring" readonly="yes"/>
     20375    <attribute name="guestPort"  type="long" readonly="yes"/>
     20376  </interface>
     20377 
    2018520378  <module name="VBoxSVC" context="LocalServer">
    2018620379    <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette