module yuma-arp {

    namespace "http://netconfcentral.org/ns/yuma-arp";

    prefix "arp";

    import yuma-ncx { prefix ncx; }
    import ietf-inet-types { prefix inet; }
    import ietf-yang-types { prefix yang; }

    organization  "Netconf Central";     

    contact "Andy Bierman <andy@netconfcentral.org>.";

    description
      "This module contains a collection of YANG definitions for
       configuring and monitoring ARP.

     Copyright (c) 2011 - 2012 Andy Bierman and the persons
     identified as authors of the code.  All rights reserved.

     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject
     to the license terms contained in, the BSD 3-Clause License
     http://opensource.org/licenses/BSD-3-Clause";

    revision 2012-01-13 {
      description
        "Add ncx:user-write restriction to prevent user deletion.";
     }

    revision 2011-08-25 {
      description
        "Initial revision;
         From yuma submission by Igor Smolyar and Zohar M.";
     }
       
    container arp {
        ncx:user-write update;

        description
            "System ARP settings.";

/*
        leaf collection-enabled {
          type boolean;
          default true;
          description 
            "Enable dynamic arp collection";
        }
*/

        grouping arp-entry {
            leaf ip-address {
                type inet:ipv4-address;
                description 
                  "The IPv4 address for the ARP table entry.";
            }
            
            leaf mac-address {
                type yang:mac-address;
                description
                  "The MAC address for the ARP table entry.";
            }
        }

        container arp-settings {
            description
                "System ARP Table Settings.";

            leaf maximum-entries {
                type uint32 {
                    range "1024 .. 16384";
                }
                description
                "The maximum entries for the ARP table.";
            }
            leaf validity-timeout {
                type uint32 {
                    range "60 .. 86400";
                }
                units seconds;
                description
                    "The validity timeout for the ARP table.";
            }
        }
        
        container static-arps {
            description
              "System static ARP table entries.";

            list static-arp {
                key "ip-address";
                description
                    "One static-ARP entry.";
                uses arp-entry;
            }
        }
        
        container dynamic-arps {
            config false;
            description
              "System dynamic ARP table entries.";

            list dynamic-arp {
                key "ip-address";
                description
                    "One dynamic-ARP entry.";
                uses arp-entry;
            }
        }
    }
}
