All Downloads are FREE. Search and download functionalities are using the official Maven repository.

[email protected] Maven / Gradle / Ivy

There is a newer version: 1.20.1
Show newest version
module odl-lisp-proto {

    yang-version 1;
    namespace "urn:opendaylight:lfm:lisp-proto";
    prefix "lisp-proto";

    import ietf-inet-types { prefix inet; revision-date 2013-07-15; }
    import odl-inet-binary-types { prefix inet-bin; revision-date 2016-03-03; }
    import odl-lisp-address-types { prefix odl-lisp-address; revision-date 2016-05-04; }

    organization "LISP Flow Mapping";

    contact
        "David Goldberg 
        Vina Ermagan ";

    description
        "YANG representation of LISP (RFC6830) protocol.";

    revision "2015-11-05" {
        description "Renamed the module to lisp-proto.";
        reference "https://tools.ietf.org/html/rfc6830";
    }

    typedef xtr-id {
        type binary {
            length "16";
        }
        description
            "128 bit xTR identifier.";
    }

    typedef site-id {
        type binary {
            length "8";
        }
        description
            "64 bit site identifier.";
    }

    grouping transport-address {
        container transport-address {
            leaf ipAddress {
                type inet-bin:ip-address-binary;
                reference "http://www.iana.org/assignments/safi-namespace/safi-namespace.xhtml";
            }
            leaf port {
                type inet:port-number;
            }
        }
    }

    grouping mapping-authkey-container {
        container mapping-authkey {
            leaf key-string {
                type string;
            }
            leaf key-type {
                type uint16;
            }
        }
    }

    grouping eid-container {
        container eid {
            uses odl-lisp-address:augmented-lisp-address;
        }
    }

    grouping rloc-container {
        container rloc {
            uses odl-lisp-address:augmented-lisp-address;
        }
    }

    grouping eid-list {
        list eid-item {
            key "eid-item-id";
            ordered-by user;
            leaf eid-item-id {
                type string;
            }
            uses eid-container;
        }
    }

    grouping LocatorRecords {
        list LocatorRecord {
            key "locator-id";
            ordered-by user;
            leaf locator-id {
                type string;
            }
            leaf priority {
                type uint8;
            }
            leaf weight {
                type uint8;
            }
            leaf multicastPriority {
                type uint8;
            }
            leaf multicastWeight {
                type uint8;
            }
            leaf localLocator {
                type boolean;
            }
            leaf rlocProbed {
                type boolean;
            }
            leaf routed {
                type boolean;
            }

            //locator address
            uses rloc-container;
        }
    }

    grouping map-request-metadata {
        leaf source-rloc {
            type inet-bin:ip-address-binary;
            description
                "The Source IP address used for sending the enclosing control
                packet in RLOC space.";
        }
        description
            "This is a collection of fields which are not present in the actual
            mapping record defined in RFC 6830, but are used internally in
            OpenDaylight";
    }

    grouping mapping-record-metadata {
        leaf xtr-id {
            type xtr-id;
            description
                "128 bit xTR identifier.";
        }
        leaf site-id {
            type site-id;
            description
                "64 bit site identifier.";
        }
        leaf source-rloc {
            type inet-bin:ip-address-binary;
            description
                "The Source IP address used for sending the enclosing control
                 packet in RLOC space.";
        }
        leaf timestamp {
            type int64;
            description
                "Milliseconds since January 1, 1970, 00:00:00 GMT";
        }
        description
            "This is a collection of fields which are not present in the actual
            mapping record defined in RFC 6830, but are used internally in
            OpenDaylight";
    }

    grouping mapping-record-container {
        container mapping-record {
            leaf recordTtl {
                type int32;
                description
                    "A mapping record's time to live in Minute(s)";
            }
            leaf mapVersion {
                type int16;
            }
            leaf action {
                type enumeration {
                    enum NoAction;
                    enum NativelyForward;
                    enum SendMapRequest;
                    enum Drop;
                }
            }
            leaf authoritative {
                type boolean;
            }
            // EID prefix
            uses eid-container;

            // locator record list
            uses LocatorRecords;

            // metadata
            uses mapping-record-metadata;
        }
    }

    grouping mapping-record-list {
        list mapping-record-item {
            key "mapping-record-item-id";
            ordered-by user;
            leaf mapping-record-item-id {
                type string;
            }
            uses mapping-record-container;
        }
    }

    grouping xtrSiteId {
        leaf xtrId {
            type xtr-id;
        }
        leaf siteId {
            type site-id;
        }
    }

    grouping MapRegister {
        reference "http://tools.ietf.org/html/rfc6830#section-6.1.6 , http://tools.ietf.org/html/draft-ermagan-lisp-nat-traversal-05#section-4.3";
        leaf proxyMapReply {
            type boolean;
        }
        leaf xtrSiteIdPresent {
            type boolean;
        }
        leaf wantMapNotify {
            type boolean;
        }
        leaf nonce {
            type int64;
        }
        leaf keyId {
            type int16;
        }
        leaf authenticationData {
            type binary;
        }
        leaf mergeEnabled {
            type boolean;
        }
        uses mapping-record-list;
        uses xtrSiteId;
    }

    grouping MapNotify {
        reference "http://tools.ietf.org/html/rfc6830#section-6.1.7 , http://tools.ietf.org/html/draft-ermagan-lisp-nat-traversal-05#section-4.3";
        leaf xtrSiteIdPresent {
            type boolean;
        }
        leaf nonce {
            type int64;
        }
        leaf keyId {
            type int16;
        }
        leaf authenticationData {
            type binary;
        }
        leaf mergeEnabled {
            type boolean;
        }
        uses mapping-record-list;
        uses xtrSiteId;
    }

    grouping MapRequest {
        reference "http://tools.ietf.org/html/rfc6830#section-6.1.2";
        leaf authoritative {
            type boolean;
        }
        leaf mapDataPresent {
            type boolean;
        }
        leaf probe {
            type boolean;
        }
        leaf smr {
            type boolean;
        }
        leaf pitr {
            type boolean;
        }
        leaf smrInvoked {
            type boolean;
        }
        leaf nonce {
            type int64;
        }
        container SourceEid {
            uses eid-container;
        }
        list itrRloc {
            key "itr-rloc-id";
            ordered-by user;
            leaf itr-rloc-id {
                type string;
            }
            uses rloc-container;
        }
        uses eid-list;
        container MapReply {
            uses mapping-record-container;
        }
        uses map-request-metadata;
    }

    grouping MapReply {
        reference "http://tools.ietf.org/html/rfc6830#section-6.1.4";
        leaf probe {
            type boolean;
        }
        leaf nonce {
            type int64;
        }
        leaf echoNonceEnabled {
            type boolean;
        }
        leaf securityEnabled {
            type boolean;
        }
        uses mapping-record-list;
    }

    grouping map-register-cache-key-container {
        container map-register-cache-key {
            leaf eid-prefix {
                type binary;
                description
                    "The EID prefix stored as binary data";
            }
            leaf xtr-id {
                type binary;
                description
                    "128 bit xTR identifier.";
            }
            leaf site-id {
                type binary;
                description
                    "64 bit site identifier.";
            }
            description
                "The lookup key in the Map-Register fast path.";
        }
    }

    grouping map-register-cache-metadata-container {
        container map-register-cache-metadata {
            list eid-lisp-address {
                key "eid-lisp-address-id";
                leaf eid-lisp-address-id {
                    type string;
                }
                uses eid-container;
                description "List of EID-Prefixes from Map-Register message.";
            }
            leaf xtr-id {
                type xtr-id;
                description
                    "128 bit xTR identifier.";
            }
            leaf site-id {
                type site-id;
                description
                    "64 bit site identifier.";
            }
            leaf timestamp {
                type int64;
                description
                    "Milliseconds since January 1, 1970, 00:00:00 GMT";
            }
            leaf want-map-notify {
                type boolean;
                description
                    "xTR askes for Map-Register acknowledgement in form of
                    a Map-Notify control message.";
            }
            leaf merge-enabled {
                type boolean;
                description "Value of 22th bit in map register message.";
            }
            description
                "The Map-Register cache metadata is information for a mapping
                database about mapping update event, without the full Map-Register
                packet data. The metadata and the packet data together will form
                the Map-Register cache value.";
        }
    }

    grouping map-register-cache-value-grouping {
        container map-register-cache-value {
            uses map-register-cache-metadata-container;
            uses mapping-authkey-container;
            leaf packet-data {
                type binary;
                description
                    "Map-Register packet contents";
            }
        }
    }

    grouping subscriber-data-grouping {
        container subscriber-data {
            description
                "A network element which subscribed to notifications about mapping changes.";
            uses rloc-container;
            uses eid-container;
            leaf ttl {
                type int32;
                description
                    "The time to live for the subscriber entry in minutes";
            }
        }
    }

    typedef message-type {
        type enumeration {
            enum reserved {
                value 0;
                description
                    "Reserved";
            }
            enum map-request {
                value 1;
                description
                    "Map-Request control packet";
            }
            enum map-reply {
                value 2;
                description
                    "Map-Reply control packet";
            }
            enum map-register {
                value 3;
                description
                    "Map-Register control packet";
            }
            enum map-notify {
                value 4;
                description
                    "Map-Notify control packet";
            }
            enum map-referral {
                value 6;
                description
                    "Map-Referral control packet";
            }
            enum info {
                value 7;
                description
                    "Info control packet";
            }
            enum encapsulated-control-message {
                value 8;
                description
                    "Encapsulated control packet";
            }
        }
        description
            "Defines the LISP control message types";
        reference "https://tools.ietf.org/html/rfc6830#section-6.1.1";
    }

    grouping MapRegisterMessage {
        container MapRegister {
            uses MapRegister;
        }
        uses transport-address;
    }

    grouping MapRegisterNotification {
        container MapRegister {
            uses MapRegister;
        }
        uses transport-address;
    }

    grouping MapNotifyMessage {
        container MapNotify {
            uses MapNotify;
        }
        uses transport-address;
    }

    grouping MapNotifyNotification {
        container MapNotify {
            uses MapNotify;
        }
        uses transport-address;
    }

    grouping MapRequestMessage {
        container MapRequest {
            uses MapRequest;
        }
        uses transport-address;
    }

    grouping MapRequestNotification {
        container MapRequest {
            uses MapRequest;
        }
        uses transport-address;
    }

    grouping MapReplyMessage {
        container MapReply {
            uses MapReply;
        }
        uses transport-address;
    }

    grouping MapReplyNotification {
        container MapReply {
            uses MapReply;
        }
        uses transport-address;
    }

    notification addMapping {
        uses MapRegisterNotification;
    }

    notification gotMapNotify {
        uses MapNotifyNotification;
    }

    notification requestMapping {
        uses MapRequestNotification;
    }

    notification gotMapReply {
        uses MapReplyNotification;
    }

    notification xtrRequestMapping {
        uses MapRequestNotification;
    }

    notification xtrReplyMapping {
        uses MapReplyNotification;
    }

    notification mappingKeepAlive {
        uses map-register-cache-metadata-container;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy