<!--
  sit service definition
  -->
<service name="sit" interface="org.opensuse.Network.SIT"
                    object-class="netif-sit">
 <description>
   This link-layer service is provided by the SIT tunnel devices.

   SIT tunnels can be created through the org.opensuse.Network.SitTunnel.Factory
   factory interface.

   Note, that sit0 is automatically created at module load time and
   provides an automatic tunneling (use on your own risk). Deleting
   it, cause to delete all further tunnels (sit1, ...) that can be
   created for point-to-point tunnels. So just start with sit1.
 </description>

 <!-- This are the properties used to configure the sit tunnel -->
 <define name="configuration" class="dict">
  <device type="string">
    <meta:netif-reference shared="true"/>
    <meta:require check="netif-config-state" op="newDevice" min-state="device-up" />
    <meta:require check="netif-config-state" op="login" min-state="link-authenticated" />
    <meta:require check="netif-config-state" op="linkUp" min-state="link-up" />
    <meta:require check="netif-system-state" op="linkDown" max-state="firewall-up" />
    <meta:require check="netif-system-state" op="deleteDevice" max-state="device-down" />
  </device>
  <local-address   type="ipv4-address"/>
  <remote-address  type="ipv4-address"/>
  <ttl             type="uint16"/>	<!-- u8 from netlink -->
  <tos             type="uint16"/>	<!-- u8 from netlink -->
  <pmtudisc        type="boolean"/>	<!-- u8 from netlink -->
  <isatap          type="boolean"/>
 </define>

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

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

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

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