2 * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 module openflow-extensible-match {
10 namespace "urn:opendaylight:openflow:oxm";
13 import ietf-yang-types {prefix yang;}
14 import ietf-inet-types {prefix inet;}
15 import openflow-types {prefix oft;}
17 revision "2015-02-25" {
18 description "OpenFlow 1.3 - match model";
21 identity oxm-match-type {
23 "The OpenFlow Extensible Match type must be supported by all OpenFlow
25 base oft:match-type-base;
29 identity oxm-class-base {
30 description "Base identity for OXM classes";
33 identity nxm-0-class {
34 description "Match class for backward compatibility with NXM";
37 identity nxm-1-class {
38 description "Match class for backward compatibility with NXM";
41 identity openflow-basic-class {
42 description "Basic class for OpenFlow";
45 identity experimenter-class {
47 "Marks Experimenter match type class.
48 All experimenter match classes MUST use this class as a base.";
53 identity match-field {
54 description "Base identity for OXM Fields";
59 description "OXM field for Switch input port.";
61 identity in_phy_port {
63 description "OXM field for Switch physical input port.";
67 description "OXM field for Metadata passed between tables.";
71 description "OXM field for Ethernet destination address.";
75 description "OXM field for Ethernet source address.";
79 description "OXM field for Ethernet frame type.";
83 description "OXM field for VLAN id.";
87 description "OXM field for VLAN priority.";
91 description "OXM field for IP DSCP (6 bits in ToS field).";
95 description "OXM field for IP ECN (2 bits in ToS field).";
99 description "OXM field for IP protocol.";
103 description "OXM field for IPv4 source address.";
107 description "OXM field for IPv4 destination address.";
111 description "OXM field for TCP source port.";
115 description "OXM field for TCP destination port.";
119 description "OXM field for UDP source port.";
123 description "OXM field for UDP destination port.";
127 description "OXM field for SCTP source port.";
131 description "OXM field for SCTP destination port.";
133 identity icmpv4_type {
135 description "OXM field for ICMP type.";
137 identity icmpv4_code {
139 description "OXM field for ICMP code.";
143 description "OXM field for ARP opcode.";
147 description "OXM field for ARP source IPv4 address.";
151 description "OXM field for ARP target IPv4 address.";
155 description "OXM field for ARP source hardware address.";
159 description "OXM field for ARP target hardware address.";
163 description "OXM field for IPv6 source address.";
167 description "OXM field for IPv6 destination address.";
169 identity ipv6_flabel {
171 description "OXM field for IPv6 Flow Label";
173 identity icmpv6_type {
175 description "OXM field for ICMPv6 type.";
177 identity icmpv6_code {
179 description "OXM field for ICMPv6 code.";
181 identity ipv6_nd_target {
183 description "OXM field for Target address for ND.";
185 identity ipv6_nd_sll {
187 description "OXM field for Source link-layer for ND.";
189 identity ipv6_nd_tll {
191 description "OXM field for Target link-layer for ND.";
193 identity mpls_label {
195 description "OXM field for MPLS label.";
199 description "OXM field for MPLS TC.";
203 description "OXM field for MPLS BoS bit.";
207 description "OXM field for PBB I-SID.";
211 description "OXM field for Logical Port Metadata";
213 identity ipv6_exthdr {
215 description "OXM field for IPv6 Extension Header pseudo-field";
218 grouping match-grouping {
220 description "Match structure (OF v1.3)";
223 base oft:match-type-base;
226 uses match-entries-grouping;
230 grouping match-entries-grouping {
233 uses match-entry-fields-grouping;
234 uses match-entry-value-grouping;
238 grouping match-entry-fields-grouping {
244 leaf oxm-match-field {
254 container oxm-container {
255 uses match-entry-value-grouping;
258 grouping match-entry-value-grouping {
259 choice match-entry-value {
263 type oft:port-number;
267 case in-phy-port-case {
268 container in-phy-port {
270 type oft:port-number;
287 type yang:mac-address;
297 type yang:mac-address;
347 leaf protocol-number {
355 type inet:ipv4-address;
365 type inet:ipv4-address;
375 type inet:port-number;
382 type inet:port-number;
389 type inet:port-number;
396 type inet:port-number;
403 type inet:port-number;
410 type inet:port-number;
414 case icmpv4-type-case {
415 container icmpv4-type {
421 case icmpv4-code-case {
422 container icmpv4-code {
438 type inet:ipv4-address;
448 type inet:ipv4-address;
458 type yang:mac-address;
468 type yang:mac-address;
478 type inet:ipv6-address;
488 type inet:ipv6-address;
495 case ipv6-flabel-case {
496 container ipv6-flabel {
498 type inet:ipv6-flow-label;
505 case icmpv6-type-case {
506 container icmpv6-type {
512 case icmpv6-code-case {
513 container icmpv6-code {
519 case ipv6-nd-target-case {
520 container ipv6-nd-target {
522 type inet:ipv6-address;
526 case ipv6-nd-sll-case {
527 container ipv6-nd-sll {
529 type yang:mac-address;
533 case ipv6-nd-tll-case {
534 container ipv6-nd-tll {
536 type yang:mac-address;
540 case mpls-label-case {
541 container mpls-label {
571 case tunnel-id-case {
572 container tunnel-id {
581 case ipv6-exthdr-case {
582 container ipv6-exthdr {
584 type oft:ipv6-exthdr-flags;
595 grouping match-v10-grouping {
596 container match-v10 {
597 description "OF v1.0 match structure";
599 description "Wildcard fields (only flags).";
600 type oft:flow-wildcards-v10;
603 description "IP source address mask (definition differs from OF v1.0.0 spec to ease
604 understanding, library does the transformation into OF v1.0 spec correct data)";
608 description "IP destination address mask (definition differs from OF v1.0.0 spec to ease
609 understanding, library does the transformation into OF v1.0 spec correct data)";
613 description "Input switch port.";
617 description "Ethernet source address.";
618 type yang:mac-address;
621 description "Ethernet destination address.";
622 type yang:mac-address;
625 description "Input VLAN id.";
629 description "Input VLAN priority.";
633 description "Ethernet frame type.";
637 description "IP ToS (actually DSCP field, 6 bits).";
641 description "IP protocol or lower 8 bits of ARP opcode.";
645 description "IP source address.";
646 type inet:ipv4-address;
649 description "IP destination address.";
650 type inet:ipv4-address;
653 description "TCP/UDP source port.";
657 description "TCP/UDP destination port.";