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 "2013-07-31" {
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;
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 container oxm-container {
219 uses oxm-fields-grouping;
222 grouping oxm-fields-grouping {
224 description "OXM TLV-structures (Type Length Value)";
231 leaf oxm-match-field {
242 grouping match-grouping {
244 description "Match structure (OF v1.3)";
247 base oft:match-type-base;
250 uses oxm-fields-grouping;
255 grouping match-v10-grouping {
256 container match-v10 {
257 description "OF v1.0 match structure";
259 description "Wildcard fields (only flags).";
260 type oft:flow-wildcards-v10;
263 description "IP source address mask (definition differs from OF v1.0.0 spec to ease
264 understanding, library does the transformation into OF v1.0 spec correct data)";
268 description "IP destination address mask (definition differs from OF v1.0.0 spec to ease
269 understanding, library does the transformation into OF v1.0 spec correct data)";
273 description "Input switch port.";
277 description "Ethernet source address.";
278 type yang:mac-address;
281 description "Ethernet destination address.";
282 type yang:mac-address;
285 description "Input VLAN id.";
289 description "Input VLAN priority.";
293 description "Ethernet frame type.";
297 description "IP ToS (actually DSCP field, 6 bits).";
301 description "IP protocol or lower 8 bits of ARP opcode.";
305 description "IP source address.";
306 type inet:ipv4-address;
309 description "IP destination address.";
310 type inet:ipv4-address;
313 description "TCP/UDP source port.";
317 description "TCP/UDP destination port.";