:orphan: .. index:: pair: group; Ethernet PHY .. _doxid-group__tapi__conf__phy: Ethernet PHY ============ .. toctree:: :hidden: Overview ~~~~~~~~ Read and set the physical layer settings of an interface: speed, duplex, autonegotiation and link state. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block // global functions :ref:`te_errno` :ref:`tapi_cfg_phy_autoneg_get`(const char* ta, const char* if_name, int* state); :ref:`te_errno` :ref:`tapi_cfg_phy_autoneg_set`(const char* ta, const char* if_name, int state); :ref:`te_errno` :ref:`tapi_cfg_phy_duplex_oper_get`(const char* ta, const char* if_name, int* state); :ref:`te_errno` :ref:`tapi_cfg_phy_duplex_admin_get`(const char* ta, const char* if_name, int* state); :ref:`te_errno` :ref:`tapi_cfg_phy_duplex_admin_set`(const char* ta, const char* if_name, int state); :ref:`te_errno` :ref:`tapi_cfg_phy_port_get`(const char* ta, const char* if_name, enum :ref:`te_phy_port`* state); :ref:`te_errno` :ref:`tapi_cfg_phy_speed_oper_get`(const char* ta, const char* if_name, int* speed); :ref:`te_errno` :ref:`tapi_cfg_phy_speed_admin_get`(const char* ta, const char* if_name, int* speed); :ref:`te_errno` :ref:`tapi_cfg_phy_speed_admin_set`(const char* ta, const char* if_name, int speed); :ref:`te_errno` :ref:`tapi_cfg_phy_mode_oper_get`(const char* ta, const char* if_name, int* speed, int* duplex); :ref:`te_errno` :ref:`tapi_cfg_phy_mode_admin_get`(const char* ta, const char* if_name, int* speed, int* duplex); :ref:`te_errno` :ref:`tapi_cfg_phy_mode_admin_set`(const char* ta, const char* if_name, int speed, int duplex); :ref:`te_errno` :ref:`tapi_cfg_phy_state_get`(const char* ta, const char* if_name, int* state); :ref:`te_errno` :ref:`tapi_cfg_phy_state_wait_up`(const char* ta, const char* if_name, int timeout); :ref:`te_errno` :ref:`tapi_cfg_phy_is_mode_advertised`(const char* ta, const char* if_name, int speed, int duplex, bool* state); :ref:`te_errno` :ref:`tapi_cfg_phy_advertise_mode`(const char* ta, const char* if_name, int speed, int duplex, bool state); :ref:`te_errno` :ref:`tapi_cfg_phy_mode_supported`(const char* ta, const char* if_name, const char* mode_name, bool* supported); :ref:`te_errno` :ref:`tapi_cfg_phy_mode_adv_get`(const char* ta, const char* if_name, const char* mode_name, bool* state); :ref:`te_errno` :ref:`tapi_cfg_phy_mode_adv_set`(const char* ta, const char* if_name, const char* mode_name, bool state); :ref:`te_errno` :ref:`tapi_cfg_phy_lp_advertised`(const char* ta, const char* if_name, const char* mode_name, bool* advertised); :ref:`te_errno` :ref:`tapi_cfg_phy_commit`(const char* ta, const char* if_name); int :ref:`tapi_cfg_phy_autoneg_str2id`(const char* name); int :ref:`tapi_cfg_phy_duplex_str2id`(const char* name); enum :ref:`te_phy_port` :ref:`tapi_cfg_phy_port_str2id`(const char* name); int :ref:`tapi_cfg_phy_speed_str2id`(const char* name); const char* :ref:`tapi_cfg_phy_autoneg_id2str`(int autoneg); const char* :ref:`tapi_cfg_phy_duplex_id2str`(int duplex); const char* :ref:`tapi_cfg_phy_port_id2str`(enum :ref:`te_phy_port` port); const char* :ref:`tapi_cfg_phy_speed_id2str`(int speed); :ref:`te_errno` :ref:`tapi_cfg_phy_advertise_one`(const char* ta, const char* if_name, int advert_speed, int advert_duplex); :ref:`te_errno` :ref:`tapi_cfg_phy_pause_lp_adv_get`(const char* ta, const char* if_name, int* state); :ref:`te_errno` :ref:`tapi_cfg_phy_autoneg_lp_adv_get`(const char* ta, const char* if_name, int* state); :ref:`te_errno` :ref:`tapi_cfg_phy_autoneg_oper_get`(const char* ta, const char* if_name, int* state); :ref:`te_errno` :ref:`tapi_cfg_phy_autoneg_admin_get`(const char* ta, const char* if_name, int* state); :ref:`te_errno` :ref:`tapi_cfg_phy_autoneg_admin_set`(const char* ta, const char* if_name, int state); // macros #define :target:`TE_PHY_SLEEP_TIME` .. _details-group__tapi__conf__phy: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Read and set the physical layer settings of an interface: speed, duplex, autonegotiation and link state. Global Functions ---------------- .. index:: pair: function; tapi_cfg_phy_autoneg_get .. _doxid-group__tapi__conf__phy_1ga6095a2d71903436bbe2af30f7fe4a86b: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_phy_autoneg_get(const char* ta, const char* if_name, int* state) Get PHY autonegotiation state. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - state - Pointer to the returned autonegotiation state value: :ref:`TE_PHY_AUTONEG_OFF ` - autonegotiation OFF :ref:`TE_PHY_AUTONEG_ON ` - autonegotiation ON .. rubric:: Returns: Status code. .. index:: pair: function; tapi_cfg_phy_autoneg_set .. _doxid-group__tapi__conf__phy_1ga864999fe47769140096e56ed3d8d8801: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_phy_autoneg_set(const char* ta, const char* if_name, int state) Set PHY autonegotiation state. .. note:: This function changes tree in CS locally and :ref:`tapi_cfg_phy_commit() ` must be used to apply these changes. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - state - Autonegotiation state value: :ref:`TE_PHY_AUTONEG_OFF ` - autonegotiation OFF :ref:`TE_PHY_AUTONEG_ON ` - autonegotiation ON .. rubric:: Returns: Status code .. index:: pair: function; tapi_cfg_phy_duplex_oper_get .. _doxid-group__tapi__conf__phy_1ga79dccdacbb69f5153d33b65e60d66349: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_phy_duplex_oper_get(const char* ta, const char* if_name, int* state) Get PHY duplex oper state. NOTE: Output parameters are valid if function returns positive result only. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - state - Pointer to the returned duplex state value: :ref:`TE_PHY_DUPLEX_HALF ` - half duplex :ref:`TE_PHY_DUPLEX_FULL ` - full duplex :ref:`TE_PHY_DUPLEX_UNKNOWN ` - duplex unknown .. rubric:: Returns: Status code .. index:: pair: function; tapi_cfg_phy_duplex_admin_get .. _doxid-group__tapi__conf__phy_1ga8221c1f4ccb0cba55aaab8934262d9e0: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_phy_duplex_admin_get(const char* ta, const char* if_name, int* state) Get PHY duplex admin state. NOTE: Output parameters are valid if function returns positive result only. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - state - Pointer to the returned duplex state value: :ref:`TE_PHY_DUPLEX_HALF ` - half duplex :ref:`TE_PHY_DUPLEX_FULL ` - full duplex :ref:`TE_PHY_DUPLEX_UNKNOWN ` - duplex unknown .. rubric:: Returns: Status code .. index:: pair: function; tapi_cfg_phy_duplex_admin_set .. _doxid-group__tapi__conf__phy_1ga609292179cd50eceeb9754183259024c: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_phy_duplex_admin_set(const char* ta, const char* if_name, int state) Set PHY duplex state. .. note:: This function changes tree in CS locally and :ref:`tapi_cfg_phy_commit() ` must be used to apply these changes. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - state - Duplex state value: :ref:`TE_PHY_DUPLEX_HALF ` - half duplex :ref:`TE_PHY_DUPLEX_FULL ` - full duplex .. rubric:: Returns: Status code .. index:: pair: function; tapi_cfg_phy_port_get .. _doxid-group__tapi__conf__phy_1ga358b74bfac23f12071cdc7ea5c35feba: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_phy_port_get(const char* ta, const char* if_name, enum :ref:`te_phy_port`* state) Get PHY port. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - state - Pointer to the returned physical connector type .. rubric:: Returns: Status code .. index:: pair: function; tapi_cfg_phy_speed_oper_get .. _doxid-group__tapi__conf__phy_1gad1d6a31d8d6cca71497ec6d5f1162910: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_phy_speed_oper_get(const char* ta, const char* if_name, int* speed) Get PHY speed oper value. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - speed - Pointer to the returned speed value (in Mbit/sec) .. rubric:: Returns: Status code .. index:: pair: function; tapi_cfg_phy_speed_admin_get .. _doxid-group__tapi__conf__phy_1gad970fc8597d637c8354c05163bd8ab1b: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_phy_speed_admin_get(const char* ta, const char* if_name, int* speed) Get PHY speed admin value. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - speed - Pointer to the returned speed value (in Mbit/sec) .. rubric:: Returns: Status code .. index:: pair: function; tapi_cfg_phy_speed_admin_set .. _doxid-group__tapi__conf__phy_1gabc5d4a100196e1fed3dea9a7b99ca3dd: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_phy_speed_admin_set(const char* ta, const char* if_name, int speed) Set PHY speed. .. note:: This function changes tree in CS locally and :ref:`tapi_cfg_phy_commit() ` must be used to apply these changes. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - speed - Speed value (Mbit/sec) .. rubric:: Returns: Status code .. index:: pair: function; tapi_cfg_phy_mode_oper_get .. _doxid-group__tapi__conf__phy_1ga0dce47368a2ddd87f8ef24c17c159b7b: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_phy_mode_oper_get(const char* ta, const char* if_name, int* speed, int* duplex) Get PHY interface mode: speed and duplex oper state. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - speed - Speed value (Mbit/sec) * - duplex - Duplex state value :ref:`TE_PHY_DUPLEX_HALF ` - half duplex :ref:`TE_PHY_DUPLEX_FULL ` - full duplex :ref:`TE_PHY_DUPLEX_UNKNOWN ` - duplex unknown .. rubric:: Returns: Status code .. index:: pair: function; tapi_cfg_phy_mode_admin_get .. _doxid-group__tapi__conf__phy_1ga7f65f2e31b5b7eada9268c9ade1c5498: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_phy_mode_admin_get(const char* ta, const char* if_name, int* speed, int* duplex) Get PHY interface mode: speed and duplex admin state. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - speed - Speed value (Mbit/sec) * - duplex - Duplex state value :ref:`TE_PHY_DUPLEX_HALF ` - half duplex :ref:`TE_PHY_DUPLEX_FULL ` - full duplex :ref:`TE_PHY_DUPLEX_UNKNOWN ` - duplex unknown .. rubric:: Returns: Status code .. index:: pair: function; tapi_cfg_phy_mode_admin_set .. _doxid-group__tapi__conf__phy_1gaf720c89a2beb949be78c063a76701d2d: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_phy_mode_admin_set(const char* ta, const char* if_name, int speed, int duplex) Set PHY interface mode: speed and duplex state. .. note:: This function changes tree in CS locally and :ref:`tapi_cfg_phy_commit() ` must be used to apply these changes. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - speed - Speed value (Mbit/sec) * - duplex - Duplex state value :ref:`TE_PHY_DUPLEX_HALF ` - half duplex :ref:`TE_PHY_DUPLEX_FULL ` - full duplex .. rubric:: Returns: Status code .. index:: pair: function; tapi_cfg_phy_state_get .. _doxid-group__tapi__conf__phy_1ga9dfc816015216170d2202c46f1cfcc1a: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_phy_state_get(const char* ta, const char* if_name, int* state) Get PHY link state. NOTE: Output parameters are valid if function returns positive result only. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - state - Pointer to the returned link state value: :ref:`TE_PHY_STATE_DOWN ` - link down :ref:`TE_PHY_STATE_UP ` - link up .. rubric:: Returns: Status code .. index:: pair: function; tapi_cfg_phy_state_wait_up .. _doxid-group__tapi__conf__phy_1gaceea1fce77bd9e23619a2e5caf5faf17: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_phy_state_wait_up(const char* ta, const char* if_name, int timeout) Wait until an interface is UP. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - timeout - Timeout (in milliseconds) .. rubric:: Returns: Status code. .. index:: pair: function; tapi_cfg_phy_is_mode_advertised .. _doxid-group__tapi__conf__phy_1gab7ec69d2a4a92b7327efa395d61744fc: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_phy_is_mode_advertised(const char* ta, const char* if_name, int speed, int duplex, bool* state) Check that PHY mode is advertised. .. note:: This function only checks link modes defining link speed and duplex. If any of the link modes with matching speed and duplex is enabled, this function reports advertised state. To check specific link mode or link mode not related to speed/duplex use tapi_cfg_phy_mode_get(). .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - speed - Speed value (Mbit/sec, see linux/ethtool.h for more details) * - duplex - Duplex state value: :ref:`TE_PHY_DUPLEX_HALF ` - half duplex :ref:`TE_PHY_DUPLEX_FULL ` - full duplex :ref:`TE_PHY_DUPLEX_UNKNOWN ` - duplex unknown * - state - Pointer to mode state: ``true`` - the mode is advertised ``false`` - the mode is not advertised .. rubric:: Returns: Status code .. index:: pair: function; tapi_cfg_phy_advertise_mode .. _doxid-group__tapi__conf__phy_1ga34f431c2faac614ef3abf7cf9217b0e5: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_phy_advertise_mode(const char* ta, const char* if_name, int speed, int duplex, bool state) Set PHY mode to advertising state. .. note:: This function will change advertising state for all link modes with matching speed and duplex. For more detailed control use tapi_cfg_phy_mode_set(). .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - speed - Speed value (Mbit/sec, see linux/ethtool.h for more details) * - duplex - Duplex state value: :ref:`TE_PHY_DUPLEX_HALF ` - half duplex :ref:`TE_PHY_DUPLEX_FULL ` - full duplex * - state - Mode state: ``false`` - the mode is not advertised ``true`` - the mode is advertised .. rubric:: Returns: Status code .. index:: pair: function; tapi_cfg_phy_mode_supported .. _doxid-group__tapi__conf__phy_1ga6f7e14ee72b97a89bd9a7baceab255f7: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_phy_mode_supported(const char* ta, const char* if_name, const char* mode_name, bool* supported) Check whether a specific link mode is supported. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - mode_name - Link mode name * - supported - Will be set to ``true`` if the requested link mode is supported, to ``false`` otherwise .. rubric:: Returns: Status code. .. index:: pair: function; tapi_cfg_phy_mode_adv_get .. _doxid-group__tapi__conf__phy_1ga2940a767bba264e4f4c22d6b1cfeaaf9: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_phy_mode_adv_get(const char* ta, const char* if_name, const char* mode_name, bool* state) Check whether a specific link mode is advertised. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - mode_name - Link mode name * - state - Will be set to ``true`` if the requested link mode is advertised, to ``false`` otherwise .. rubric:: Returns: Status code. .. index:: pair: function; tapi_cfg_phy_mode_adv_set .. _doxid-group__tapi__conf__phy_1ga9745c16e9ec60fcc7aff34647f65a7eb: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_phy_mode_adv_set(const char* ta, const char* if_name, const char* mode_name, bool state) Set advertising state for a link mode. .. note:: This function changes tree in CS locally and :ref:`tapi_cfg_phy_commit() ` must be used to apply these changes. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - mode_name - Link mode name * - state - If ``true``, link mode should be advertised, if ``false`` - it should not be advertised .. rubric:: Returns: Status code. .. index:: pair: function; tapi_cfg_phy_lp_advertised .. _doxid-group__tapi__conf__phy_1ga7366a4318b0aaf48044bafda06ba889e: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_phy_lp_advertised(const char* ta, const char* if_name, const char* mode_name, bool* advertised) Check whether link partner advertises a given link mode. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - mode_name - Link mode name * - advertised - Will be set to ``true`` if link partner advertises the link mode and to ``false`` otherwise .. rubric:: Returns: Status code. .. index:: pair: function; tapi_cfg_phy_commit .. _doxid-group__tapi__conf__phy_1ga16fb08b7a3e4fb474c07559cde8ae552: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_phy_commit(const char* ta, const char* if_name) Commit PHY interface changes to TAs. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name .. rubric:: Returns: Status code .. index:: pair: function; tapi_cfg_phy_autoneg_str2id .. _doxid-group__tapi__conf__phy_1ga98e073397fc66750b6c0791060cf56c3: .. ref-code-block:: cpp :class: doxyrest-title-code-block int tapi_cfg_phy_autoneg_str2id(const char* name) Get PHY autoneg state by name string. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - name - Autoneg state name string .. rubric:: Returns: :ref:`TE_PHY_AUTONEG_ON ` - autonegatiation on; :ref:`TE_PHY_AUTONEG_OFF ` - autonegatiation off; :ref:`TE_PHY_AUTONEG_UNKNOWN ` - autonegatiation unknown; or ``-1`` if name string does not recognized .. index:: pair: function; tapi_cfg_phy_duplex_str2id .. _doxid-group__tapi__conf__phy_1gaa4ea01714241cb14093cc4501df1c2d5: .. ref-code-block:: cpp :class: doxyrest-title-code-block int tapi_cfg_phy_duplex_str2id(const char* name) Get PHY duplex state by name string. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - name - Duplex state name string .. rubric:: Returns: :ref:`TE_PHY_DUPLEX_HALF ` - half duplex; :ref:`TE_PHY_DUPLEX_FULL ` - full duplex; :ref:`TE_PHY_DUPLEX_UNKNOWN ` - duplex unknown; or ``-1`` if name string does not recognized .. index:: pair: function; tapi_cfg_phy_port_str2id .. _doxid-group__tapi__conf__phy_1ga4ff0a309d6e0c02fb640627610d2b3e6: .. ref-code-block:: cpp :class: doxyrest-title-code-block enum :ref:`te_phy_port` tapi_cfg_phy_port_str2id(const char* name) Get PHY physical connector type by name string. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - name - Port type name string .. rubric:: Returns: :ref:`TE_PHY_PORT_TP ` - Twisted Pair; :ref:`TE_PHY_PORT_AUI ` - Attachment Unit Interface; :ref:`TE_PHY_PORT_FIBRE ` - Fibre; :ref:`TE_PHY_PORT_BNC ` - BNC/coax; :ref:`TE_PHY_PORT_DA ` - Direct Attach; :ref:`TE_PHY_PORT_NONE ` - No physical port; :ref:`TE_PHY_PORT_OTHER ` - Unknown port type; or ``-1`` if name string does not recognized .. index:: pair: function; tapi_cfg_phy_speed_str2id .. _doxid-group__tapi__conf__phy_1ga83c9637badee8a7fe0de890d2c4319cf: .. ref-code-block:: cpp :class: doxyrest-title-code-block int tapi_cfg_phy_speed_str2id(const char* name) Get PHY speed state by name string. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - name - Speed state name string .. rubric:: Returns: TE_PHY_SPEED\_\* or ``0`` if name string does not recognized .. index:: pair: function; tapi_cfg_phy_autoneg_id2str .. _doxid-group__tapi__conf__phy_1ga071676b460e7269c3c3a9020d9c986eb: .. ref-code-block:: cpp :class: doxyrest-title-code-block const char* tapi_cfg_phy_autoneg_id2str(int autoneg) Get PHY autoneg state by id. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - autoneg - Autoneg state id .. rubric:: Returns: TE_PHY_AUTONEG_STRING_ON - autonegatiation on; TE_PHY_AUTONEG_STRING_OFF - autonegatiation off; TE_PHY_AUTONEG_STRING_UNKNOWN - autonegatiation unknown; or ``NULL`` if id does not recognized .. index:: pair: function; tapi_cfg_phy_duplex_id2str .. _doxid-group__tapi__conf__phy_1ga968c7cdcfe0bf8c4198c096afbf5a299: .. ref-code-block:: cpp :class: doxyrest-title-code-block const char* tapi_cfg_phy_duplex_id2str(int duplex) Get PHY duplex state by id. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - duplex - Duplex state id .. rubric:: Returns: half - half duplex; full - full duplex; unknown - unknown duplex; or ``NULL`` if id does not recognized .. index:: pair: function; tapi_cfg_phy_port_id2str .. _doxid-group__tapi__conf__phy_1gafe5814cb2c3d625444bf85684a9df7b7: .. ref-code-block:: cpp :class: doxyrest-title-code-block const char* tapi_cfg_phy_port_id2str(enum :ref:`te_phy_port` port) Get PHY physical connector type by name id. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - port - Port type id .. rubric:: Returns: :ref:`TE_PHY_PORT_STRING_TP ` - Twisted Pair; :ref:`TE_PHY_PORT_STRING_AUI ` - Attachment Unit Interface; :ref:`TE_PHY_PORT_STRING_FIBRE ` - Fibre; :ref:`TE_PHY_PORT_STRING_BNC ` - BNC/coax; :ref:`TE_PHY_PORT_STRING_DA ` - Direct Attach; :ref:`TE_PHY_PORT_STRING_NONE ` - No physical port; :ref:`TE_PHY_PORT_STRING_OTHER ` - Unknown port type; or ``NULL`` if id does not recognized .. index:: pair: function; tapi_cfg_phy_speed_id2str .. _doxid-group__tapi__conf__phy_1ga312a0b1ae050d31f10c0ba6f22a5a83f: .. ref-code-block:: cpp :class: doxyrest-title-code-block const char* tapi_cfg_phy_speed_id2str(int speed) Get PHY speed state by id. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - speed - Speed state id .. rubric:: Returns: TE_PHY_SPEED_STRING\_\* or ``NULL`` if id does not recognized .. index:: pair: function; tapi_cfg_phy_advertise_one .. _doxid-group__tapi__conf__phy_1gac5a970efc4b7c665e02406324423a5fc: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_phy_advertise_one(const char* ta, const char* if_name, int advert_speed, int advert_duplex) Turn off all advertised modes and advertise only one. FIXME: this function calls :ref:`tapi_cfg_phy_commit() `, it may be not convenient. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test agent * - if_name - Interface name * - advert_speed - Speed to advertise (Mbit/sec) * - advert_duplex - Duplex to advertise .. rubric:: Returns: Operation status code. .. index:: pair: function; tapi_cfg_phy_pause_lp_adv_get .. _doxid-group__tapi__conf__phy_1ga3273d69972cc34ef2870e73a7974e2a2: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_phy_pause_lp_adv_get(const char* ta, const char* if_name, int* state) Get PHY link partner advertised pause frame use. NOTE: Output parameters are valid if function returns positive result only. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - state - Pointer to the returned pause frame use value: :ref:`TE_PHY_PAUSE_NONE ` - no pause frame use :ref:`TE_PHY_PAUSE_TX_ONLY ` - transmit only :ref:`TE_PHY_PAUSE_SYMMETRIC ` - symmetric :ref:`TE_PHY_PAUSE_SYMMETRIC_RX_ONLY ` - symmetric or receive only .. rubric:: Returns: Status code .. index:: pair: function; tapi_cfg_phy_autoneg_lp_adv_get .. _doxid-group__tapi__conf__phy_1ga0cfc09689e5f981a047f3de44ed18bae: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_phy_autoneg_lp_adv_get(const char* ta, const char* if_name, int* state) Get PHY link partner advertised autonegotiation state. NOTE: Output parameters are valid if function returns positive result only. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - state - Pointer to the returned autonegotiation state value: :ref:`TE_PHY_AUTONEG_OFF ` - autonegotiation OFF :ref:`TE_PHY_AUTONEG_ON ` - autonegotiation ON .. rubric:: Returns: Status code .. index:: pair: function; tapi_cfg_phy_autoneg_oper_get .. _doxid-group__tapi__conf__phy_1ga5e28c4c629ab8e2430e82529de1c6325: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_phy_autoneg_oper_get(const char* ta, const char* if_name, int* state) Get PHY autonegotiation oper state. .. note:: This function is outdated, use :ref:`tapi_cfg_phy_autoneg_get() `. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - state - Pointer to the returned autonegotiation state value: :ref:`TE_PHY_AUTONEG_OFF ` - autonegotiation OFF :ref:`TE_PHY_AUTONEG_ON ` - autonegotiation ON .. rubric:: Returns: Status code .. index:: pair: function; tapi_cfg_phy_autoneg_admin_get .. _doxid-group__tapi__conf__phy_1gafae228ee2aea8e486b783756ee684fd0: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_phy_autoneg_admin_get(const char* ta, const char* if_name, int* state) Get PHY autonegotiation admin state. .. note:: This function is outdated, use :ref:`tapi_cfg_phy_autoneg_get() `. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - state - Pointer to the returned autonegotiation state value: :ref:`TE_PHY_AUTONEG_OFF ` - autonegotiation OFF :ref:`TE_PHY_AUTONEG_ON ` - autonegotiation ON .. rubric:: Returns: Status code .. index:: pair: function; tapi_cfg_phy_autoneg_admin_set .. _doxid-group__tapi__conf__phy_1gaae2b0d5774bc9cc33a90de18bf9c9e09: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_phy_autoneg_admin_set(const char* ta, const char* if_name, int state) Set PHY autonegotiation state. .. note:: This function is outdated, use :ref:`tapi_cfg_phy_autoneg_set() `. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - if_name - Interface name * - state - Autonegotiation state value: :ref:`TE_PHY_AUTONEG_OFF ` - autonegotiation OFF :ref:`TE_PHY_AUTONEG_ON ` - autonegotiation ON .. rubric:: Returns: Status code