blob: 718534da403b475a7d673cca3a172620b5a0e720 [file] [log] [blame]
Thomas Vachuska83e090e2014-10-22 14:25:35 -07001/*
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07002 * Copyright 2014 Open Networking Laboratory
Thomas Vachuska83e090e2014-10-22 14:25:35 -07003 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07004 * 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 Vachuska83e090e2014-10-22 14:25:35 -07007 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07008 * 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 Vachuska83e090e2014-10-22 14:25:35 -070015 */
alshabib7410fea2014-09-16 13:48:39 -070016package org.onlab.onos.net.flow.criteria;
tom8bb16062014-09-12 14:47:46 -070017
alshabib7b795492014-09-16 14:38:39 -070018
tom8bb16062014-09-12 14:47:46 -070019/**
20 * Representation of a single header field selection.
21 */
22public interface Criterion {
23
24 /**
25 * Types of fields to which the selection criterion may apply.
26 */
27 // From page 42 of OpenFlow 1.3.x spec
28 public enum Type {
29 /** Switch input port. */
30 IN_PORT,
31 /** Switch physical input port. */
32 IN_PHY_PORT,
33 /** Metadata passed between tables. */
34 METADATA,
35 /** Ethernet destination address. */
36 ETH_DST,
37 /** Ethernet source address. */
38 ETH_SRC,
39 /** Ethernet frame type. */
40 ETH_TYPE,
41 /** VLAN id. */
42 VLAN_VID,
43 /** VLAN priority. */
44 VLAN_PCP,
45 /** IP DSCP (6 bits in ToS field). */
46 IP_DSCP,
47 /** IP ECN (2 bits in ToS field). */
48 IP_ECN,
49 /** IP protocol. */
50 IP_PROTO,
51 /** IPv4 source address. */
52 IPV4_SRC,
53 /** IPv4 destination address. */
54 IPV4_DST,
55 /** TCP source port. */
56 TCP_SRC,
57 /** TCP destination port. */
58 TCP_DST,
59 /** UDP source port. */
60 UDP_SRC,
61 /** UDP destination port. */
62 UDP_DST,
63 /** SCTP source port. */
64 SCTP_SRC,
65 /** SCTP destination port. */
66 SCTP_DST,
67 /** ICMP type. */
68 ICMPV4_TYPE,
69 /** ICMP code. */
70 ICMPV4_CODE,
71 /** ARP opcode. */
72 ARP_OP,
73 /** ARP source IPv4 address. */
74 ARP_SPA,
75 /** ARP target IPv4 address. */
76 ARP_TPA,
77 /** ARP source hardware address. */
78 ARP_SHA,
79 /** ARP target hardware address. */
80 ARP_THA,
81 /** IPv6 source address. */
82 IPV6_SRC,
83 /** IPv6 destination address. */
84 IPV6_DST,
85 /** IPv6 Flow Label. */
86 IPV6_FLABEL,
87 /** ICMPv6 type. */
88 ICMPV6_TYPE,
89 /** ICMPv6 code. */
90 ICMPV6_CODE,
91 /** Target address for ND. */
92 IPV6_ND_TARGET,
93 /** Source link-layer for ND. */
94 IPV6_ND_SLL,
95 /** Target link-layer for ND. */
96 IPV6_ND_TLL,
97 /** MPLS label. */
98 MPLS_LABEL,
99 /** MPLS TC. */
100 MPLS_TC,
101 /** MPLS BoS bit. */
102 MPLS_BOS,
103 /** PBB I-SID. */
104 PBB_ISID,
105 /** Logical Port Metadata. */
106 TUNNEL_ID,
107 /** IPv6 Extension Header pseudo-field. */
Marc De Leenheer49087752014-10-23 13:54:09 -0700108 IPV6_EXTHDR,
109 /** Optical channel signal ID (lambda). */
110 OCH_SIGID,
111 /** Optical channel signal type (fixed or flexible). */
112 OCH_SIGTYPE
tom8bb16062014-09-12 14:47:46 -0700113 }
114
alshabib7b795492014-09-16 14:38:39 -0700115 /**
116 * Returns the type of criterion.
117 * @return type of criterion
118 */
119 public Type type();
120
tom8bb16062014-09-12 14:47:46 -0700121 // TODO: Create factory class 'Criteria' that will have various factory
122 // to create specific criterions.
123
124}