blob: e434073221b8bd30016d71c46bf8188b77a1d8cd [file] [log] [blame]
alshabibbc371962015-07-09 22:26:21 -07001/*
2 * Copyright 2015 Open Networking Laboratory
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 */
16package org.onosproject.net.meter;
17
18/**
19 * Represents a band used within a meter.
20 */
21public interface Band {
22
23 /**
24 * Specifies the type of band.
25 */
26 enum Type {
27 /**
28 * Simple rate limiter which drops packets
29 * when the rate is exceeded.
30 */
31 DROP,
32
33 /**
34 * defines a simple DiffServ policer that remark
35 * the drop precedence of the DSCP eld in the
36 * IP header of the packets that exceed the band
37 * rate value.
38 */
39 REMARK
40 }
41
42 /**
43 * The rate at which this meter applies.
44 *
45 * @return the integer value of the rate
46 */
47 int rate();
48
49 /**
50 * The burst size at which the meter applies.
51 *
52 * @return the integer value of the size
53 */
54 int burst();
55
56
57}