mohamed rahil | 8ea09d4 | 2016-04-19 20:47:21 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016-present 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.isis.controller; |
| 17 | |
| 18 | import org.onlab.packet.MacAddress; |
| 19 | |
| 20 | /** |
| 21 | * Representation of an ISIS neighbor. |
| 22 | */ |
| 23 | public interface IsisNeighbor { |
| 24 | |
| 25 | /** |
| 26 | * Returns the MAC address of neighbor. |
| 27 | * |
| 28 | * @return MAC address of neighbor |
| 29 | */ |
| 30 | MacAddress neighborMacAddress(); |
| 31 | |
| 32 | /** |
| 33 | * Returns the neighbor interface state. |
| 34 | * |
| 35 | * @return neighbor interface state |
| 36 | */ |
| 37 | IsisInterfaceState interfaceState(); |
| 38 | |
| 39 | /** |
| 40 | * Sets the neighbor interface state. |
| 41 | * |
| 42 | * @param interfaceState the neighbor interface state |
| 43 | */ |
| 44 | void setNeighborState(IsisInterfaceState interfaceState); |
| 45 | |
| 46 | /** |
| 47 | * Sets the LAN ID. |
| 48 | * |
| 49 | * @param l1LanId LAN ID |
| 50 | */ |
| 51 | void setL1LanId(String l1LanId); |
| 52 | |
| 53 | /** |
| 54 | * Sets the LAN ID. |
| 55 | * |
| 56 | * @param l2LanId LAN ID |
| 57 | */ |
| 58 | void setL2LanId(String l2LanId); |
| 59 | |
| 60 | /** |
| 61 | * Returns neighbor system ID. |
| 62 | * |
| 63 | * @return neighbor system ID |
| 64 | */ |
| 65 | String neighborSystemId(); |
| 66 | |
| 67 | /** |
| 68 | * Returns neighbor circuit ID. |
| 69 | * |
| 70 | * @return neighbor circuit ID |
| 71 | */ |
| 72 | byte localCircuitId(); |
| 73 | |
| 74 | /** |
| 75 | * Returns neighbor extended circuit ID. |
| 76 | * |
| 77 | * @return neighbor extended circuit ID |
| 78 | */ |
| 79 | int localExtendedCircuitId(); |
| 80 | |
| 81 | /** |
| 82 | * Sets neighbor extended circuit ID. |
| 83 | * |
| 84 | * @param localExtendedCircuitId neighbor extended circuit ID |
| 85 | */ |
| 86 | void setLocalExtendedCircuitId(int localExtendedCircuitId); |
Dhruv Dhody | e64b93e | 2016-04-20 19:26:55 +0530 | [diff] [blame] | 87 | |
| 88 | /** |
| 89 | * Returns Holding time of neighbor. |
| 90 | * |
| 91 | * @return Holding time of neighbor |
| 92 | */ |
| 93 | int holdingTime(); |
| 94 | |
| 95 | /** |
| 96 | * Sets Holding time of neighbor. |
| 97 | * |
| 98 | * @param holdingTime Holding time of neighbor |
| 99 | */ |
| 100 | void setHoldingTime(int holdingTime); |
tejeshwer degala | 3fe1ed5 | 2016-04-22 17:04:01 +0530 | [diff] [blame] | 101 | |
| 102 | /** |
| 103 | * Starts the inactivity timer for this neighbor. |
| 104 | */ |
| 105 | void startInactivityTimeCheck(); |
| 106 | |
| 107 | /** |
| 108 | * Stops the inactivity timer. |
| 109 | */ |
| 110 | void stopInactivityTimeCheck(); |
sunish vk | 4b5ce00 | 2016-05-09 20:18:35 +0530 | [diff] [blame] | 111 | |
| 112 | /** |
| 113 | * Stops the holding time check timer. |
| 114 | */ |
| 115 | void stopHoldingTimeCheck(); |
| 116 | |
| 117 | /** |
| 118 | * Returns router type. |
| 119 | * |
| 120 | * @return router type |
| 121 | */ |
| 122 | IsisRouterType routerType(); |
| 123 | } |