blob: 667bb88d2115b002c9c15d6ec34e18e73b6be125 [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 /**
Ayaka Koshibe74a23922014-09-09 16:45:39 -070028 * Returns the VLAN ID tied to this host.
29 *
30 * @return VLAN ID value
31 */
32 short vlan();
33
34 /**
tom7869ad92014-09-09 14:32:08 -070035 * Returns set of IP addresses currently bound to the host MAC address.
36 *
37 * @return set of IP addresses; empty if no IP address is bound
38 */
39 Set<IPv4> ipAddresses();
tomb36046e2014-08-27 00:22:24 -070040
41 /**
42 * Returns the most recent host location where the host attaches to the
43 * network edge.
44 *
45 * @return host location
46 */
47 HostLocation location();
48
tom7869ad92014-09-09 14:32:08 -070049 // TODO: explore capturing list of recent locations to aid in mobility
tome33cc1a2014-08-25 21:59:41 -070050
51}