<?xml version='1.0' encoding='UTF-8' ?>

<!--
 Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
 Use is subject to license terms.

 CDDL HEADER START

 The contents of this file are subject to the terms of the
 Common Development and Distribution License, Version 1.0 only
 (the "License").  You may not use this file except in compliance
 with the License.

 You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 or http://www.opensolaris.org/os/licensing.
 See the License for the specific language governing permissions
 and limitations under the License.

 When distributing Covered Code, include this CDDL HEADER in each
 file and include the License file at usr/src/OPENSOLARIS.LICENSE.
 If applicable, add the following below this CDDL HEADER, with the
 fields enclosed by brackets "[]" replaced with your own identifying
 information: Portions Copyright [yyyy] [name of copyright owner]

 CDDL HEADER END

    ident	"@(#)brand.dtd.1	1.6	06/02/14 SMI"
-->

<!--
  platform

    Specifies the virtual platform configuration file.  Every brand must
    include a description of the virtual platform used by zoneadmd(1M).  See
    zone_platform.dtd.1 for a description of this file.

    Its attributes are

      name	The name of the XML platform file, relative to the current
		brand installation directory (/usr/lib/brand/<name>)
-->
<!ELEMENT platform	EMPTY>

<!ATTLIST platform	name		CDATA #REQUIRED>

<!--
  validate

    Allows the brand to provide an additional validation scheme in zonecfg(1M).
    This is must be a function in a shared library with the following
    prototype:

      int validate(zone_doc_handle_t handle);

    It should return 0 on success, -1 on failure.  If specified, it is called
    after the normal zone validation.  Any detailed error messages should be
    displayed to stderr.

    Its attributes are

      function	Name of the function to call

      object	Name of the shared object.  This path is relative to the brand
		installation directory (/usr/lib/brand/<name>).
-->
<!ELEMENT validate	EMPTY>

<!ATTLIST validate	function	CDATA #REQUIRED
			object		CDATA #REQUIRED>

<!--
  verify

    Allows the brand to perform additional verification in zoneadm(1M).  This
    must be a function in a shared library with the following prototype:

      int verify(zone_doc_handle_t *handle);

    It should return 0 on success, -1 on failure.  If specified, it is called
    after normal zone verification.  Any detailed error messages should be
    displayed to stderr.

    Its attributes are

      function	Name of the function to call

      object	Name of the shared object.  This path is relative to the brand
		installation directory (/usr/lib/brand/<name>).
-->
<!ELEMENT verify	EMPTY>

<!ATTLIST verify	function	CDATA #REQUIRED
			object		CDATA #REQUIRED>

<!--
  install

    Identifies the program to invoke when installing a zone.  The following
    replacements are performed:

      %z	Name of zone
      %R	Root of zone
      %*	Additional arguments, if any

    It has no attributes.
-->
<!ELEMENT install	(#PCDATA) >

<!ATTLIST install>

<!--
  boot

    This is a program which gets run by zoneadmd when a zone is booted.
    The program will be invoked as the last step in the zone booting
    process before the the first process is spawned inside the zone.

    If this programs succeedes it should not generate any output.
    If this program returns an error, any output generated by the
    program will be sent to the zoneadmd message log.

    By default no special action is taken.
    The set of substitutions is the same as for 'install'.

    It has no attributes.
-->
<!ELEMENT boot	(#PCDATA) >

<!ATTLIST boot>

<!--
  halt

    This is a program which gets run by zoneadmd when a zone is being halted.
    This callback is provided to allow a brand to cleanup any special
    configuration that was setup during boot.

    This program will also be invoked by zoneadmd if any part of the
    zone booting process failes, even if the booting process failed before
    the brand boot program was invoked.  It is also possible that if
    the zone zone fails to halt after invoking this program, that
    future attempts to halt the zone will invoke this program again.
    So this program should be designed to clean up any resources
    allocated to a zone but it should also be able to gracefully
    handle the case where resources that it expects to release are
    not actually allocated (or have been already released.)

    If this programs succeedes it should not generate any output.
    If this program returns an error, any output generated by the
    program will be sent to the zoneadmd message log.

    By default no special action is taken.
    The set of substitutions is the same as for 'install'.

    It has no attributes.
-->
<!ELEMENT halt	(#PCDATA) >

<!ATTLIST halt>

<!--
  modname

    Path to the kernel module that implements the kernel-level
    functionality of the brand.

    It has no attributes.
-->
<!ELEMENT modname	(#PCDATA) >

<!ATTLIST modname>

<!--
  initname

    Path to the initial executable that should be launched when booting a
    branded zone.

    It has no attributes.
-->
<!ELEMENT initname	(#PCDATA) >

<!ATTLIST initname>

<!--
  brand

    The toplevel container for a brand configuration.  Requires a 'platform'
    and 'install' element.  All other elements are optional.

    Its attributes are

      name	The name of the brand.  This must match the name of the
		directory in which the configuration file is stored.
-->
<!ELEMENT brand		(platform | validate | verify | install | boot |
			halt | modname | initname)*>

<!ATTLIST brand		name		CDATA #REQUIRED>
