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