tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net; |
2 | |||||
Ayaka Koshibe | 1c7b38e | 2014-09-11 13:09:51 -0700 | [diff] [blame^] | 3 | import org.onlab.packet.IPAddress; |
tom | 7869ad9 | 2014-09-09 14:32:08 -0700 | [diff] [blame] | 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 | */ | ||||
Ayaka Koshibe | 1c7b38e | 2014-09-11 13:09:51 -0700 | [diff] [blame^] | 18 | @Override |
tom | 7869ad9 | 2014-09-09 14:32:08 -0700 | [diff] [blame] | 19 | HostId id(); |
tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 20 | |
tom | 7869ad9 | 2014-09-09 14:32:08 -0700 | [diff] [blame] | 21 | /** |
22 | * Returns the host MAC address. | ||||
23 | * | ||||
24 | * @return mac address | ||||
25 | */ | ||||
26 | MACAddress mac(); | ||||
27 | |||||
28 | /** | ||||
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 29 | * Returns the VLAN ID tied to this host. |
30 | * | ||||
31 | * @return VLAN ID value | ||||
32 | */ | ||||
33 | short vlan(); | ||||
34 | |||||
35 | /** | ||||
tom | 7869ad9 | 2014-09-09 14:32:08 -0700 | [diff] [blame] | 36 | * Returns set of IP addresses currently bound to the host MAC address. |
37 | * | ||||
38 | * @return set of IP addresses; empty if no IP address is bound | ||||
39 | */ | ||||
Ayaka Koshibe | 1c7b38e | 2014-09-11 13:09:51 -0700 | [diff] [blame^] | 40 | Set<IPAddress> ipAddresses(); |
tom | b36046e | 2014-08-27 00:22:24 -0700 | [diff] [blame] | 41 | |
42 | /** | ||||
43 | * Returns the most recent host location where the host attaches to the | ||||
44 | * network edge. | ||||
45 | * | ||||
46 | * @return host location | ||||
47 | */ | ||||
48 | HostLocation location(); | ||||
49 | |||||
tom | 7869ad9 | 2014-09-09 14:32:08 -0700 | [diff] [blame] | 50 | // TODO: explore capturing list of recent locations to aid in mobility |
tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 51 | |
52 | } |