blob: 3a9bfa5d72fdb58300e757d18da238a787bff156 [file] [log] [blame]
tome33cc1a2014-08-25 21:59:41 -07001package org.onlab.onos.net;
2
Ayaka Koshibe1d56fe42014-09-19 16:51:58 -07003import org.onlab.packet.IpPrefix;
Ayaka Koshibea9c199f2014-09-16 16:21:40 -07004import org.onlab.packet.MacAddress;
5import org.onlab.packet.VlanId;
tom7869ad92014-09-09 14:32:08 -07006
7import java.util.Set;
8
tome33cc1a2014-08-25 21:59:41 -07009/**
10 * Abstraction of an end-station host on the network, essentially a NIC.
11 */
tomb36046e2014-08-27 00:22:24 -070012public interface Host extends Element {
tome33cc1a2014-08-25 21:59:41 -070013
tom7869ad92014-09-09 14:32:08 -070014 /**
15 * Host identification.
16 *
17 * @return host id
18 */
Ayaka Koshibe1c7b38e2014-09-11 13:09:51 -070019 @Override
tom7869ad92014-09-09 14:32:08 -070020 HostId id();
tome33cc1a2014-08-25 21:59:41 -070021
tom7869ad92014-09-09 14:32:08 -070022 /**
23 * Returns the host MAC address.
24 *
25 * @return mac address
26 */
Ayaka Koshibea9c199f2014-09-16 16:21:40 -070027 MacAddress mac();
tom7869ad92014-09-09 14:32:08 -070028
29 /**
Ayaka Koshibe74a23922014-09-09 16:45:39 -070030 * Returns the VLAN ID tied to this host.
31 *
32 * @return VLAN ID value
33 */
Ayaka Koshibea9c199f2014-09-16 16:21:40 -070034 VlanId vlan();
Ayaka Koshibe74a23922014-09-09 16:45:39 -070035
36 /**
tom7869ad92014-09-09 14:32:08 -070037 * Returns set of IP addresses currently bound to the host MAC address.
38 *
39 * @return set of IP addresses; empty if no IP address is bound
40 */
Yuta HIGUCHIa2639152014-10-14 15:08:10 -070041 // FIXME: Switch to IpAddress
Ayaka Koshibe1d56fe42014-09-19 16:51:58 -070042 Set<IpPrefix> ipAddresses();
tomb36046e2014-08-27 00:22:24 -070043
44 /**
45 * Returns the most recent host location where the host attaches to the
46 * network edge.
47 *
48 * @return host location
49 */
50 HostLocation location();
51
tom7869ad92014-09-09 14:32:08 -070052 // TODO: explore capturing list of recent locations to aid in mobility
tome33cc1a2014-08-25 21:59:41 -070053
54}