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

 <!-- This are the properties used to configure the ipip 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 -->
 </define>

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

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

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

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