blob: f01b49ccb0ea7810c0b7aa6d3761b08a27406a13 [file] [log] [blame]
tom0eb04ca2014-08-25 14:34:51 -07001package org.onlab.onos.net.device;
2
Yuta HIGUCHI55710e72014-10-02 14:58:32 -07003import org.onlab.onos.net.Description;
tomca20e0c2014-09-03 23:22:24 -07004import org.onlab.onos.net.PortNumber;
5
tom0eb04ca2014-08-25 14:34:51 -07006/**
7 * Information about a port.
8 */
Yuta HIGUCHI55710e72014-10-02 14:58:32 -07009public interface PortDescription extends Description {
tom0eb04ca2014-08-25 14:34:51 -070010
11 // TODO: possibly relocate this to a common ground so that this can also used by host tracking if required
12
tomca20e0c2014-09-03 23:22:24 -070013 /**
14 * Returns the port number.
15 *
16 * @return port number
17 */
18 PortNumber portNumber();
19
20 /**
tomd40fc7a2014-09-04 16:41:10 -070021 * Indicates whether or not the port is up and active.
tomca20e0c2014-09-03 23:22:24 -070022 *
tomd40fc7a2014-09-04 16:41:10 -070023 * @return true if the port is active and has carrier signal
tomca20e0c2014-09-03 23:22:24 -070024 */
tomd40fc7a2014-09-04 16:41:10 -070025 boolean isEnabled();
tomca20e0c2014-09-03 23:22:24 -070026
tom0eb04ca2014-08-25 14:34:51 -070027}