Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright 2014 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 | */ |
tom | 89b63c5 | 2014-09-16 09:19:51 -0700 | [diff] [blame] | 16 | package org.onlab.onos.net.host; |
| 17 | |
Jonathan Hart | ac60c08 | 2014-09-23 08:55:17 -0700 | [diff] [blame] | 18 | import org.onlab.onos.net.ConnectPoint; |
tom | 89b63c5 | 2014-09-16 09:19:51 -0700 | [diff] [blame] | 19 | import org.onlab.onos.net.HostId; |
| 20 | |
| 21 | /** |
| 22 | * Service for administering the inventory of end-station hosts. |
| 23 | */ |
| 24 | public interface HostAdminService { |
| 25 | |
| 26 | /** |
| 27 | * Removes the end-station host with the specified identifier. |
| 28 | * |
| 29 | * @param hostId host identifier |
| 30 | */ |
| 31 | void removeHost(HostId hostId); |
| 32 | |
Jonathan Hart | ac60c08 | 2014-09-23 08:55:17 -0700 | [diff] [blame] | 33 | /** |
Jonathan Hart | 09585c6 | 2014-09-23 16:58:04 -0700 | [diff] [blame] | 34 | * Binds IP and MAC addresses to the given connection point. |
Jonathan Hart | ac60c08 | 2014-09-23 08:55:17 -0700 | [diff] [blame] | 35 | * <p/> |
Jonathan Hart | 09585c6 | 2014-09-23 16:58:04 -0700 | [diff] [blame] | 36 | * The addresses are added to the set of addresses already bound to the |
| 37 | * connection point. If any of the fields in addresses is null, no change |
| 38 | * is made to the corresponding addresses in the store. |
| 39 | * {@link #unbindAddressesFromPort(PortAddresses)} must be use to unbind |
| 40 | * addresses that have previously been bound. |
Jonathan Hart | ac60c08 | 2014-09-23 08:55:17 -0700 | [diff] [blame] | 41 | * |
Jonathan Hart | 09585c6 | 2014-09-23 16:58:04 -0700 | [diff] [blame] | 42 | * @param addresses address object containing addresses to add and the port |
| 43 | * to add them to |
Jonathan Hart | ac60c08 | 2014-09-23 08:55:17 -0700 | [diff] [blame] | 44 | */ |
Jonathan Hart | 09585c6 | 2014-09-23 16:58:04 -0700 | [diff] [blame] | 45 | void bindAddressesToPort(PortAddresses addresses); |
| 46 | |
| 47 | /** |
| 48 | * Removes the addresses contained in the given PortAddresses object from |
| 49 | * the set of addresses bound to the port. |
| 50 | * |
| 51 | * @param portAddresses set of addresses to remove and port to remove them |
| 52 | * from |
| 53 | */ |
| 54 | void unbindAddressesFromPort(PortAddresses portAddresses); |
Jonathan Hart | ac60c08 | 2014-09-23 08:55:17 -0700 | [diff] [blame] | 55 | |
| 56 | /** |
| 57 | * Removes all address information for the given connection point. |
| 58 | * |
| 59 | * @param connectPoint the connection point to remove address information |
| 60 | */ |
Jonathan Hart | 09585c6 | 2014-09-23 16:58:04 -0700 | [diff] [blame] | 61 | void clearAddresses(ConnectPoint connectPoint); |
Jonathan Hart | ac60c08 | 2014-09-23 08:55:17 -0700 | [diff] [blame] | 62 | |
tom | 89b63c5 | 2014-09-16 09:19:51 -0700 | [diff] [blame] | 63 | } |