Thomas Vachuska | 83e090e | 2014-10-22 14:25:35 -0700 | [diff] [blame] | 1 | /* |
Ray Milkey | 34c9590 | 2015-04-15 09:47:53 -0700 | [diff] [blame] | 2 | * Copyright 2014-2015 Open Networking Laboratory |
Thomas Vachuska | 83e090e | 2014-10-22 14:25:35 -0700 | [diff] [blame] | 3 | * |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
Thomas Vachuska | 83e090e | 2014-10-22 14:25:35 -0700 | [diff] [blame] | 7 | * |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
Thomas Vachuska | 83e090e | 2014-10-22 14:25:35 -0700 | [diff] [blame] | 15 | */ |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 16 | package org.onosproject.net.flow; |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 17 | |
alshabib | ba5ac48 | 2014-10-02 17:15:20 -0700 | [diff] [blame] | 18 | import java.util.Set; |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 19 | |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 20 | import org.onosproject.net.PortNumber; |
| 21 | import org.onosproject.net.flow.criteria.Criterion; |
alshabib | 010c31d | 2014-09-26 10:01:12 -0700 | [diff] [blame] | 22 | import org.onlab.packet.IpPrefix; |
Pavlin Radoslavov | 320e6c9 | 2015-02-02 16:51:58 -0800 | [diff] [blame] | 23 | import org.onlab.packet.Ip6Address; |
alshabib | 010c31d | 2014-09-26 10:01:12 -0700 | [diff] [blame] | 24 | import org.onlab.packet.MacAddress; |
Michele Santuari | 4b6019e | 2014-12-19 11:31:45 +0100 | [diff] [blame] | 25 | import org.onlab.packet.MplsLabel; |
alshabib | 010c31d | 2014-09-26 10:01:12 -0700 | [diff] [blame] | 26 | import org.onlab.packet.VlanId; |
alshabib | 7410fea | 2014-09-16 13:48:39 -0700 | [diff] [blame] | 27 | |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 28 | /** |
| 29 | * Abstraction of a slice of network traffic. |
| 30 | */ |
| 31 | public interface TrafficSelector { |
| 32 | |
| 33 | /** |
| 34 | * Returns selection criteria as an ordered list. |
| 35 | * |
| 36 | * @return list of criteria |
| 37 | */ |
alshabib | ba5ac48 | 2014-10-02 17:15:20 -0700 | [diff] [blame] | 38 | Set<Criterion> criteria(); |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 39 | |
| 40 | /** |
Jonathan Hart | 936c49d | 2014-10-23 16:38:59 -0700 | [diff] [blame] | 41 | * Returns the selection criterion for a particular type, if it exists in |
| 42 | * this traffic selector. |
| 43 | * |
| 44 | * @param type criterion type to look up |
| 45 | * @return the criterion of the specified type if one exists, otherwise null |
| 46 | */ |
| 47 | Criterion getCriterion(Criterion.Type type); |
| 48 | |
| 49 | /** |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 50 | * Builder of traffic selector entities. |
| 51 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 52 | interface Builder { |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 53 | |
| 54 | /** |
| 55 | * Adds a traffic selection criterion. If a same type criterion has |
| 56 | * already been added, it will be replaced by this one. |
| 57 | * |
| 58 | * @param criterion new criterion |
alshabib | 369d294 | 2014-09-12 17:59:35 -0700 | [diff] [blame] | 59 | * @return self |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 60 | */ |
alshabib | 369d294 | 2014-09-12 17:59:35 -0700 | [diff] [blame] | 61 | Builder add(Criterion criterion); |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 62 | |
| 63 | /** |
alshabib | 010c31d | 2014-09-26 10:01:12 -0700 | [diff] [blame] | 64 | * Matches an inport. |
Sho SHIMIZU | bdaea83 | 2014-11-12 11:29:38 -0800 | [diff] [blame] | 65 | * |
alshabib | 010c31d | 2014-09-26 10:01:12 -0700 | [diff] [blame] | 66 | * @param port the inport |
| 67 | * @return a selection builder |
| 68 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 69 | Builder matchInPort(PortNumber port); |
alshabib | 010c31d | 2014-09-26 10:01:12 -0700 | [diff] [blame] | 70 | |
| 71 | /** |
Pavlin Radoslavov | d0fd841 | 2015-02-04 13:57:00 -0800 | [diff] [blame] | 72 | * Matches a physical inport. |
| 73 | * |
| 74 | * @param port the physical inport |
| 75 | * @return a selection builder |
| 76 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 77 | Builder matchInPhyPort(PortNumber port); |
Pavlin Radoslavov | d0fd841 | 2015-02-04 13:57:00 -0800 | [diff] [blame] | 78 | |
| 79 | /** |
| 80 | * Matches a metadata. |
| 81 | * |
| 82 | * @param metadata the metadata |
| 83 | * @return a selection builder |
| 84 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 85 | Builder matchMetadata(long metadata); |
Pavlin Radoslavov | d0fd841 | 2015-02-04 13:57:00 -0800 | [diff] [blame] | 86 | |
| 87 | /** |
alshabib | 010c31d | 2014-09-26 10:01:12 -0700 | [diff] [blame] | 88 | * Matches a l2 dst address. |
Sho SHIMIZU | bdaea83 | 2014-11-12 11:29:38 -0800 | [diff] [blame] | 89 | * |
alshabib | 010c31d | 2014-09-26 10:01:12 -0700 | [diff] [blame] | 90 | * @param addr a l2 address |
| 91 | * @return a selection builder |
| 92 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 93 | Builder matchEthDst(MacAddress addr); |
alshabib | 010c31d | 2014-09-26 10:01:12 -0700 | [diff] [blame] | 94 | |
| 95 | /** |
Pavlin Radoslavov | 320e6c9 | 2015-02-02 16:51:58 -0800 | [diff] [blame] | 96 | * Matches a l2 src address. |
| 97 | * |
| 98 | * @param addr a l2 address |
| 99 | * @return a selection builder |
| 100 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 101 | Builder matchEthSrc(MacAddress addr); |
Pavlin Radoslavov | 320e6c9 | 2015-02-02 16:51:58 -0800 | [diff] [blame] | 102 | |
| 103 | /** |
alshabib | 010c31d | 2014-09-26 10:01:12 -0700 | [diff] [blame] | 104 | * Matches the ethernet type. |
Sho SHIMIZU | bdaea83 | 2014-11-12 11:29:38 -0800 | [diff] [blame] | 105 | * |
alshabib | 010c31d | 2014-09-26 10:01:12 -0700 | [diff] [blame] | 106 | * @param ethType an ethernet type |
| 107 | * @return a selection builder |
| 108 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 109 | Builder matchEthType(short ethType); |
alshabib | 010c31d | 2014-09-26 10:01:12 -0700 | [diff] [blame] | 110 | |
| 111 | /** |
| 112 | * Matches the vlan id. |
Sho SHIMIZU | bdaea83 | 2014-11-12 11:29:38 -0800 | [diff] [blame] | 113 | * |
alshabib | 010c31d | 2014-09-26 10:01:12 -0700 | [diff] [blame] | 114 | * @param vlanId a vlan id |
| 115 | * @return a selection builder |
| 116 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 117 | Builder matchVlanId(VlanId vlanId); |
alshabib | 010c31d | 2014-09-26 10:01:12 -0700 | [diff] [blame] | 118 | |
| 119 | /** |
| 120 | * Matches a vlan priority. |
Sho SHIMIZU | bdaea83 | 2014-11-12 11:29:38 -0800 | [diff] [blame] | 121 | * |
alshabib | 010c31d | 2014-09-26 10:01:12 -0700 | [diff] [blame] | 122 | * @param vlanPcp a vlan priority |
| 123 | * @return a selection builder |
| 124 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 125 | Builder matchVlanPcp(byte vlanPcp); |
alshabib | 010c31d | 2014-09-26 10:01:12 -0700 | [diff] [blame] | 126 | |
| 127 | /** |
Pavlin Radoslavov | d0fd841 | 2015-02-04 13:57:00 -0800 | [diff] [blame] | 128 | * Matches an IP DSCP (6 bits in ToS field). |
| 129 | * |
| 130 | * @param ipDscp an IP DSCP value |
| 131 | * @return a selection builder |
| 132 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 133 | Builder matchIPDscp(byte ipDscp); |
Pavlin Radoslavov | d0fd841 | 2015-02-04 13:57:00 -0800 | [diff] [blame] | 134 | |
| 135 | /** |
| 136 | * Matches an IP ECN (2 bits in ToS field). |
| 137 | * |
| 138 | * @param ipEcn an IP ECN value |
| 139 | * @return a selection builder |
| 140 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 141 | Builder matchIPEcn(byte ipEcn); |
Pavlin Radoslavov | d0fd841 | 2015-02-04 13:57:00 -0800 | [diff] [blame] | 142 | |
| 143 | /** |
alshabib | 010c31d | 2014-09-26 10:01:12 -0700 | [diff] [blame] | 144 | * Matches the l3 protocol. |
Sho SHIMIZU | bdaea83 | 2014-11-12 11:29:38 -0800 | [diff] [blame] | 145 | * |
alshabib | 010c31d | 2014-09-26 10:01:12 -0700 | [diff] [blame] | 146 | * @param proto a l3 protocol |
| 147 | * @return a selection builder |
| 148 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 149 | Builder matchIPProtocol(byte proto); |
alshabib | 010c31d | 2014-09-26 10:01:12 -0700 | [diff] [blame] | 150 | |
| 151 | /** |
Charles M.C. Chan | 52fae7d | 2015-01-17 00:35:53 +0800 | [diff] [blame] | 152 | * Matches a l3 IPv4 address. |
Sho SHIMIZU | bdaea83 | 2014-11-12 11:29:38 -0800 | [diff] [blame] | 153 | * |
alshabib | 010c31d | 2014-09-26 10:01:12 -0700 | [diff] [blame] | 154 | * @param ip a l3 address |
| 155 | * @return a selection builder |
| 156 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 157 | Builder matchIPSrc(IpPrefix ip); |
alshabib | 010c31d | 2014-09-26 10:01:12 -0700 | [diff] [blame] | 158 | |
| 159 | /** |
Charles M.C. Chan | 52fae7d | 2015-01-17 00:35:53 +0800 | [diff] [blame] | 160 | * Matches a l3 IPv4 address. |
Sho SHIMIZU | bdaea83 | 2014-11-12 11:29:38 -0800 | [diff] [blame] | 161 | * |
alshabib | 010c31d | 2014-09-26 10:01:12 -0700 | [diff] [blame] | 162 | * @param ip a l3 address |
| 163 | * @return a selection builder |
| 164 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 165 | Builder matchIPDst(IpPrefix ip); |
alshabib | 010c31d | 2014-09-26 10:01:12 -0700 | [diff] [blame] | 166 | |
| 167 | /** |
Toshio Koide | 9c44c9a | 2014-10-09 11:44:36 -0700 | [diff] [blame] | 168 | * Matches a TCP source port number. |
Sho SHIMIZU | bdaea83 | 2014-11-12 11:29:38 -0800 | [diff] [blame] | 169 | * |
Toshio Koide | 9c44c9a | 2014-10-09 11:44:36 -0700 | [diff] [blame] | 170 | * @param tcpPort a TCP source port number |
| 171 | * @return a selection builder |
| 172 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 173 | Builder matchTcpSrc(short tcpPort); |
Toshio Koide | 9c44c9a | 2014-10-09 11:44:36 -0700 | [diff] [blame] | 174 | |
| 175 | /** |
| 176 | * Matches a TCP destination port number. |
Sho SHIMIZU | bdaea83 | 2014-11-12 11:29:38 -0800 | [diff] [blame] | 177 | * |
Toshio Koide | 9c44c9a | 2014-10-09 11:44:36 -0700 | [diff] [blame] | 178 | * @param tcpPort a TCP destination port number |
| 179 | * @return a selection builder |
| 180 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 181 | Builder matchTcpDst(short tcpPort); |
Toshio Koide | 9c44c9a | 2014-10-09 11:44:36 -0700 | [diff] [blame] | 182 | |
Charles M.C. Chan | 52fae7d | 2015-01-17 00:35:53 +0800 | [diff] [blame] | 183 | /** |
Pavlin Radoslavov | 320e6c9 | 2015-02-02 16:51:58 -0800 | [diff] [blame] | 184 | * Matches an UDP source port number. |
| 185 | * |
| 186 | * @param udpPort an UDP source port number |
| 187 | * @return a selection builder |
| 188 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 189 | Builder matchUdpSrc(short udpPort); |
Pavlin Radoslavov | 320e6c9 | 2015-02-02 16:51:58 -0800 | [diff] [blame] | 190 | |
| 191 | /** |
| 192 | * Matches an UDP destination port number. |
| 193 | * |
| 194 | * @param udpPort an UDP destination port number |
| 195 | * @return a selection builder |
| 196 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 197 | Builder matchUdpDst(short udpPort); |
Pavlin Radoslavov | 320e6c9 | 2015-02-02 16:51:58 -0800 | [diff] [blame] | 198 | |
| 199 | /** |
| 200 | * Matches a SCTP source port number. |
| 201 | * |
| 202 | * @param sctpPort a SCTP source port number |
| 203 | * @return a selection builder |
| 204 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 205 | Builder matchSctpSrc(short sctpPort); |
Pavlin Radoslavov | 320e6c9 | 2015-02-02 16:51:58 -0800 | [diff] [blame] | 206 | |
| 207 | /** |
| 208 | * Matches a SCTP destination port number. |
| 209 | * |
| 210 | * @param sctpPort a SCTP destination port number |
| 211 | * @return a selection builder |
| 212 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 213 | Builder matchSctpDst(short sctpPort); |
Pavlin Radoslavov | 320e6c9 | 2015-02-02 16:51:58 -0800 | [diff] [blame] | 214 | |
| 215 | /** |
| 216 | * Matches an ICMP type. |
| 217 | * |
| 218 | * @param icmpType an ICMP type |
| 219 | * @return a selection builder |
| 220 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 221 | Builder matchIcmpType(byte icmpType); |
Pavlin Radoslavov | 320e6c9 | 2015-02-02 16:51:58 -0800 | [diff] [blame] | 222 | |
| 223 | /** |
| 224 | * Matches an ICMP code. |
| 225 | * |
| 226 | * @param icmpCode an ICMP code |
| 227 | * @return a selection builder |
| 228 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 229 | Builder matchIcmpCode(byte icmpCode); |
Pavlin Radoslavov | 320e6c9 | 2015-02-02 16:51:58 -0800 | [diff] [blame] | 230 | |
| 231 | /** |
Charles M.C. Chan | 52fae7d | 2015-01-17 00:35:53 +0800 | [diff] [blame] | 232 | * Matches a l3 IPv6 address. |
| 233 | * |
| 234 | * @param ip a l3 IPv6 address |
| 235 | * @return a selection builder |
| 236 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 237 | Builder matchIPv6Src(IpPrefix ip); |
Charles M.C. Chan | 52fae7d | 2015-01-17 00:35:53 +0800 | [diff] [blame] | 238 | |
| 239 | /** |
| 240 | * Matches a l3 IPv6 address. |
| 241 | * |
| 242 | * @param ip a l3 IPv6 address |
| 243 | * @return a selection builder |
| 244 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 245 | Builder matchIPv6Dst(IpPrefix ip); |
Praseed Balakrishnan | 8c67d17 | 2014-11-10 10:15:41 -0800 | [diff] [blame] | 246 | |
| 247 | /** |
Pavlin Radoslavov | 320e6c9 | 2015-02-02 16:51:58 -0800 | [diff] [blame] | 248 | * Matches an IPv6 flow label. |
Kunihiro Ishiguro | 0f9aba8 | 2015-01-15 17:14:17 -0800 | [diff] [blame] | 249 | * |
Pavlin Radoslavov | 320e6c9 | 2015-02-02 16:51:58 -0800 | [diff] [blame] | 250 | * @param flowLabel an IPv6 flow label |
| 251 | * @return a selection builder |
| 252 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 253 | Builder matchIPv6FlowLabel(int flowLabel); |
Pavlin Radoslavov | 320e6c9 | 2015-02-02 16:51:58 -0800 | [diff] [blame] | 254 | |
| 255 | /** |
| 256 | * Matches an ICMPv6 type. |
| 257 | * |
| 258 | * @param icmpv6Type an ICMPv6 type |
Kunihiro Ishiguro | 0f9aba8 | 2015-01-15 17:14:17 -0800 | [diff] [blame] | 259 | * @return a selection builder |
| 260 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 261 | Builder matchIcmpv6Type(byte icmpv6Type); |
Kunihiro Ishiguro | 0f9aba8 | 2015-01-15 17:14:17 -0800 | [diff] [blame] | 262 | |
| 263 | /** |
Pavlin Radoslavov | 320e6c9 | 2015-02-02 16:51:58 -0800 | [diff] [blame] | 264 | * Matches an ICMPv6 code. |
Kunihiro Ishiguro | 0f9aba8 | 2015-01-15 17:14:17 -0800 | [diff] [blame] | 265 | * |
Pavlin Radoslavov | 320e6c9 | 2015-02-02 16:51:58 -0800 | [diff] [blame] | 266 | * @param icmpv6Code an ICMPv6 code |
Kunihiro Ishiguro | 0f9aba8 | 2015-01-15 17:14:17 -0800 | [diff] [blame] | 267 | * @return a selection builder |
| 268 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 269 | Builder matchIcmpv6Code(byte icmpv6Code); |
Kunihiro Ishiguro | 0f9aba8 | 2015-01-15 17:14:17 -0800 | [diff] [blame] | 270 | |
| 271 | /** |
Pavlin Radoslavov | 320e6c9 | 2015-02-02 16:51:58 -0800 | [diff] [blame] | 272 | * Matches an IPv6 Neighbor Discovery target address. |
| 273 | * |
| 274 | * @param targetAddress an IPv6 Neighbor Discovery target address |
| 275 | * @return a selection builder |
| 276 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 277 | Builder matchIPv6NDTargetAddress(Ip6Address targetAddress); |
Pavlin Radoslavov | 320e6c9 | 2015-02-02 16:51:58 -0800 | [diff] [blame] | 278 | |
| 279 | /** |
| 280 | * Matches an IPv6 Neighbor Discovery source link-layer address. |
| 281 | * |
| 282 | * @param mac an IPv6 Neighbor Discovery source link-layer address |
| 283 | * @return a selection builder |
| 284 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 285 | Builder matchIPv6NDSourceLinkLayerAddress(MacAddress mac); |
Pavlin Radoslavov | 320e6c9 | 2015-02-02 16:51:58 -0800 | [diff] [blame] | 286 | |
| 287 | /** |
| 288 | * Matches an IPv6 Neighbor Discovery target link-layer address. |
| 289 | * |
| 290 | * @param mac an IPv6 Neighbor Discovery target link-layer address |
| 291 | * @return a selection builder |
| 292 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 293 | Builder matchIPv6NDTargetLinkLayerAddress(MacAddress mac); |
Pavlin Radoslavov | 320e6c9 | 2015-02-02 16:51:58 -0800 | [diff] [blame] | 294 | |
| 295 | /** |
| 296 | * Matches on a MPLS label. |
| 297 | * |
Praseed Balakrishnan | 8c67d17 | 2014-11-10 10:15:41 -0800 | [diff] [blame] | 298 | * @param mplsLabel a MPLS label. |
| 299 | * @return a selection builder |
| 300 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 301 | Builder matchMplsLabel(MplsLabel mplsLabel); |
Praseed Balakrishnan | 8c67d17 | 2014-11-10 10:15:41 -0800 | [diff] [blame] | 302 | |
Toshio Koide | 9c44c9a | 2014-10-09 11:44:36 -0700 | [diff] [blame] | 303 | /** |
Sho SHIMIZU | 60f1214 | 2015-05-06 14:22:03 -0700 | [diff] [blame] | 304 | * Matches on IPv6 Extension Header pseudo-field flags. |
Pavlin Radoslavov | 5e4f754 | 2015-02-06 18:18:21 -0800 | [diff] [blame] | 305 | * |
Sho SHIMIZU | 60f1214 | 2015-05-06 14:22:03 -0700 | [diff] [blame] | 306 | * @param exthdrFlags the IPv6 Extension Header pseudo-field flags |
Pavlin Radoslavov | 5e4f754 | 2015-02-06 18:18:21 -0800 | [diff] [blame] | 307 | * @return a selection builder |
| 308 | */ |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 309 | Builder matchIPv6ExthdrFlags(short exthdrFlags); |
Pavlin Radoslavov | 5e4f754 | 2015-02-06 18:18:21 -0800 | [diff] [blame] | 310 | |
| 311 | /** |
Marc De Leenheer | 4908775 | 2014-10-23 13:54:09 -0700 | [diff] [blame] | 312 | * Matches an optical signal ID or lambda. |
Sho SHIMIZU | bdaea83 | 2014-11-12 11:29:38 -0800 | [diff] [blame] | 313 | * |
Sho SHIMIZU | 60f1214 | 2015-05-06 14:22:03 -0700 | [diff] [blame] | 314 | * @param lambda lambda |
Marc De Leenheer | 4908775 | 2014-10-23 13:54:09 -0700 | [diff] [blame] | 315 | * @return a selection builder |
Sho SHIMIZU | c72c8ea | 2015-05-06 16:01:47 -0700 | [diff] [blame] | 316 | * @deprecated in Cardinal Release. |
| 317 | * Use {@link #add(Criterion)} with an instance created |
| 318 | * by {@link org.onosproject.net.flow.criteria.Criteria#matchLambda(org.onosproject.net.Lambda)}. |
Marc De Leenheer | 4908775 | 2014-10-23 13:54:09 -0700 | [diff] [blame] | 319 | */ |
Sho SHIMIZU | c72c8ea | 2015-05-06 16:01:47 -0700 | [diff] [blame] | 320 | @Deprecated |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 321 | Builder matchLambda(short lambda); |
Praseed Balakrishnan | 64369da | 2014-10-23 15:55:20 -0700 | [diff] [blame] | 322 | |
| 323 | /** |
| 324 | * Matches an optical Signal Type. |
Sho SHIMIZU | bdaea83 | 2014-11-12 11:29:38 -0800 | [diff] [blame] | 325 | * |
Yuta HIGUCHI | 5c94727 | 2014-11-03 21:39:21 -0800 | [diff] [blame] | 326 | * @param signalType signalType |
Praseed Balakrishnan | 64369da | 2014-10-23 15:55:20 -0700 | [diff] [blame] | 327 | * @return a selection builder |
Sho SHIMIZU | c72c8ea | 2015-05-06 16:01:47 -0700 | [diff] [blame] | 328 | * @deprecated in Cardinal Release. |
| 329 | * Use {@link #add(Criterion)}} with an instance created |
| 330 | * by {@link org.onosproject.net.flow.criteria.Criteria#matchOchSignalType(org.onosproject.net.OchSignalType)}. |
Praseed Balakrishnan | 64369da | 2014-10-23 15:55:20 -0700 | [diff] [blame] | 331 | */ |
Sho SHIMIZU | c72c8ea | 2015-05-06 16:01:47 -0700 | [diff] [blame] | 332 | @Deprecated |
Sho SHIMIZU | 15c3800 | 2015-04-28 19:00:37 -0700 | [diff] [blame] | 333 | Builder matchOpticalSignalType(short signalType); |
Marc De Leenheer | 4908775 | 2014-10-23 13:54:09 -0700 | [diff] [blame] | 334 | |
| 335 | /** |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 336 | * Builds an immutable traffic selector. |
| 337 | * |
| 338 | * @return traffic selector |
| 339 | */ |
| 340 | TrafficSelector build(); |
| 341 | } |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 342 | } |