blob: d66566d4d430d1475f63c69c01ddb43f24e26493 [file] [log] [blame]
tome33cc1a2014-08-25 21:59:41 -07001package org.onlab.onos.net;
2
tom7869ad92014-09-09 14:32:08 -07003import org.onlab.packet.IPv4;
4import 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 */
18 HostId id();
tome33cc1a2014-08-25 21:59:41 -070019
tom7869ad92014-09-09 14:32:08 -070020 /**
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();
tomb36046e2014-08-27 00:22:24 -070033
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
tom7869ad92014-09-09 14:32:08 -070042 // TODO: explore capturing list of recent locations to aid in mobility
tome33cc1a2014-08-25 21:59:41 -070043
44}