tom | 89b63c5 | 2014-09-16 09:19:51 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net.host; |
| 2 | |
Jonathan Hart | ac60c08 | 2014-09-23 08:55:17 -0700 | [diff] [blame^] | 3 | import java.util.Set; |
| 4 | |
| 5 | import org.onlab.onos.net.ConnectPoint; |
tom | 89b63c5 | 2014-09-16 09:19:51 -0700 | [diff] [blame] | 6 | import org.onlab.onos.net.HostId; |
Jonathan Hart | ac60c08 | 2014-09-23 08:55:17 -0700 | [diff] [blame^] | 7 | import org.onlab.packet.IpAddress; |
| 8 | import org.onlab.packet.MacAddress; |
tom | 89b63c5 | 2014-09-16 09:19:51 -0700 | [diff] [blame] | 9 | |
| 10 | /** |
| 11 | * Service for administering the inventory of end-station hosts. |
| 12 | */ |
| 13 | public interface HostAdminService { |
| 14 | |
| 15 | /** |
| 16 | * Removes the end-station host with the specified identifier. |
| 17 | * |
| 18 | * @param hostId host identifier |
| 19 | */ |
| 20 | void removeHost(HostId hostId); |
| 21 | |
Jonathan Hart | ac60c08 | 2014-09-23 08:55:17 -0700 | [diff] [blame^] | 22 | /** |
| 23 | * Binds an IP address and optional MAC address to the given connection |
| 24 | * point. |
| 25 | * <p/> |
| 26 | * This method will overwrite any previously held address information for |
| 27 | * the connection point. |
| 28 | * |
| 29 | * @param ip the IP address to bind to the connection point. This parameter |
| 30 | * is mandatory and cannot be null. |
| 31 | * @param mac the optional MAC address to bind to the connection point. Can |
| 32 | * be set to null if no MAC address needs to be bound. |
| 33 | * @param connectPoint the connection point to bind the addresses to |
| 34 | */ |
| 35 | void bindAddressesToPort(IpAddress ip, MacAddress mac, ConnectPoint connectPoint); |
| 36 | |
| 37 | /** |
| 38 | * Removes all address information for the given connection point. |
| 39 | * |
| 40 | * @param connectPoint the connection point to remove address information |
| 41 | */ |
| 42 | void unbindAddressesFromPort(ConnectPoint connectPoint); |
| 43 | |
| 44 | /** |
| 45 | * Returns the addresses information for all connection points. |
| 46 | * |
| 47 | * @return the set of address bindings for all connection points |
| 48 | */ |
| 49 | Set<PortAddresses> getAddressBindings(); |
| 50 | |
| 51 | /** |
| 52 | * Retrieves the addresses that have been bound to the given connection |
| 53 | * point. |
| 54 | * |
| 55 | * @param connectPoint the connection point to retrieve address bindings |
| 56 | * for |
| 57 | * @return addresses bound to the port |
| 58 | */ |
| 59 | PortAddresses getAddressBindingsForPort(ConnectPoint connectPoint); |
tom | 89b63c5 | 2014-09-16 09:19:51 -0700 | [diff] [blame] | 60 | } |