Chidambar babu | 86b3b1a | 2016-02-16 17:39:52 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 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 | */ |
| 16 | package org.onosproject.ospf.protocol.util; |
| 17 | |
| 18 | /** |
| 19 | * Representation of an OSPF Interface states. |
| 20 | */ |
| 21 | public enum OspfInterfaceState { |
| 22 | |
| 23 | DOWN(1), |
| 24 | LOOPBACK(2), |
| 25 | WAITING(3), |
| 26 | POINT2POINT(4), |
| 27 | DROTHER(5), |
| 28 | BDR(6), |
| 29 | DR(7); |
| 30 | |
| 31 | private int value; |
| 32 | |
| 33 | /** |
| 34 | * Creates an instance of Interface State. |
| 35 | * |
| 36 | * @param value Interface State value |
| 37 | */ |
| 38 | OspfInterfaceState(int value) { |
| 39 | this.value = value; |
| 40 | } |
| 41 | |
| 42 | /** |
| 43 | * Gets value for Interface State. |
| 44 | * |
| 45 | * @return value Interface State |
| 46 | */ |
| 47 | public int value() { |
| 48 | return value; |
| 49 | } |
| 50 | } |