tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net.host; |
| 2 | |
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 3 | import org.onlab.onos.net.Description; |
| 4 | import org.onlab.onos.net.HostLocation; |
Ayaka Koshibe | 1d56fe4 | 2014-09-19 16:51:58 -0700 | [diff] [blame] | 5 | import org.onlab.packet.IpPrefix; |
Ayaka Koshibe | a9c199f | 2014-09-16 16:21:40 -0700 | [diff] [blame] | 6 | import org.onlab.packet.MacAddress; |
| 7 | import org.onlab.packet.VlanId; |
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 8 | |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 9 | /** |
| 10 | * Information describing host and its location. |
| 11 | */ |
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 12 | public interface HostDescription extends Description { |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 13 | |
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 14 | /** |
| 15 | * Returns the MAC address associated with this host (NIC). |
| 16 | * |
| 17 | * @return the MAC address of this host |
| 18 | */ |
Ayaka Koshibe | a9c199f | 2014-09-16 16:21:40 -0700 | [diff] [blame] | 19 | MacAddress hwAddress(); |
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 20 | |
| 21 | /** |
| 22 | * Returns the VLAN associated with this host. |
| 23 | * |
| 24 | * @return the VLAN ID value |
| 25 | */ |
Ayaka Koshibe | a9c199f | 2014-09-16 16:21:40 -0700 | [diff] [blame] | 26 | VlanId vlan(); |
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 27 | |
| 28 | /** |
| 29 | * Returns the location of the host on the network edge. |
| 30 | * |
| 31 | * @return the network location |
| 32 | */ |
| 33 | HostLocation location(); |
| 34 | |
| 35 | /** |
tom | 093340b | 2014-10-10 00:15:36 -0700 | [diff] [blame^] | 36 | * Returns the IP address associated with this host's MAC. |
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 37 | * |
tom | 093340b | 2014-10-10 00:15:36 -0700 | [diff] [blame^] | 38 | * @return host IP address |
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 39 | */ |
tom | 093340b | 2014-10-10 00:15:36 -0700 | [diff] [blame^] | 40 | IpPrefix ipAddress(); |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 41 | |
| 42 | } |