blob: 9d0859100b0ca514985615c3ffa7f4ff5d35781d [file] [log] [blame]
tome33cc1a2014-08-25 21:59:41 -07001package org.onlab.onos.net;
2
Pavlin Radoslavov33f228a2014-10-27 19:33:16 -07003import org.onlab.packet.IpAddress;
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 */
Pavlin Radoslavov33f228a2014-10-27 19:33:16 -070041 Set<IpAddress> ipAddresses();
tomb36046e2014-08-27 00:22:24 -070042
43 /**
44 * Returns the most recent host location where the host attaches to the
45 * network edge.
46 *
47 * @return host location
48 */
49 HostLocation location();
50
tom7869ad92014-09-09 14:32:08 -070051 // TODO: explore capturing list of recent locations to aid in mobility
tome33cc1a2014-08-25 21:59:41 -070052
53}