<!--
  tun service definitions
  -->
<service name="tun" interface="org.opensuse.Network.TUN" object-class="netif-tun">
 <description>
   This link-layer service is provided by all TUN devices.

   TUN devices can be created through the org.opensuse.Network.TUN.Factory
   factory interface.
 </description>

 <define name="configuration" class="dict">
   <owner type="uint32"/>
   <group type="uint32"/>
 </define>

 <!-- The same properties are returned in interface state reports -->
 <define name="properties" type="tun:configuration"/>

 <method name="changeDevice">
  <arguments>
   <config type="tun::configuration">
    <meta:mapping document-node="/tun" skip-unless-present="true" />
   </config>
  </arguments>
 </method>

 <method name="deleteDevice">
   <!-- no arguments, no return code -->
 </method>
</service>

<service name="tun-factory" interface="org.opensuse.Network.TUN.Factory"
			    object-class="netif-list">
 <method name="newDevice">
  <arguments>
   <name type="string"/>
   <config type="tun:configuration">
    <meta:mapping document-node="/tun"/>
   </config>
  </arguments>
  <return>
   <!-- this is really an object handle -->
   <string/>
  </return>
 </method>
</service>

<!--
  tap service definitions
  -->
<service name="tap" interface="org.opensuse.Network.TAP" object-class="netif-tap">
 <description>
   This link-layer service is provided by all TAP devices.

   TAP devices can be created through the org.opensuse.Network.TAP.Factory
   factory interface.
 </description>

 <define name="configuration" class="dict" extends="tun:configuration">
  <address type="ethernet-address"/>
 </define>

 <!-- The same properties are returned in interface state reports -->
 <define name="properties" type="tap:configuration"/>

 <method name="changeDevice">
  <arguments>
   <config type="tap:configuration">
    <meta:mapping document-node="/tap" skip-unless-present="true" />
   </config>
  </arguments>
 </method>

 <method name="deleteDevice">
   <!-- no arguments, no return code -->
 </method>
</service>

<service name="tap-factory" interface="org.opensuse.Network.TAP.Factory"
			    object-class="netif-list">
 <method name="newDevice">
  <arguments>
   <name type="string"/>
   <config type="tap:configuration">
    <meta:mapping document-node="/tap"/>
   </config>
  </arguments>
  <return>
   <!-- this is really an object handle -->
   <string/>
  </return>
 </method>
</service>
