<!--
     Schema definition for network protocols
     This allows you to change protocol-specific settings for IPv4 or IPv6
     on a per-interface basis

     Copyright (C) 2012, Olaf Kirch <okir@suse.de>
  -->

<!-- =================================================
     IPv4
     ================================================= -->
<service name="ipv4" interface="org.opensuse.Network.Protocol.IPv4" object-class="netif">
  <define name="properties" class="dict">
    <enabled type="tristate" />
    <forwarding type="tristate" />
    <arp-verify type="tristate" />
    <arp-notify type="tristate" />
    <accept-redirects type="tristate" />
  </define>

  <method name="changeProtocol">
    <arguments>
      <!-- Note: all addresses are expected to be IPv4 -->
      <config type="properties">
        <meta:mapping document-node="ipv4" skip-unless-present="true"/>
      </config>
    </arguments>
  </method>
</service>

<!-- =================================================
     IPv6
     ================================================= -->
<service name="ipv6" interface="org.opensuse.Network.Protocol.IPv6" object-class="netif">
  <define name="properties" class="dict">
    <enabled type="tristate" />
    <forwarding type="tristate" />
    <accept-ra type="int32" constraint="enum">
      <default          value="-1"/>
      <disable          value="0"/>
      <host             value="1"/>
      <router           value="2"/>
    </accept-ra>
    <accept-dad type="int32" constraint="enum">
      <default          value="-1"/>
      <disable          value="0" />
      <fail-address     value="1" />
      <fail-protocol    value="2" />
    </accept-dad>
    <autoconf type="tristate" />
    <privacy type="int32" constraint="enum">
      <default          value="-1"/>
      <disable          value="0"/>
      <prefer-public    value="1"/>
      <prefer-temporary value="2"/>
    </privacy>
    <accept-redirects type="tristate" />
    <addr-gen-mode    type="int32" constraint="enum">
      <eui64            value="0"/>
      <none             value="1"/>
      <stable-privacy   value="2"/>
      <random           value="3"/>
    </addr-gen-mode>
    <stable-secret    type="ipv6-address" />
  </define>

  <method name="changeProtocol">
    <arguments>
      <!-- Note: all addresses are expected to be IPv6 -->
      <config type="properties">
        <meta:mapping document-node="ipv6" skip-unless-present="true"/>
      </config>
    </arguments>
  </method>
</service>

