<?xml version="1.0" ?>
<!DOCTYPE MixConfiguration SYSTEM "MixConfiguration.dtd">

<!-- XML File for Mix Configuration -->

<MixConfiguration version="0.6">  <!-- Root-Element -->
<!-- Changes in Version 0.2:
		- added attr 'hidden' and 'virtual' to ListenerInterface
	- Changes in Version 0.3:
		- added Encrypted Log
	- Changes in Version 0.4:
		- added Payment
    - Changes in Version 0.5:
       - added <InfoServices>
    - changes in Version 0.6:
       - added Keep-Alive-Traffic Information
-->
<General>
	<MixID> <!-- The MixID MUST be the SubjectKeyIdentifier of the mix certificate's
	        public key in uppercase hex letters without spaces  -->
	</MixID>
	<MixType> <!--- One of: FirstMix | MiddleMix | LastMix --> </MixType>
	<MixName> <!-- human readble String which shortly describes the Mix --> </MixName>
	<CascadeName>
	<!-- human readable String which shortly describes the whole Mix-Cascade
	Only available if MixType==FirstMix
	--></CascadeName>
	<Daemon> <!-- Should the mix run in the background as daemon ? Values: True | False --> </Daemon>
	<UserID> <!-- The username the Mix-process should use when running --> </UserID>
	<NrOfFileDescriptors> <!-- max Number of file descriptors the mix should use --> </NrOfFileDescriptors>

	<Logging>
		<!-- Information of how to log some events -->
		<!-- Only one of File|SysLog|Console is possible -->
		<File compressed="True|False">
          <!--The file to which the log data should be written-->
        </File>
		<SysLog>  <!-- Values: True | False --> </SysLog>
		<Console> <!-- Values: True | False, must be False, if Daemon=True --> </Console>

		<!-- Additional some log information could be store encrypted -->
		<EncryptedLog>
			<File><!--The file to which the log data should be writen--></File>
			<KeyInfo> <!--The key to use-->
				<X509Data>
					<X509Certificate>
						...
					</X509Certificate>
				</X509Data>
			</KeyInfo>
		</EncryptedLog>
	</Logging>
</General>

<Network>
	<ListenerInterfaces>
		<!-- Describes on which interfaces (IP-Addresses etc.) the Mix should listen for incoming connections-->

		<ListenerInterface hidden="True|False" virtual="True|False">
			<!-- Describes one Listener, only first mixes could have more than one Listener-->
			<!-- A Listener uses either TCP/IP or Unix Domain Sockets -->
			<!-- If a ListenerInterface is "hidden" this means, that information about this interface
					is not propagate to the InfoService -->
			<!-- If a ListenerInterface is "virtual" this means, that the Mix will not really bind and listen
					on this interface (but information about this interface is transfered to the InfoService) -->
			<!-- Note: "hidden" and "virtual" are usefully for instance if the mix is behind a NAT-Gateway -->

			<!-- NEW: Type of Listener Interface-->
			<NetworkProtocol><!-- Possible Values: RAW/TCP, RAW/UNIX, SSL/TCP, SSL/UNIX --></NetworkProtocol>
			<!-- For TCP/IP (if type= */TCP) -->
			<Host> <!-- Hostname or IP on which to listen --> </Host>
			<Port> <!-- Port on which to listen--></Port>
			<!-- For Unix Domain Sockets (if type= */UNIX)-->
			<File> <!-- Filename, which should be used for Unix Domain Sockets--> </File>
	 </ListenerInterface>
	</ListenerInterfaces>

	<NextMix>
	<!-- Describes how to connect to the next mix,
			 only useful for First- or MiddleMix -->
			 <NetworkProtocol>  !-- Possible Values: RAW/TCP, RAW/UNIX, SSL/TCP, SSL/UNIX --></NetworkProtocol>
			 <Host> hostname or ip of next Mix </Host>
			 <Port> port of next mix </Port>
			 <File> <!-- Filename, if unix Domain Sockets should be used --> </File>
	</NextMix>

	<Proxies>
	<!-- Describes which proxies are available for the last mix and how to reach them,
			only useful for the last mix -->

			<Proxy>
				<!-- Describes one single proxy -->
					<ProxyType> <!-- Type of Proxy, one of: HTTP|SOCKS --></ProxyType>
					<NetworkProtocol> !-- Network protocol -- Possible Values: RAW/TCP, RAW/UNIX, SSL/TCP, SSL/UNIX --></NetworkProtocol>
					<!-- How to reach this proxy ?-->
					<Host> </Host>
					<Port> </Port>
					<File> </File>
					<VisibleAddresses> <!-- Describes the visible addresses from the 'outside world' -->
					     <VisibleAddress>
					        <Host> <!-- Host or IP -->
					       </Host>
					      </VisibleAddress>
					 </VisibleAddresses>
			</Proxy>

	</Proxies>
		<InfoServices>
			<!-- Describes how to connect to one or more InfoServices;
			     Replaces the old InfoService tag -->
			<InfoService>
     		<ListenerInterfaces>
					<ListenerInterface>
						<Host> hostname or ip of the InfoService </Host>
			 			<Port> port of the InfoService </Port>
					</ListenerInterface>
				</ListenerInterfaces>
			</InfoService>
			<!-- If set to 'true', the InfoService may change previous/next mix.
			If 'fallback' is 'true' this change may only happen if the default mixes are not available for some time. -->
			<AllowAutoConfiguration fallback="true|false">True</AllowAutoConfiguration>
    </InfoServices>
	<InfoService>
		<!-- Deprecated tag: Describes how to connect to the InfoService
		     is ignored if the InfoServices tag is set -->
			 <Host> hostname or ip of the InfoService </Host>
			 <Port> port of the InfoService </Port>
			 <!-- If set to 'true', the InfoService may change previous/next mix.
			 If 'fallback' is 'true' this change may only happen if the default mixes are not available for some time. -->
			 <AllowAutoConfiguration fallback="true|false">True</AllowAutoConfiguration>
	</InfoService>
	<KeepAlive>
		<!-- Since Version 0.6 -->
		<!-- Gives information about the "Keep-Alive"-protocol
		    between Mixes -->
		<SendInterval>
			<!-- minimum packet send interval (in seconds)
			     from Mix n to Mix n-1 -->
			...
		</SendInterval>
		<ReceiveInterval>
			<!-- minimum packet receive interval (in seconds)
			     from Mix n-1 to Mix n -->
			...
		</ReceiveInterval>
	</KeepAlive>

</Network>

<Certificates>
	<OwnCertificate>
		<X509PKCS12>
			<!-- Base64 encoded version of the DER encoded version of a PKCS#12 structure which includes the private key and X.509 Certificate -->
		</X509PKCS12>

		<X509Certificate>
			<!-- Base64 encoded version of the DER encoded version of the X.509 Certificate -->
			<!-- this is the public test certificate, which belongs to the certificate above -->
		</X509Certificate>
	</OwnCertificate>
	<OperatorOwnCertificate>
		<X509PKCS12>
			<!-- Base64 encoded version of the DER encoded version of a PKCS#12 structure which includes the private key
			     and one or more X.509 Certificates -->
		</X509PKCS12>
		<X509Certificate>
			<!-- Base64 encoded version of the DER encoded version of the X.509 Certificate -->
			<!-- this is the public test certificate, which belongs to the certificate above -->
		</X509Certificate>
		<X509Certificate>
			<!-- Base64 encoded version of the DER encoded version of the X.509 Certificate -->
			<!-- first cert of a verification chain of one or more public certificates for the public cert above -->
		</X509Certificate>
	</OperatorOwnCertificate>

	<PrevMixCertificate>
	<!-- X.509 Public Key Test Certificate of the key from the previous mix -->
		<X509Certificate>
			<!-- Base64 encoded version of the DER encoded version of the X.509 Certificate -->
		</X509Certificate>
	</PrevMixCertificate>

	<NextMixCertificate>
	<!-- X.509 Public Key Test Certificate of the key from the next mix -->
		<X509Certificate>
			<!-- Base64 encoded version of the DER encoded version of the X.509 Certificate -->
		</X509Certificate>
	</NextMixCertificate>
</Certificates>

<Description><!-- optional; is hard-linked with the certificate information!  -->
	<Location> <!-- Describes the location of the mix server -->
		<City>    <!-- optional --></City>
		<Country> <!-- optional; a two-letter ISO country code --></Country>
		<State> <!-- optional --> </State>

		<Position>
			<Geo> <!--The geographical position of the mix server -->
				<Longitude></Longitude>
				<Latitude></Latitude>
			</Geo>
		</Position>

	</Location>

	<Operator> <!-- who is operating this mix? -->
		<Organisation> <!-- The name of the operating organisation or a person's name for private operators --> </Organisation>
		<OrganisationalUnit>  </OrganisationalUnit>
		<URL> <!-- optional; a url that leads to more information on the operator, including contact information --> </URL>
		<EMail> <!-- optional; the EMail address of the operator --> </EMail>
		<Country><!-- optional; a two-letter ISO country code --> </Country>
	</Operator>

</Description>


<MixOnCD>
	<Network dhcp="true|false">
		<Hostname><!-- Hostname (optional - default: "mixoncd" --></Hostname>
	 	<NetworkInterface><!-- NIC identifier (optional - default: "eth0") --></NetworkInterface>
 		<IP><!-- IPv4 address [XXX.XXX.XXX.XXX] (optional - omitting implies DHCP-based or manual configuration!) --></IP>
	 	<SubnetMask><!-- IPv4 subnet mask [XXX.XXX.XXX.XXX] (optional - see above! --></SubnetMask>
 		<DefaultGateway><!-- IPv4 address of standard gateway [XXX.XXX.XXX.XXX] (optional - see above!) --></DefaultGateway>
		<DNSServers>
			<IP><!-- IPv4 address of primary nameserver [XXX.XXX.XXX.XXX] (optional - see above!) --></IP>
			<IP><!-- IPv4 address of secondary nameserver [XXX.XXX.XXX.XXX] (optional - see above!) --></IP>
			<!-- ... -->
		</DNSServers>
	</Network>
	<Login>
		<RootPassword user="root"><!-- Superuser's password (optional) --> </RootPassword>
		<UserPassword user="mix"><!-- Password of regular user "mix" for SSH login (optional)--></UserPassword>
		<!-- ... -->
	</Login>
</MixOnCD>

<Accounting>
	<!-- This section contains the configuration for the accounting instance (payment functionality). -->

	<PaymentInstance>
		<!-- For the payment functionality to work, the accounting instance needs to connect to
			the JPI (Java Payment Instance) to settle cost confirmations -->
		<Host><!-- Hostname or IP(v4) Address --></Host>
			<!-- The Hostname or IP Address of the JPI -->
		<Port><!-- Port number --></Port>
			<!-- The TCP Port Number of the JPI -->
	</PaymentInstance>

	<Database>
		<!-- The accounting instance needs to connect to a PostgresQL server to store cost
			confirmations and some other data which must be stored persistent -->
		<Host><!-- Hostname or IP(v4) Address --></Host>
			<!-- The Hostname or IP Address of the PostgresQL server -->
		<Port><!-- Port number --></Port>
			<!-- The TCP Port Number of the PostgresQL server -->
		<DBName><!-- Database name --></DBName>
			<!-- The name of the database that should be used -->
		<Username><!-- Database Username --></Username>
			<!-- The PostgresQL user name -->
	</Database>

</Accounting>

</MixConfiguration>
