alshabib | 7410fea | 2014-09-16 13:48:39 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net.flow.criteria; |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 2 | |
alshabib | 7b79549 | 2014-09-16 14:38:39 -0700 | [diff] [blame] | 3 | |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 4 | /** |
| 5 | * Representation of a single header field selection. |
| 6 | */ |
| 7 | public interface Criterion { |
| 8 | |
| 9 | /** |
| 10 | * Types of fields to which the selection criterion may apply. |
| 11 | */ |
| 12 | // From page 42 of OpenFlow 1.3.x spec |
| 13 | public enum Type { |
| 14 | /** Switch input port. */ |
| 15 | IN_PORT, |
| 16 | /** Switch physical input port. */ |
| 17 | IN_PHY_PORT, |
| 18 | /** Metadata passed between tables. */ |
| 19 | METADATA, |
| 20 | /** Ethernet destination address. */ |
| 21 | ETH_DST, |
| 22 | /** Ethernet source address. */ |
| 23 | ETH_SRC, |
| 24 | /** Ethernet frame type. */ |
| 25 | ETH_TYPE, |
| 26 | /** VLAN id. */ |
| 27 | VLAN_VID, |
| 28 | /** VLAN priority. */ |
| 29 | VLAN_PCP, |
| 30 | /** IP DSCP (6 bits in ToS field). */ |
| 31 | IP_DSCP, |
| 32 | /** IP ECN (2 bits in ToS field). */ |
| 33 | IP_ECN, |
| 34 | /** IP protocol. */ |
| 35 | IP_PROTO, |
| 36 | /** IPv4 source address. */ |
| 37 | IPV4_SRC, |
| 38 | /** IPv4 destination address. */ |
| 39 | IPV4_DST, |
| 40 | /** TCP source port. */ |
| 41 | TCP_SRC, |
| 42 | /** TCP destination port. */ |
| 43 | TCP_DST, |
| 44 | /** UDP source port. */ |
| 45 | UDP_SRC, |
| 46 | /** UDP destination port. */ |
| 47 | UDP_DST, |
| 48 | /** SCTP source port. */ |
| 49 | SCTP_SRC, |
| 50 | /** SCTP destination port. */ |
| 51 | SCTP_DST, |
| 52 | /** ICMP type. */ |
| 53 | ICMPV4_TYPE, |
| 54 | /** ICMP code. */ |
| 55 | ICMPV4_CODE, |
| 56 | /** ARP opcode. */ |
| 57 | ARP_OP, |
| 58 | /** ARP source IPv4 address. */ |
| 59 | ARP_SPA, |
| 60 | /** ARP target IPv4 address. */ |
| 61 | ARP_TPA, |
| 62 | /** ARP source hardware address. */ |
| 63 | ARP_SHA, |
| 64 | /** ARP target hardware address. */ |
| 65 | ARP_THA, |
| 66 | /** IPv6 source address. */ |
| 67 | IPV6_SRC, |
| 68 | /** IPv6 destination address. */ |
| 69 | IPV6_DST, |
| 70 | /** IPv6 Flow Label. */ |
| 71 | IPV6_FLABEL, |
| 72 | /** ICMPv6 type. */ |
| 73 | ICMPV6_TYPE, |
| 74 | /** ICMPv6 code. */ |
| 75 | ICMPV6_CODE, |
| 76 | /** Target address for ND. */ |
| 77 | IPV6_ND_TARGET, |
| 78 | /** Source link-layer for ND. */ |
| 79 | IPV6_ND_SLL, |
| 80 | /** Target link-layer for ND. */ |
| 81 | IPV6_ND_TLL, |
| 82 | /** MPLS label. */ |
| 83 | MPLS_LABEL, |
| 84 | /** MPLS TC. */ |
| 85 | MPLS_TC, |
| 86 | /** MPLS BoS bit. */ |
| 87 | MPLS_BOS, |
| 88 | /** PBB I-SID. */ |
| 89 | PBB_ISID, |
| 90 | /** Logical Port Metadata. */ |
| 91 | TUNNEL_ID, |
| 92 | /** IPv6 Extension Header pseudo-field. */ |
| 93 | IPV6_EXTHDR |
| 94 | } |
| 95 | |
alshabib | 7b79549 | 2014-09-16 14:38:39 -0700 | [diff] [blame] | 96 | /** |
| 97 | * Returns the type of criterion. |
| 98 | * @return type of criterion |
| 99 | */ |
| 100 | public Type type(); |
| 101 | |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 102 | // TODO: Create factory class 'Criteria' that will have various factory |
| 103 | // to create specific criterions. |
| 104 | |
| 105 | } |