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

<creole>
    <files>
        <service servicelist='snmpd'>snmpd</service>
        <file filelist='snmpd' name='/etc/snmp/snmpd.conf'/>
        <file filelist='snmpd' name='/etc/default/snmpd' source='snmpd.default'/>
        <service_access service='snmpd'>
            <port>161</port>
            <port protocol='udp'>161</port>
            <tcpwrapper>snmpd</tcpwrapper>
        </service_access>
        <service_restriction service='snmpd'>
            <ip interface='auto' netmask='snmp_allow_mask' netmask_type='SymLinkOption' ip_type='SymLinkOption'>snmp_allow_ip</ip>
        </service_restriction>
    </files>
    <variables>
        <family name='services'>
            <variable name='activer_snmpd' type='oui/non' description="Activer le service SNMP">
                <value>non</value>
            </variable>
        </family>
        <family name='snmpd'>
            <variable name='snmp_allow_ip' type='network' description="Adresse autorisée à se connecter au démon SNMP" multi='True' mandatory='True'/>
            <variable name='snmp_allow_mask' type='netmask' description="Masque associé à l'adresse">
                <value>255.255.255.255</value>
            </variable>
            <variable name='snmp_community' type='filename' description="Nom de la communauté">
                <value>public</value>
            </variable>
        </family>
        <separators/>
    </variables>

    <constraints>
        <condition name='disabled_if_in' source='activer_snmpd'>
            <param>non</param>
            <target type='filelist'>snmpd</target>
            <target type='servicelist'>snmpd</target>
            <target type='family'>snmpd</target>
        </condition>
        <group master='snmp_allow_ip'>
            <slave>snmp_allow_mask</slave>
            <slave>snmp_community</slave>
        </group>
        <check name='valid_networknetmask' target='snmp_allow_mask'>
            <param type='eole'>snmp_allow_ip</param>
        </check>
    </constraints>

    <help>
        <variable name='activer_snmpd'>SNMP (Simple Network Management Protocol) est un protocole d'administration distante ou locale, utilisé sur les réseaux de type Internet</variable>
        <variable name='snmp_allow_ip'>Exemple : adresse IP de la console de supervision SNMP</variable>
        <variable name='snmp_allow_mask'>Masque de sous-réseau associé à l'adresse : pour une machine isolée, utiliser 255.255.255.255</variable>
        <variable name='snmp_community'>La communauté permet de créer des domaines d'administration</variable>
    </help>

</creole>
<!-- vim: ts=4 sw=4 expandtab
-->
