module odl-inet-binary-types {

    yang-version 1;
    namespace "urn:opendaylight:lfm:inet-binary-types";
    prefix "inet-binary";

    contact
        "Lori Jakab <lojakab@cisco.com>";

    description
        "Binary representation type definitions for IPv4 and IPv6 addresses and
         prefixes";

    revision "2016-03-03" {
        description "Initial revision.";
    }

    typedef ipv4-address-binary {
        type binary {
            length "4";
        }
        description
            "The ipv4-address-binary type represents an IPv4 address in binary
             in network byte order.";
    }

    typedef ipv6-address-binary {
        type binary {
            length "16";
        }
        description
            "The ipv6-address-binary type represents an IPv6 address in binary
             in network byte order.";
    }

    typedef ip-address-binary {
        type union {
            type ipv4-address-binary;
            type ipv6-address-binary;
        }
        description
            "The ip-address-binary type represents an IP address in binary
             in network byte order, and is IP version neutral.  The length of
             the byte array implies the IP version.";
    }
}