blob: 55c13cd03ce869567fb569265c39bcc54b112fa3 [file] [log] [blame]
tome33cc1a2014-08-25 21:59:41 -07001package org.onlab.onos.net;
2
Ayaka Koshibe1c7b38e2014-09-11 13:09:51 -07003import org.onlab.packet.IPAddress;
tom7869ad92014-09-09 14:32:08 -07004import org.onlab.packet.MACAddress;
5
6import java.util.Set;
7
tome33cc1a2014-08-25 21:59:41 -07008/**
9 * Abstraction of an end-station host on the network, essentially a NIC.
10 */
tomb36046e2014-08-27 00:22:24 -070011public interface Host extends Element {
tome33cc1a2014-08-25 21:59:41 -070012
tom7869ad92014-09-09 14:32:08 -070013 /**
14 * Host identification.
15 *
16 * @return host id
17 */
Ayaka Koshibe1c7b38e2014-09-11 13:09:51 -070018 @Override
tom7869ad92014-09-09 14:32:08 -070019 HostId id();
tome33cc1a2014-08-25 21:59:41 -070020
tom7869ad92014-09-09 14:32:08 -070021 /**
22 * Returns the host MAC address.
23 *
24 * @return mac address
25 */
26 MACAddress mac();
27
28 /**
Ayaka Koshibe74a23922014-09-09 16:45:39 -070029 * Returns the VLAN ID tied to this host.
30 *
31 * @return VLAN ID value
32 */
33 short vlan();
34
35 /**
tom7869ad92014-09-09 14:32:08 -070036 * 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 Koshibe1c7b38e2014-09-11 13:09:51 -070040 Set<IPAddress> ipAddresses();
tomb36046e2014-08-27 00:22:24 -070041
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
tom7869ad92014-09-09 14:32:08 -070050 // TODO: explore capturing list of recent locations to aid in mobility
tome33cc1a2014-08-25 21:59:41 -070051
52}