Shashikanth VH | 8b1a5ef | 2016-12-26 14:37:43 +0530 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2017-present Open Networking Foundation |
Shashikanth VH | 8b1a5ef | 2016-12-26 14:37:43 +0530 | [diff] [blame] | 3 | * |
| 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 |
| 7 | * |
| 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. |
| 15 | */ |
| 16 | package org.onosproject.flowapi; |
| 17 | |
| 18 | /** |
| 19 | * Representation of BgpFlow container having custom rules. |
| 20 | */ |
| 21 | public interface ExtFlowTypes { |
| 22 | |
| 23 | /** |
| 24 | * Bgp types. |
| 25 | */ |
| 26 | public enum ExtType { |
| 27 | |
| 28 | /** Extended flow rule key. */ |
| 29 | EXT_FLOW_RULE_KEY(0), |
| 30 | |
| 31 | /** IPv4 destination address. */ |
| 32 | IPV4_DST_PFX(1), |
| 33 | |
| 34 | /** IPv4 source address. */ |
| 35 | IPV4_SRC_PFX(2), |
| 36 | |
| 37 | /** IP protocol list. */ |
| 38 | IP_PROTO_LIST(3), |
| 39 | |
| 40 | /** Input port list. */ |
| 41 | IN_PORT_LIST(4), |
| 42 | |
| 43 | /** Destination port list. */ |
| 44 | DST_PORT_LIST(5), |
| 45 | |
| 46 | /** Source port list. */ |
| 47 | SRC_PORT_LIST(6), |
| 48 | |
| 49 | /** ICMP type list. */ |
| 50 | ICMP_TYPE_LIST(7), |
| 51 | |
| 52 | /** ICMP code list. */ |
| 53 | ICMP_CODE_LIST(8), |
| 54 | |
| 55 | /** TCP flag list. */ |
| 56 | TCP_FLAG_LIST(9), |
| 57 | |
| 58 | /** Packet length list. */ |
| 59 | PACKET_LENGTH_LIST(10), |
| 60 | |
| 61 | /** DSCP Value component. */ |
| 62 | DSCP_VALUE_LIST(11), |
| 63 | |
| 64 | /** Fragment list. */ |
| 65 | FRAGMENT_LIST(12), |
| 66 | |
| 67 | /** Wide community flags. */ |
| 68 | WIDE_COMM_FLAGS(13), |
| 69 | |
| 70 | /** Wide community hop count. */ |
| 71 | WIDE_COMM_HOP_COUNT(14), |
| 72 | |
| 73 | /** Wide community community attribute. */ |
| 74 | WIDE_COMM_COMMUNITY(15), |
| 75 | |
| 76 | /** Wide community context AS. */ |
| 77 | WIDE_COMM_CONTEXT_AS(16), |
| 78 | |
| 79 | /** Wide community local AS. */ |
| 80 | WIDE_COMM_LOCAL_AS(17), |
| 81 | |
| 82 | /** Wide community target prefixes. */ |
| 83 | WIDE_COMM_TARGET(18), |
| 84 | |
| 85 | /** Wide community extended target prefixes. */ |
| 86 | WIDE_COMM_EXT_TARGET(19), |
| 87 | |
| 88 | /** Wide community parameter. */ |
| 89 | WIDE_COMM_PARAMETER(20), |
| 90 | |
| 91 | /** Traffic filtering actions. */ |
| 92 | |
| 93 | TRAFFIC_RATE(0x8006), |
| 94 | TRAFFIC_ACTION(0x8007), |
| 95 | TRAFFIC_REDIRECT(0x8008), |
| 96 | TRAFFIC_MARKING(0x8009); |
| 97 | |
| 98 | private int type; |
| 99 | |
| 100 | /** |
| 101 | * Creates a new type. |
| 102 | * |
| 103 | * @param type type code |
| 104 | */ |
| 105 | ExtType(int type) { |
| 106 | this.type = type; |
| 107 | } |
| 108 | |
| 109 | /** |
| 110 | * Returns the type object for this type code. |
| 111 | * |
| 112 | * @return ExtType object |
| 113 | */ |
| 114 | public int type() { |
| 115 | return (type); |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | ExtType type(); |
| 120 | } |