tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net; |
| 2 | |
tom | 7869ad9 | 2014-09-09 14:32:08 -0700 | [diff] [blame^] | 3 | import org.onlab.packet.IPv4; |
| 4 | import org.onlab.packet.MACAddress; |
| 5 | |
| 6 | import java.util.Set; |
| 7 | |
tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 8 | /** |
| 9 | * Abstraction of an end-station host on the network, essentially a NIC. |
| 10 | */ |
tom | b36046e | 2014-08-27 00:22:24 -0700 | [diff] [blame] | 11 | public interface Host extends Element { |
tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 12 | |
tom | 7869ad9 | 2014-09-09 14:32:08 -0700 | [diff] [blame^] | 13 | /** |
| 14 | * Host identification. |
| 15 | * |
| 16 | * @return host id |
| 17 | */ |
| 18 | HostId id(); |
tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 19 | |
tom | 7869ad9 | 2014-09-09 14:32:08 -0700 | [diff] [blame^] | 20 | /** |
| 21 | * Returns the host MAC address. |
| 22 | * |
| 23 | * @return mac address |
| 24 | */ |
| 25 | MACAddress mac(); |
| 26 | |
| 27 | /** |
| 28 | * Returns set of IP addresses currently bound to the host MAC address. |
| 29 | * |
| 30 | * @return set of IP addresses; empty if no IP address is bound |
| 31 | */ |
| 32 | Set<IPv4> ipAddresses(); |
tom | b36046e | 2014-08-27 00:22:24 -0700 | [diff] [blame] | 33 | |
| 34 | /** |
| 35 | * Returns the most recent host location where the host attaches to the |
| 36 | * network edge. |
| 37 | * |
| 38 | * @return host location |
| 39 | */ |
| 40 | HostLocation location(); |
| 41 | |
tom | 7869ad9 | 2014-09-09 14:32:08 -0700 | [diff] [blame^] | 42 | // TODO: explore capturing list of recent locations to aid in mobility |
tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 43 | |
| 44 | } |